Home Page

Milestone 4: VP diagram
Practice Test


Your
Name
Your
ID
Mentor
Name
Mentor
ID
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* M4: VP diagram e.g.*/
#include <stdio.h>
int main(void){
  int fred, barney, wilma;
  int *pebbles, *bambam; 
  int **dino; 
  fred = 1;
  barney = 2;
  pebbles = &fred;
  bambam = &barney;
  dino = &bambam;  
  wilma =  **dino+barney;
  return(0);
}

→ Draw the variable-pointer diagram after line 12 of the code executes.

→ 在程式碼執行第12行後繪製變數指標圖。

Solution