adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <stdio.h>
    int main()
    {
        int a = 1, b = 0;
        int c = (a++, b++) ? b : a;
        printf("%d", c);
        return 0; 
    }

a.

2

b.

1

c.

0

d.

3

Posted under C Programming

Answer: (a).2

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?