Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main ()
{
    int a, b, c;
    a = 2;
    b = 7;
    c = (a > b) ? a : b;
    cout << c;
    return 0;
}

A. 2

B. 7

C. 9

D. 14

Answer: Option B


Join The Discussion

Related Questions on Classes and Objects in C plus plus