Computer Science, asked by missbrains2935, 1 year ago

void main() { int a=10, b; b = a++ + ++a; printf("%d %d %d %d", b, a++, a, ++a); }

what will be the output when following code is executed?
A.12 10 11 13
B.22 12 12 13
C.22 11 11 11
D.22 14 12 13

Answers

Answered by Anonymous
27
B. 22 12 12 13

Hope it helps u
Answered by archanajhaasl
0

Answer:

The output when the code will be executed is 22,13,14,14 i.e.none of the options are correct.

Explanation:

The input command of the code from the keyboard is given as follows,

void main()

{

  int a=10, b;

  b = a++ + ++a;

  printf("%d %d %d %d", b, a++, a, ++a);

}

And the output of the given program on the picture shown below.

The output when the code will be executed is 22,13,14,14 i.e.none of the options are correct.

#SPJ3

Attachments:
Similar questions