0 LIKES LikeUnLike
Hi, I need help with my exercise for C OOP class. Please help thanks!!! The following program displays 19 as its output. Please explain why? #include <iostream> using namespace std;int main() { int &mysub(int &); int k = 4; mysub(k) = 19; cout << k << endl; int * mysub(int *); // *(mysub(&k)) = 29; // StatementX // cout << k << endl; // StatementY return 0; } // main int &mysub(int &ref) { ref = 8; return ref; } // mysubALSO: Please complete mysub(int *) to make StatementX and StatementY work. The output displayed by StatementY will be 29.
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 1 answers.