All pastes #245667 Raw Edit

Anonymous

public c v1 · immutable
#245667 ·published 2006-11-11 07:08 UTC
rendered paste body
#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);}