Ask Question
24 September, 12: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);

+4
Answers (1)
  1. 24 September, 12:31
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers