Questions tagged as 'char'

2
answers

Adding a char to a char pointer in C / C ++

I need to add char to a char pointer. For example: I have a pointer of char named name, which receives "log", after the process, I want it to be "log1". I tried to implement this, but it did not work. bool trocarNome(c...
asked by 27.04.2016 / 19:33
1
answer

Reading char and string in c ++

I have to put an integer, a real, a character and a sentence containing spaces up to 100 characters. I tried to make the solution but I can only type the numbers and the character and the string are not coming out. #include<iostream> #in...
asked by 06.09.2018 / 20:14
1
answer

How to check if a field in an array of chars is empty in Java?

I'm trying to check if a certain position in an array of chars actually contains some character. I tried two ways: char[] arr = new char[10]; if(arr[0] == null){ } And also: char[] arr = new char[10]; if(arr[0] == ''){ } When typ...
asked by 28.07.2018 / 02:09
1
answer

Limit a specific value to a string

I need to limit to a specific value that would be 511 char command[512]; I tried with char command[512]; scanf("%511s",command); if (StrToInt(command))>511) printf("FIX ATK"); and this too char command[512]; scanf("%511s", comma...
asked by 12.12.2017 / 14:59
1
answer

How do I make a comparison of a character in the range of an alphabet?

The question is:  1) Help the university to assemble the divisions of the programming lab. To do this, write an algorithm that reads the name of the student and say in which division he is respecting the rule below: -children whose name begins...
asked by 21.03.2017 / 01:56