cout << padd?
What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
class Test {
float i,j;
};
class Add {
public:
int x,y;
Add (int a=3, int b=3) { x=a; y=b; }
int result() { return x+y;}
};
int main () {
Test test;
Add * padd;
padd = &test;
cout << padd?>result();
return 0;
}
A . It prints: 6
B . It prints: 9
C . Compilation error
D . It prints: 33
Answer: C
Latest CPA-21-02 Dumps Valid Version with 222 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments