Q97
What will be the output of the following C++ code? #include using namespace std; class number int i; public: int geti(); void puti(int j); ; int number::geti() return i; void number::puti(int j) i = j; int main() number s; s.puti(10); cout << s.geti( ); return 0;
A.
10
AnswerB.
11
C.
20
D.
22
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board