| 3 | using namespace std; |
| 4 | |
| 5 | int main() |
| 6 | { |
| 7 | int num = 10; |
| 8 | int * p1 = NULL, * p2 = NULL; // declaration, initialize to 0 |
| 9 | p1 = # // take the address of num, assign to p1 |
| 10 | p2 = # // take the address of num, assign to p2 |
| 11 | |
| 12 | cout << "num = " << num << endl; |
| 13 | |
| 14 | *p1 = 20; // assign to num |
| 15 | cout << "num = " << num << endl; |
| 16 | |
| 17 | *p2 = 30; // assign to num |
| 18 | cout << "num = " << num << endl; |
| 19 | |
| 20 | return 0; |
| 21 | } |
nothing calls this directly
no outgoing calls
no test coverage detected