Ask Question
7 January, 04:23

Change the function definition for myint so that xyzfunc uses the same memory locations for myint as in the calling program.

a) void xyzfunc (∫ myint);

b) void xyzfunc (int &myint);

c) void xyzfunc (int * &myint);

d) void xyzfunc (∫ &myint);

+2
Answers (1)
  1. 7 January, 06:38
    0
    b) void xyzfunc (int &myint);

    Explanation:

    To use the same memory location as the variable in the calling function we have to pass the variable by reference means passing the same address to the function. So to do that we have use & operator which stands for address.

    We will do this as following:-

    void xyzfunc (int * myint);

    Hence the answer is option b.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Change the function definition for myint so that xyzfunc uses the same memory locations for myint as in the calling program. a) void ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers