Computer Science, asked by mohitzope19, 25 days ago

Write output of following program
#include <stdio.h>
void main()
{
int k = 8;
int m= 7;
int z=k<m ? k++ : m++;
printf("%d", z);
}​

Answers

Answered by swati2308singh
1

Answer:

Given output: %d is 8

Explanation:

If value of k is smaller than m then :

True condition : k++

False condition : m++

*As k is greater than m , condition false.So,output will be m++,i.e,7+1 =8.

Hope it helped you.!

Similar questions