Pointer to Pointer in C
Level 3103 keystrokes
Uses a pointer to a pointer (double pointer) to reach a value. The printed address differs between runs and machines.
C code
// The value at the end of the chain1int val = 100;// p holds the address of val2int *p = &val;// int ** is a pointer to an int pointer; pp holds the address of p3int **pp = &p;// **pp follows two steps, pp → p → val, and reads 1004printf("Value: %d\n", **pp);// *pp is p itself, the address of val; its value changes from run to run5printf("Address: %p\n", *pp);Output
Value: 100 Address: 0x7ffd5e8c3a4c
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this C code and how often they appear.
*× 6;× 5"× 4=× 3,× 2:× 2(× 2)× 2\× 2&× 2