Question
#include <stdio.h>
int main()
{
int i = 10, j = 0;
if (i || (j = i + 10))
//do something
;
}
a.
0
b.
20
c.
Compile time error
d.
Depends on language standard
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 final value of j in the below code? #include <stdio.h> int main() { int i = 10, j = 0; if (i || (j = i + 10)) //do...
Similar Questions
Discover Related MCQs
Q. Are logical operators sequence points?
View solution
Q. Does logical operators in C language are evaluated with short circuit?
View solution
Q. Result of a logical or relational expression in C is
View solution
Q. Which among the following is NOT a logical or relational operator?
View solution
Q. Relational operators cannot be used on:
View solution
Q. When double is converted to float, the value is?
View solution
Q. Function tolower(c) defined in library works for
View solution
Q. Which type conversion is NOT accepted?
View solution
Q. What will be the data type of the result of the following operation?
(float)a * (int)b / (long)c * (double)d
View solution
Q. Which of the following type-casting have chances for wrap around?
View solution
Q. Which of the following typecasting is accepted by C?
View solution
Q. When do you need to use type-conversions?
View solution
Q. For which of the following, “PI++;” code will fail?
View solution
Q. What is the type of the below assignment expression if x is of type float, y is of type int?
y = x + y;
View solution
Q. What is the value of the below assignment expression
(x = foo())!= 1 considering foo() returns 2
View solution
Q. Operation “a = a * b + a” can also be written as:
View solution
Q. for c = 2, value of c after c <<= 1;
View solution
Q. Which of the following is an invalid assignment operator?
View solution
Q. For initialization a = 2, c = 1 the value of a and c after this code will be
c = (c) ? a = 0 : 2;
View solution
Q. What will be the data type of the expression
(a < 50) ? var1 : var2;
provided a = int, var1 = double, var2 = float
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!