Question: What is the difference between the memory associated with a1 and a2 in the code fragment below: int myFunc(int aval) { int al [5];

What is the difference between the memory associated with a1 and a2

 

What is the difference between the memory associated with a1 and a2 in the code fragment below: int myFunc(int aval) { int al [5]; int *a2; a2 new int [5]; // Deleted lines of code // return a1[0]; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

In the given code fragment there are two variables related to memory a1 and a2 Lets examine the diff... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!