Vidyalelo
C++ Programming · Q62

Variables and Data Types in C++

Programming · C++ Programming · question 62

Q62

What will be the output of the following C++ code? #include using namespace std; int main() int x = -1; unsigned int y = 2; if(x > y) cout << "x is greater"; else cout << "y is greater";

A.
x is greater
Answer
B.
y is greater
C.
implementation defined
D.
arbitrary

Answer: Option A

Solution

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