Q233
What will be the output of the following C++ code? #include #include using namespace std; class A mutable int a; public: int assign(int i) const a = i; int return_value() const return a; ; int main(int argc, char const *argv[]) A obj; obj.assign(5); cout<<obj.return_value();
A.
5
AnswerB.
Error
C.
Segmentation fault
D.
Undefined value
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board