C Programming Multiple Choice Question - Variables And Datatypes

This section focuses on the "Variables And Datatypes" of the C programming. These Multiple Choice Questions (mcq) should be practiced to improve the C programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. How many keywords are there in c ?

A. 31
B. 32
C. 64
D. 63

View Answer

2. Which of the following is true for variable names in C?

A. Variable names cannot start with a digit
B. Variable can be of any length
C. They can contain alphanumeric characters as well as special characters
D. Reserved Word can be used as variable name

View Answer

3. Which of the following cannot be a variable name in C?

A. true
B. friend
C. export
D. volatile

View Answer

4. What is the output of this program?

void main()
int x = 10;
float x = 10;
printf("%d", x)

A. Compilations Error
B. 10
C. 10.0000
D. 10.10

View Answer

5. What is the output of this program?

    #include <stdio.h>
int main()
int i;
for (i = 0;i < 5; i++)
int a = i;
printf("%d", a);

A. Syntax error in declaration of a
B. No errors, program will show the output 5
C. Redeclaration of a in same scope throws error
D. a is out of scope when printf is called

View Answer

6. What is the output of this program?

  #include <stdio.h>
int var = 20;
int main()
int var = var;
printf("%d ", var);
return 0;

A. Garbage Value
B. 20
C. Compiler Error
D. None of these

View Answer

Also check :


* You must be logged in to add comment.