[ create a new paste ] login | about

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

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

int main() {

   int sum = 17, count = 5;
   double mean;
   double *d;

   d = &mean;

   mean = (double) sum / count;
   printf("Value of mean : %f %d %f\n", mean, (int) *d, *d );
   return 0;
}


Output:
1
Value of mean : 3.400000 3 3.400000


Create a new paste based on this one


Comments: