Ask Question
3 January, 11:27

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. 3 January, 12:35
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers