MCQ - Variables & Datatypes in C

11. What is size of int in C ?

A. 2 bytes
B. 4 bytes
C. 8 bytes
D. Depends on the system/compiler

View Answer

12. Range of double is -1.7e-38 to 1.7e+38 (in 16 bit platform - Turbo C under DOS)

C. May Be
D. Can't Say

View Answer

13. Which is false?

A. Constant variables need not be defined as they are declared and can be defined later
B. Global constant variables are initialized to zero
C. const keyword is used to define constant values
D. You cannot reassign a value to a constant variable

View Answer

14. Array is ______ datatype in C Programming language.

A. Derived Data type
B. Primitive Data type
C. Custom Data type
D. None of these

View Answer

15. If you pass an array as an argument to a function, what actually gets passed?

A. Address of last element of Array
B. Value of first element
C. Base address of array
D. Value of elements in array

View Answer

16. When double is converted to float, the value is?

A. Rounded
B. Truncated
C. Depends on the standard
D. Depends on the compiler

View Answer

17. Which of the following is not a logical operator?

A. !
B. &&
C. ||
D. |

View Answer

18. What is the output of this program?

#include <stdio.h>
int main(){
    return 0;

A. 0
B. 1
C. -1

View Answer

19. What is the output of this program?

#include <stdio.h>
int main(){
    char num = '10';
	printf("%d", num);
	return 0;

A. 49
B. 48
C. 10
D. 8

View Answer

20. What is the output of this program?

#include <stdio.h>
int main(){
    void  num=10;
	printf("%v", num);
	return 0;

A. Compilation error
B. 10
C. Garbage value
D. 0

View Answer

Also check :


* You must be logged in to add comment.