Question: Consider the following variables in a program: 1 static int A ; 2 3 int main ( ) { 4 int B ; 5 int
Consider the following variables in a program:
static int A ;
int main
int B ;
int C new int ;
foo C ;
return ;
void foo int ptr
int D ;
int E ptr ;
delete E ;
print ;
pts Identify the storage allocation staticstackheap for the following variables:
A B C D E Pointer to C and Pointer to E
pts Consider the following execution trace:
For each of the following line numbers, list all active variables allocated but not yet
deallocated after the execution of that line. Mention the pointer variables and
the objects they point to
Example output for Line : A B Pointer C Object pointed by C
Line
Line
Line
Line
Line
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
