QUIZ 55

What is the output?

#include<stdio.h>
void main()
{
int x=10;
(x<0)?(int a =100):(int a =1000);
printf(” %d”,a);
}
a. Error
b. 1000
c. 100
d. None of these options

Answer : (a)

a is a local variable

Leave a Reply

Your email address will not be published. Required fields are marked *