If scanf() is used to store a value in a char variable then along with the value a carriage return also gets stored with it.
Answer: B
Correct answer: False
Nothing extra is stored. scanf("%c", &ch) reads exactly one character into the variable; the newline you typed afterwards is simply left in the input buffer, where it will be picked up by the next read. That is why a second %c so often appears to read nothing - it consumes the leftover newline.
Please log in or register to report this question.