main(){ int a=10,b; b=a>=5?100:200;printf("%d\n",b);}
Answers
Answered by
1
Answer:
ans print is 100
Explanation:
because b=a>=5?100:200
given a=10 so if condition gets true before? answer will be 100 or gets false answer will be 200
here conditions gets true 10>=5
so ans is 100
Answered by
1
Answer:
Error !!!
Explanation:
- you haven't add a preprocessor #include <stdio.h>
- haven't declared type of function main which is intager and not returned value 0
- in conditional expression a >= 5 should be in parenthesis like (a >= 5)
#include <stdio.h>
int main () {
int a = 10 , b ;
b = (a >= 5) ? 100 : 200 ;
printf("%d\n", b );
return 0 ;
}
output wil be >>>
>>> 100
Similar questions