C Function - C programming (MCQ) questions for Q. 27531

Q.  Comment on the output of following C program?

#include <stdio.h>
main()
{
     int a = 1;
     printf("size of a is %d, ", sizeof(++a));
     printf("value of a is %d", a);
};

- Published on 26 Feb 17

a. size of a is 4, value of a is 1
b. size of a is 4, value of a is 2
c. size of a is 2, value of a is 2
d. None of the above

ANSWER: size of a is 4, value of a is 1

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)