Classical

C Programming MCQ - I/O Operations

31:  

The output of the following program
main( )
{
 int a = 1, b = 2, c = 3;
   printf("%d", a += (a += 3, 5, a));
}

will be

A.

8

B.

12

C.

9

D.

6

 
 

Option: A

Explanation :


32:  

The statement printf ("%d", 10 ? 0 ? 5 : 11 : 12 ) ; 

A.

10

B.

0

C.

12

D.

11

 
 

Option: D

Explanation :


33:  

The statement printf ("%d", ++5) ; prints

A.

5

B.

6

C.

an error message

D.

garbage

 
 

Option: C

Explanation :


34:  

 The statement printf ("%d", ( a++) ) ; prints

A.

the current value of a

B.

the value of a + 1

C.

an error message

D.

garbage

 
 

Option: A

Explanation :


35:  

The statement printf ( "%d" , sizeof (" "')); prints

A.

an error message

B.

0

C.

garbage

D.

1

 
 

Option: D

Explanation :




Suggest an improvement