adplus-dvertising
frame-decoration

Question

Find output of the following program ?
#include<stdio.h>
int main()
{
    char str[] = "Smaller";
    int a = 100;
    printf(a > 10 ? "Greater" : "%s", str);
    return 0;
}

a.

Greater

b.

100

c.

Smaller

d.

Compile Error

Posted under C Programming

Answer: (a).Greater

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Find output of the following program ?