Wednesday, 10 December 2014

Programming Quiz-2

Q: What is the output of this C code?

#include <stdio.h>

void main()

{

    int x = 97;

    int y = sizeof(x++);

    printf("x is %d", x);

}

Options:

a) x is 97
b) x is 98
c) x is 99
d) Run time error

Answer:  A

No comments:

Post a Comment