C Programming - Control Instructions

1.
A short integer is at least 16 bits wide and a long integer is at least 32 bits wide.
True
False
Answer: Option
Explanation:

The basic C compiler is 16 bit compiler, below are the size of it's data types
The size of short int is 2 bytes wide(16 bits).
The size of long int is 4 bytes wide(32 bits).


2.
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.
True
False
Answer: Option
Explanation:

No, the carriage return tells the compiler to read the input from the buffer after ENTER key is pressed.


3.
The modulus operator cannot be used with a long double.
True
False
Answer: Option
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.


4.
A char variable can store either an ASCII character or a Unicode character.
True
False
Answer: Option
Explanation:

Yes, we can store either an ASCII character or a Unicode character in a char variable.