What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 8;
int m = 7;
int z = k < m ? k++ : m++;
printf("%d", z);
}
#include <stdio.h>
void main()
{
int k = 8;
int m = 7;
int z = k < m ? k++ : m++;
printf("%d", z);
}A. 7
B. 8
C. Run time error
D. 15
Answer: Option A

Join The Discussion