Anonymous
public c v1 · immutable#include <stdio.h>void add(int *x){ *x = *x + 1;}int main(){ int num = 0; add(&num); int num2 = 15; int *ptr; // integer pointer - points to an int, stores a memory address ptr = &num2; // pointer now holds the address of num num2 = 20; // i is now 20 *ptr = 22; add(&num2);}