I find the these answer but I am not sureif these are incorr
I find the these answer but I am not sure?if these are incorrect please explain
Num1=30
Num2=30
Ptr1=100
Ptr2=104
4. What are the values of num1, num2, ptr1 and ptr after execution of line 13? int num1, num2; int ptr1, ptr 2; Memory num1: 30 100 num1 104 num2 num2: 30 2 Line 7 ptr 1 # 1; 108 1000 ptrl ptr1: loo 112 104 ptr2 ptr2: 4 num1 10; After executing After executing of line 13 line num2 20; *ptr 1 30; ptr 40; Line 13 ptr2. ptr1 Solution
Your answer is right .
num1=30
num2=30
ptr1=100
ptr2=104
Line 13 doesnt change address of ptr2 .
It only assign value in address of ptr1 to address in ptr2
Hence making num2 also 30 .
