Question: #include int** p; int** q; int main() { int* a; int* b; a = (int*) malloc(sizeof(int)); // memory 1 b = (int*) malloc(sizeof(int)); // memory

#include int** p; int** q; int main() { int* a; int* b; a = (int*) malloc(sizeof(int)); // memory 1 b = (int*) malloc(sizeof(int)); // memory 2 *b = 42; // point 1 a = (int*) malloc(sizeof(int)); *b = *a; p = &a; q = &b; // point 2 } Assume all un-initialized pointers are equal to NULL.

Draw the box and circle diagram at point 1.

What are the aliases at point 1?

Draw the box and circle diagram at point 2.

What are the aliases at point 2?

*Last digit is 1*

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!