C Data Types 2 Questions and Answers
Practice ModeShowing 10 of 159 questions
Q151
Find the output
void main ( )
{
printf ("%d", 4>>256);
}
Answer: Option B
Q152
Find the output
void main ( )
{
int i=3, j=2, k=1;
printf ("%d/%d");
}
Answer: Option D
Q153
Find the output if the input is 5 5.75
void main ( )
{
int i=1;
float f=2.25;
scanf("%d a %f', &i, &f);
printf("%d %.2f", 1, f);
}
Answer: Option C
Q154
Find the output.
void main ( )
float x=3.2;
float y=2.2;
printf("%.2f", x/y);
}
Answer: Option A
Q155
Find the output
void main ( )
{
float x,y;
x=4.231;
y=(int) x/2.0;
printf("%f", y);
}
Answer: Option C
Q156
Find the output
void main ( )
{
int a=0150, b=057, c;
c=a+b;
printf ("%d", c);
}
Answer: Option C
Q157
Find the output
void main ( )
{
int i=49;
printf("%d %p", i, i);
}
Answer: Option C
Q158
Find the output
void main ( )
{
int a=0x100;
int b=0x100;
int c=a*b;
printf("%x", c);
}
Answer: Option C
Q159
Find the output
void main ( )
{
int a="%d";
printf("%d',a);
}
Answer: Option B