Computer Science, asked by kaira71, 10 days ago

main(){ int a=10,b; b=a>=5?100:200;printf("%d\n",b);}​

Answers

Answered by purnapushkalam1991
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 thoratprathamesh015
1

Answer:

Error !!!

Explanation:

  1. you haven't add a preprocessor #include <stdio.h>
  2. haven't declared type of function main which is intager and not returned value 0
  3. 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
Geography, 5 days ago