Examveda

What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int k = 8;
    int m = 7;
    k < m ? k = k + 1 : m = m + 1;
    printf("%d", k);
}

A. Compile time error

B. 9

C. 8

D. Run time error

Answer: Option A


This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Related Questions on C Fundamentals