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 :

Click on Discuss to view users comments.

Write your comments here:



32:  

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

A.

10

B.

0

C.

12

D.

11

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



33:  

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

A.

5

B.

6

C.

an error message

D.

garbage

 
 

Option: C

Explanation :

Click on Discuss to view users comments.

Write your comments here:



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 :

Click on Discuss to view users comments.

Write your comments here:



35:  

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

A.

an error message

B.

0

C.

garbage

D.

1

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here: