[ create a new paste ] login | about

Link: http://codepad.org/JJL7eab5    [ raw code | output | fork ]

rafekett - C, pasted on May 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>

void f(double *);

void f(double *d)
{
    *d = 7.5;
}

int main()
{
    double p = 0;
    printf("%f\n", p);
    f(&p);
    printf("%f\n", p);
    return 0;
}


Output:
1
2
0.000000
7.500000


Create a new paste based on this one


Comments: