Question: Pointer variables are designed to hold addresses. Select a correct answer for the following code. int * getNum(){ int num1 = 0; num1 = num1+24;

Pointer variables are designed to hold addresses. Select a correct answer for the following code. int * getNum(){ int num1 = 0; num1 = num1+24; return &num1;} The getNum() function above returns integer 24 back to the caller The getNum() function above returns a pointer back to the caller, and the pointer can be used by the caller to access num 1. None of the above is correct. The getNum() function returns the address of a variable that no longer exists
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
