46.
If scanf() is used to store a value in a char variable then along with the value a carriage return(\r) also gets stored it.
A. True
B. False
Answer: Option B
Explanation:
No, the carriage return tells the compiler to read the input from the buffer after ENTER key is pressed.
47.
The modulus operator cannot be used with a long double.
A. True
B. False
Answer: Option A
Explanation:
fmod(x,y) – Calculates x modulo y, the remainder of x/y.
This function is the same as the modulus operator. But fmod() performs floating point or long double divisions.
48.
A char variable can store either an ASCII character or a Unicode character.
A. True
B. False
Answer: Option A
Explanation:
Yes, we can store either an ASCII character or a Unicode character in a char variable.
49.
The way the break is used to take control out of switch and continue to take control of the beginning of the switch?
A. Yes
B. No
Answer: Option B
Explanation:
continue can work only with loops and not with switch
50.
Can we use a switch statement to switch on strings?
A. Yes
B. No
Answer: Option B
Explanation:
The cases in a switch must either have integer constants or constant expressions.