Given the following code, describe the diagram that would represent the situation with the variables: int A = 10; int B = 42; int* p; int* q; int* x; P = &A; q = &B; x = p; p = q; Two boxes - one with 10, one with 42 - and three arrows which all point to 42 Two boxes - one with 10, one with 42 - and two arrows pointing to 10 and one pointing to 42 Two boxes - one with 10, one with 42- and one arrow pointing to 10 and two pointing to 42 Two boxes - one with 10, one with 42 - and three arrows which all point to 10

icon
Related questions
Question
Given the following code, describe the diagram that would represent the situation
with the variables:
int A = 10;
int B = 42;
int* p;
int* q;
int* x;
p = &A;
q = &B;
x = p;
p = q;
Two boxes - one with 10, one with 42- and three arrows which all point to 42
Two boxes - one with 10, one with 42 - and two arrows pointing to 10 and one
pointing to 42
Two boxes - one with 10, one with 42- and one arrow pointing to 10 and two
pointing to 42
Two boxes - one with 10, one with 42 - and three arrows which all point to 10
Transcribed Image Text:Given the following code, describe the diagram that would represent the situation with the variables: int A = 10; int B = 42; int* p; int* q; int* x; p = &A; q = &B; x = p; p = q; Two boxes - one with 10, one with 42- and three arrows which all point to 42 Two boxes - one with 10, one with 42 - and two arrows pointing to 10 and one pointing to 42 Two boxes - one with 10, one with 42- and one arrow pointing to 10 and two pointing to 42 Two boxes - one with 10, one with 42 - and three arrows which all point to 10
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer