C Data Types 2 Questions and Answers
Practice ModeShowing 10 of 159 questions
Q131
Find the output.
void main ( )
{
char c=65;
c=(!=c);
printf("%d",c);
}
Answer: Option D
Q132
Find the output.
void main ( )
{
char not=65;
not=not + (not =!not);
printf("%d',not);
}
Answer: Option A
Q133
Find the output.
void main ( )
{
char p[ ]="%d\n";
p[1]='c';
printf ("%s", p, 65);
}
Answer: Option B
Q134
Find the output
void main ( )
{
unsigned int i;
for (i=1; i>-2; i--)
printf("a");
}
Answer: Option C
Q135
Find the output
void main ( )
{
unsigned int i;
for (i=1; i>-2; i--)
printf ("a");
}
Answer: Option C
Q136
Find the output
void main ( )
{
signed char i=1;
for (;i>0;i++);
printf ("%d",i);
}
Answer: Option C
Q137
Find the output.
#define sizeof (int) 3
#define float int
void main ( )
{
float a;
if(a=sizeof (int) / sizeof (float))
if (a==1.00000)
printf("Testing");
printf("OK");
}
Answer: Option D
Q138
Find the output
void main( )
int a=256;
char *p=&a;
*++p=2;
printf("%d", a);
}
Answer: Option A
Q139
Find the output
int main ( )
{
float a=12.5;
printf("%f\n",a);
printf ('%f", *(int *) &a);
return 0;
Answer: Option A
Q140
Find the output
void main ( )
{
char ch ='A';
ch=-100-91;
printf("%c", ch);
}
Answer: Option B