C Data Types 2 Questions and Answers
Practice ModeShowing 10 of 159 questions
Q111
Find the output.
void main ( )
char i=1;
for (i;i<127;i++)
printf("Fll1");
}
Answer: Option B
Q112
Find the output
void main ( )
int x=32768;
printf (%d %u", x, x);
}
Answer: Option A
Q113
Find the output
void main ( )
{
unsigned int a=6;
~a;
printf("%u", a);
}
Answer: Option A
Q114
Find the output
void main ( )
{
int ch=48;
if (ch)
{
printf("valid");
break;
printf("ok")
}
else
printf ("invalid");
}
Answer: Option D
Q115
Find the output.
void main ( )
{
int a:15;
char b:7;
printf("%d %d",
sizeof (a), sizeof (b));
}
Answer: Option D
Q116
Find the output
void main ( )
{
const int x=get( );
printf ("%d", x);
}
get ( )
{
return (20);
}
Answer: Option A
Q117
Find the output
void main ( )
{
printf ("%d %d", 85000);
}
Answer: Option B
Q118
Find the output
typedef struct boy
{
float height;
char name;9;
int age:16;
}
boy;
void main ( )
{
boy b={5 . 8, "Praveen kumar", 24};
printf("%f %s %d",
b. height, b.name, b.age};
}
Answer: Option D
Q119
State the correct statement about external variables.
(a) .
(b)
(c)
(d)
Answer: Option C
Q120
Find the output
void main ( )
{
int a;
char b;
float c;
printer (%d", sizeof (a+b+c));
}
Answer: Option C