Question
#include<stdio.h>
int main()
{
int a = 10, b;
a >=5 ? b=100: b=200;
printf("%d\n", b);
return 0;
}
Point out the error, if any in the program.
#include<stdio.h>
int main()
{
int a = 10, b;
a >=5 ? b=100: b=200;
printf("%d\n", b);
return 0;
}
Answer: Option C
Was this answer helpful ?
Variable b is not assigned.
It should be like:
b = a >= 5 ? 100 : 200;
Was this answer helpful ?
More Questions on This Topic :
Question 10.
#include<stdio.h>
int main()
{
int i=4;
....
Submit Solution