Question OOP-CLS-0038
EasyWhat is the output of this code?
#include <iostream>
using namespace std;
class Point {
public:
int x, y;
};
int main() {
Point p;
p.x = 3;
p.y = 4;
cout << p.x * p.y;
}
- A.
12
- B.
34
- C.
Compilation error
- D.
7
Sign up free to see the answer and a step-by-step explanation.