Program:

#include <stdio.h> 

int main(){ 
    int array[5] = { 0,1,2,3,4} ; 
    int * p1, **p2 ; 
    int * parray[2] = { NULL , NULL };
    p1= & array[2] ; 
    *p1 = 20 ; 
    p2 = & p1 ; 
    ** p2 = 30 ; 
    parray[0] = & array[0];  
    parray[1] = & **p2;  
    *parray[0] = 30 ;  
    *parray[1] = 300; 
}

Trace Table to Fill:

Example:
4a87987716fb73250a82a45dcdd802e8

The following table is where you will be tracing your program;
* Use ??? to denote an undefined value; e.g. non-initialized variable.
* Use error to denote the dereference of a NULL or undefined pointer.
* As for previous exam, a given line should only modify the columns of the variables which it modified. However, because we use pointers, you might have to modify other columns if your line just dereferenced a pointer to modify another variable.

Trace Table:
a115df082323dc75e815a8829116777f

What have you tried so far? What parts are you having problems with?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.