char is just a 1 byte integer. There is nothing magic with the char type! Just as you can assign a short to an int, or an int to a long, you can assign a char to an int. Yes, the name of the primitive data type happens to be "char", which insinuates that it should only contain characters.
Newbie question here...why does the following code only work with a 1D array but not a 2D array? Shouldn't it not make a difference whether b is pointing to the start of a 1D array or a 2D array, as long as it's a char* pointer (as it is)? I thought that the general notation [bound1][bound2]...
Нужно проверить обычный CHAR (ну и индекс добавим, мало ли что...) Тест №3
I know that for cannot convert char to char * you just use the & in front of the char, but I cannot figure out what to do in this case.
This question already has answers here: Converting int to char in C (7 answers).
C++/Game Tutorial 3: Chars And Strings. MakingGamesWithBen.
Перевожу char в int, но на выходе неверное число, вот упрощений вариант
atoi() - это круть, но просит на вход const char*, а я могу максимум char сделать( Где здесь копать? Хотя тут char используют...