C Operators Questions and Answers
Practice ModeShowing 10 of 122 questions
Q51
Find the output
void main ( )
{
int a=10, b=20;
a=(a>5 || b=6? 40:50);
printf("%d", a);
}
Answer: Option D
Q52
Arrange the operators ~, == &&, *,^ in the increasing order of precedence.
Answer: Option B
Q53
Find the output
void main ( )
{
int x=16384, y=1;
x<<=y;
printf("%d",x);
}
Answer: Option B
Q54
Find the output.
void main ( )
{
printf("%x",-1<<4);
}
Answer: Option C
Q55
Simple encryption can be done using
Answer: Option C
Q56
Find the output
void main ( )
{
int p=3, q=-5, x=4, y=2, z;
z=p+++ ++q*y/x;
printf("%d', z);
}
Answer: Option B
Q57
Find the output
void main ( )
{
int x=7;
x=(x<<=x%2)
printf("%d",x);
}
Answer: Option B
Q58
Find the output
void main ( )
{
int a=2, b=5, c=1;
printf(%d", (b>=a>=0?1:0);
}
Answer: Option A
Q59
Find the output.
void main ( )
{
int x=1;
if (x++>=x)
printf("%d",x);
else
printf("%d", ++x);
}
Answer: Option B
Q60
The correct order of evaluation for the expression a=b- =c*=5 is
Answer: Option B