adplus-dvertising
frame-decoration

Question

What will be output for the following code?
#include <stdio.h>
int main()
{
        int a = 2;
        int b = (a++, a++);
        printf(""%d%d
"", b, a);
}

a.

3 4

b.

4 4

c.

3 5

d.

2 4

Posted under C Programming

Answer: (a).3 4

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be output for the following code?