C++ OPERATOR | C++ FOUNDATION Question 7

Last Updated :
Discuss
Comments

What will be the output of the following C++ code?

#include <iostream>
using namespace std;
int main() {


    int a, b, c;
    a = 3;
    b = 9;
    c = (a > b) ? a : b;
    cout << "c: " << c;


    return 0;
}


 

2

7

9

14

Share your thoughts in the comments