C Programming :: Operators and Expressions
-
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 -
Determine output:
void main()
{
int i=0, j=1, k=2, m;
m = i++ || j++ || k++;
printf("%d %d %d %d", m, i, j, k);
}
-
Determine output:
void main()
{
int i=10;
i = !i>14;
printf("i=%d", i);
}
- In C programming language, which of the following type of operators have the highest precedence
-
What will be the output of the following program?
void main()
{
int a, b, c, d;
a = 3;
b = 5;
c = a, b;
d = (a, b);
printf("c=%d d=%d", c, d);
}
- Which of the following comments about the ++ operator are correct?
-
What will be the output of this program on an implementation where int occupies 2 bytes?
#include <stdio.h>
void main()
{
int i = 3;
int j;
j = sizeof(++i + ++i);
printf("i=%d j=%d", i, j);
}