C Operators Questions and Answers
Practice ModeShowing 10 of 122 questions
Q81
Find the output
void main ( )
{
int x, y=2, z=3;
z=(x&y!=z%x);
printf("%d",z);
}
Answer: Option B
Q82
Find the output
void main ( )
{
int i=10, j=2, k=0;
for (j=1, j<i;j=2*(i/j))
k+=j<y?2:3;
printf("%d",k);
}
Answer: Option A
Q83
Pick the operator whose meaning is context dependent.
Answer: Option B
Q84
Logical left shift results in
Answer: Option C
Q85
find the output
void main ( )
{
int i=2, j=3, k, 1=0;
k-sizeof (1=i*j+6);
printf("%d %d", k, 1);
}
Answer: Option A
Q86
Find the output
void main ( )
{
int a=5, b=10;
b=(a, b) ? (a, 0) ? a:b:b;
printf ("%d %d", a, b);
}
Answer: Option A
Q87
Find theoutput
void main ( )
{
int i=5;
for (i=-5; ! i, i++);
printf ("%d", -i);
}
Answer: Option B
Q88
Find the output
void main ( )
int a=2, b=3, c=0;
if (a, b&&c)
printf 9"Hell");
else
printf("Dear");
}
Answer: Option B
Q89
Find theoutput
void main ( )
{
int i=4;
i=i+2*i--;
printf("%d", i);
}
Answer: Option C
Q90
Find the output
void main ( )
{
int a=1, b=2, c=3, d=4;
printf ("%d', !a?b?!c:!d:a);
}
Answer: Option A