Google News
logo
C-Language - Quiz(MCQ)
1 .
What are the total number of keywords in C?
A)
29
B)
30
C)
32
D)
35

Correct Answer : Option (C) :  

32

2 .
In C int[ ] ={4,5,6,7,8} What is the value of a[3]? ?
A)
4
B)
5
C)
6
D)
7

Correct Answer : Option (D) :  

7

3 .
Which of the following shows the correct syntax for an if statement?
A)
if ( expression )
B)
if { expression }
C)
if expression
D)
expression if

Correct Answer : Option (A) :  

if ( expression )

4 .
Which of the following is the correct operator to compare two variables?
A)
:=
B)
=
C)
equal
D)
==

Correct Answer : Option (D) :   ==

5 .
Which of the following operators cannot be overloaded?
A)
%
B)
::
C)
+
D)
Both a and b above

Correct Answer : Option (B) :   ::

6 .
Which is not a loop structure?
A)
repeating
B)
do while
C)
while
D)
for

Correct Answer : Option (A) :  

repeating

7 .
How to read a character from the keyboard and will store it in the variable a.
A)
a = getchar( stdin );
B)
getchar( &a )
C)
a = getc();
D)
a = getchar();

Correct Answer : Option (D) :  

a = getchar();

8 .
Which of the following is the boolean operator for logical-and?
A)
||
B)
|
C)
&&
D)
&

Correct Answer : Option (C) :  

&&

9 .
By default a real number is treated as a
A)
float
B)
double
C)
long double
D)
far double

Correct Answer : Option (B) :  

double

10 .
int i = 2 * 3 + 4 * 5; 
Value of i:
A)
26
B)
30
C)
36
D)
40

Correct Answer : Option (A) :  

26