ptr1
Copy the following program into ptr1.c
#include <stdio.h>
int main()
{
int i = 100;
int *p = &i;
*p = 200;
printf("i = %d\n", i);
return 0;
}
Modify the program so that it has an extra integer pointer variable
q which is also initialised to the address of i. Add code before the return
statement that doubles the variable i but you must do this by dereferencing
your pointer variable q (ie do not refer to i directly). Then print out the
value of i.