Question
#include <stdio.h>
int main()
{
int a = -1, b = 4, c = 1, d;
d = ++a && ++b || ++c;
printf("%d, %d, %d, %d\n", a, b, c, d);
return 0;
}
a.
0, 4, 2, 1
b.
0, 5, 2, 1
c.
-1, 4, 1, 1
d.
0, 5, 1, 0
Posted under C Programming
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 C code? #include <stdio.h> int main() { int a = -1, b = 4, c = 1, d; d = ++a && ++b || ++c; printf("%d, %d,...
Similar Questions
Discover Related MCQs
Q. Which of the following operator takes only integer operands?
View solution
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
View solution
Q. In C programming language, which of the following type of operators have the highest precedence
View solution
Q. Which of the following comments about the ++ operator are correct?
View solution
Q. Which operator has the lowest priority?
View solution
Q. Which operator from the following has the lowest priority?
View solution
Q. Given b=110 and c=20, what is the value of 'a' after execution of the expression a=b-=c*=5?
View solution
Q. Unary Operators are Operators having ____________.
View solution
Q. Which of the following operator has lowest precedence amongst all the operators ?
View solution
Q. Which of the following correctly shows the hierarchy of arithmetic operations in C?
View solution
Q. Associativity of unary operator is from _________ to __________.
View solution
Q. sizeof is an example of ____________.
View solution
Q. Which of the following are unary operators in C ?
1. !
2. sizeof
3. ~
4. &&
View solution
Q. Arrange the following operators in decreasing order of Operator Precedence.
1. Arithmetic Operator
2. Unary Operator
3. Comparison Operator
4. Shift Operator
View solution
Q. Arithmetic Operator has associtivity from ___________ to ____________.
View solution
Q. Which of the following is correct use of Conditional Operator ?
View solution
Q. In which order do the following gets evaluated in C Programming -
1. Relational
2. Arithmetic
3. Logical
4. Assignment
View solution
Q. Local Variable is having _______ scope.
View solution
Q. In order to create a local variable we need to use local keyword.
local int var;
View solution
Q. Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!