Q. What is the output of this program?

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

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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