adplus-dvertising
frame-decoration

Question

What is the output of this program?
#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 5 11

b.

11 1 5 11

c.

11 3 2 11

d.

11 3 3 11

Posted under C Programming

Answer: (a).11 3 5 11

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?

Similar Questions

Discover Related MCQs

Q. What is size of int in C ?

Q. Range of double is -1.7e-38 to 1.7e+38. (in 16 bit platform - Turbo C under DOS)

Q. Array is ______ datatype in C Programming language.

Q. Which of the following is not a logical operator?

Q. Which of the following can have different meaning in different contexts?

Q. Which of the following is not a valid declaration in C?

1. short int x;
2. signed short x;
3. short x;
4. unsigned short x;

Q. The minimum number of temporary variable needed to swap the content two variables is?

Q. The precedence of arithmetic operators is (from highest to lowest)?

Q. How would you round off a value from 6.66 to 7.0?

Q. The format identifier %i is also used for _____ data type?

Q. In expression i = g() + f(), first function called depends on __________

Q. Which of the following is correct Associativity for == operator?

Q. Which of the following operator has highest Precedence?

Q. Which of the following operator has lowest Precedence?

Q. Which of the following has same Precedence?

A. ++
B. ->
C. !

Q. Identify wrong C Keywords below.

Q. Find a correct C Keyword below.

Q. Find a correct C Keyword.

Q. Types of Integers are

Q. Types of Real numbers in C are