C Quiz – 107 | Question 3
In a C program snippet, followings are used for definition of Integer variables?
Pick the best statement for these.
(A) All of the above variable definitions are incorrect because basic data type int is missing.
(B) All of the above variable definitions are correct because int is implicitly assumed in all of these.
(C) Only “long l;” and “long long ll;” are valid definitions of variables.
(D) Only “unsigned u;” is valid definition of variable.
Explanation: Please note that signed, unsigned and long all three are Type specifiers. And int is implicitly assumed in all of three.
As per C standard, “int, signed, or signed int” are equivalent. Similarly, “unsigned, or unsigned int” are equivalent. Besides, “long, signed long, long int, or signed long int” are all equivalent. And “long long, signed long long, long long int, or signed long long int“ are equivalent.
Quiz of this Question
Please Login to comment...