Q. What will be output for the following code?

Code:
#include <stdio.h>
int main()
{
        int a = 2;
        int b = (a++, a++);
        printf(""%d%d
"", b, a);
}
  • (A) 2 4
  • (B) 3 5
  • (C) 4 4
  • (D) 3 4
πŸ’¬ Discuss
βœ… Correct Answer: (D) 3 4

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
183
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
89%
Success Rate