I was trying to figure this problem out. I know that if the address for each variable were not in this problem, i =14 j = 7 p=14 q=7...How does adding in the address for this program affect the output of the variables?
Consider the program below. Fill in the values for variables 'i', 'j', 'p', 'q' after the
code fragment has executed. The table below shows the address of each variable
in memory (e.g. variable 'i' is stored at address 2000). For each answer, enter an integer left justified with no leading zeroes.
Code:i:2000 j:2004 p:2008 q:2012 i: j: p: q: int i = 12, j = 14; int *p, * q; p = &i; q = &j; *p = *q; *q = 7;