+ 2
What is the output of this code
int k, num=25; k = (num<10)?100:200; printf ("%d\n" , k);
8 odpowiedzi
+ 4
Sure
+ 9
Did you need the output, or you wanted to know why the output is whatever it is? If you wanted to get the output, you could've run it in the code playground... 😁👍
+ 4
Can you explain me?
+ 4
Thanks
+ 3
It's ternary operation equivalent
If( num < 10)
{ k = 100;}
else
{k = 200;}
+ 3
Please do not write a sentence in Relevant Tags, tags are used for search feature, and use of or existence of irrelevant words breaks the functionality.
Hope you understand 👍
P.S. You can also use Code Playground to check for your doubt : )
+ 2
200
+ 2
Welcome!