What will be the output of the C++ program given below? #include using namespace std; class one{ int x,y; public: one(int x,int y){ this->x = x; this->y = y; } int sumMembers(){ return x+y; } }; int...


What will be the output of the C++ program given below?<br>#include <iostream><br>using namespace std;<br>class one{<br>int x,y;<br>public:<br>one(int x,int y){<br>this->x = x;<br>this->y = y;<br>}<br>int sumMembers(){<br>return x+y;<br>}<br>};<br>int main()<br>{<br>one o(1,2);<br>cout<<o.sumMembers();<br>return 0;<br>}<br>Options:<br>a) 1<br>b) 2<br>c) 3<br>d) Error<br>

Extracted text: What will be the output of the C++ program given below? #include using namespace std; class one{ int x,y; public: one(int x,int y){ this->x = x; this->y = y; } int sumMembers(){ return x+y; } }; int main() { one o(1,2); cout

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here