Modify via Pointer in C
Level 396 keystrokes
Modifies a variable's value through a pointer using the dereference operator.
C code
// num starts at 51int num = 5;// p holds the address of num2int *p = #// Writing through *p changes num itself, without using the name num3*p = 20;// num is now 20, not 5 (despite the label "Original")4printf("Original: %d\n", num);// *p reads the same memory, so it also shows 205printf("Via ptr: %d\n", *p);Output
Original: 20 Via ptr: 20
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.
;× 5"× 4*× 3=× 3,× 2:× 2(× 2)× 2\× 2%× 2