MCQ - Variables & Datatypes in C
7. What is size of int in C ?
Explanation: The size of the datatypes depend on the system.
The size of ‘int’, in fact every other data type as well is compiler dependent and not language dependent. Based on how a compiler is implemented, it can take either 2 bytes or 4 bytes.
8. Range of double is -1.7e-38 to 1.7e+38 (in 16 bit platform - Turbo C under DOS)
Explanation: The range of double is -1.7e+308 to 1.7e+308.
9. Which is false?
Explanation: Since the constant variable has to be declared and defined at the same time, not doing it results in an error..
10. Array is ______ datatype in C Programming language.
Explanation:Data types simply refers to the type and size of data associated with variables and functions.
It is of two types :- Fundamental Data Types and Derived Data Types.
Array is Derived Data type datatype in C Programming language.
11. If you pass an array as an argument to a function, what actually gets passed?
Explanation: Base address of array is passed.
12. When double is converted to float, the value is?
Explanation: When double is converted to float, the value will be Depends on the compiler.
13. Which of the following is not a logical operator?
&& - Logical AND
! - Logical NOT
|| - Logical OR
| - Bitwise OR(used in bitwise manipulations)
Also check :