CSE MCQs :: C-MCQs
-
What is the output of this C code?
void main()
{
int a = 5, b = -7, c = 0, d;
d = ++a && ++b || ++c;
printf("\n%d%d%d%d", a, b, c, d);
} -
What is the output of this C code?
void main()
{
int a = -5;
int k = (a++, ++a);
printf("%d\n", k);
} -
What is the output of this C code?
int main()
{
int x = 1, y = 0, z = 3;
x > y ? printf("%d", z) : return z;
} -
What is the output of this C code?
void main()
{
int x = 1, z = 3;
int y = x << 3;
printf(" %d\n", y);
} -
What is the output of this C code?
int main()
{
int i = 1;
if (i++ && (i == 1))
printf("Yes\n");
else
printf("No\n");
} - Are logical operators sequence points?
- Does logical operators in C language are evaluated with short circuit?
- Result of a logical or relational expression in C is?
-
What will be the value of d in the following program?
int main()
{
int a = 10, b = 5, c = 5;
int d;
d = b + c == a;
printf("%d", d);
} -
What is the output of this C code?
int main()
{
int a = 10, b = 5, c = 3;
b != !a;
c = !!a;
printf("%d\t%d", b, c);
}