adplus-dvertising
frame-decoration

Question

What should be the output of the following program:
#include<stdio.h>
    int main()
    {
        int a = 1, b = 2, c = 3, d = 4, e;
        e = c + d = b * a;
        printf("%d, %d\n", e, d);
    }

a.

7, 4

b.

7, 2

c.

5, 2

d.

Syntax error

Posted under C Programming

Answer: (d).Syntax error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What should be the output of the following program: #include<stdio.h> int main() { int a = 1, b = 2, c = 3, d = 4, e; e = c + d = b * a;...

Similar Questions

Discover Related MCQs

Q. Which of the following is the correct order of evaluation for the given expression?

a = w % x / y * z;

Q. Which function in the following expression will be called first?

a = func3(6) - func2(4, 5) / func1(1, 2, 3);

Q. Which of the following operator has the highest precedence in the following?

Q. Which of the following is a ternary operator?

Q. Which of the following are unary operators?

Q. Where in C the order of precedence of operators do not exist?

Q. Associativity of an operator are:

Q. Which of the following method are accepted for assignment?

Q. Which of the following is NOT possible with any 2 operators in C?

Q. Which of the following is possible with any 2 operators in C?

Q. Which of the following operators has the lowest precedence?

Q. Which of the following operator takes only integer operands?

Q. In an expression involving || operator, evaluation

I. Will be stopped if one of its components evaluates to false
II. Will be stopped if one of its components evaluates to true
III. Takes place from right to left
IV. Takes place from left to right

Q. In C programming language, which of the following type of operators have the highest precedence

Q. Which of the following comments about the ++ operator are correct?

Q. Which operator has the lowest priority?

Q. Which operator from the following has the lowest priority?

Q. Given b=110 and c=20, what is the value of 'a' after execution of the expression a=b-=c*=5?

Q. Unary Operators are Operators having ____________.

Q. Which of the following operator has lowest precedence amongst all the operators ?