Vidyalelo
C++ Programming · Q4

Control Flow Statements in C++

Programming · C++ Programming · question 4

Q4

What will be the output of the following code: int x = 10; if (x > 5) cout << "Hello"; else cout << "Goodbye"; in C++?

A.
Compilation error
B.
HelloGoodbye
C.
Hello
Answer
D.
Goodbye

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board