[ create a new paste ] login | about

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

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

int main(){

long int li = 0x42e9cccd;
double ff = (float) li;

int i = 0x42e9cccd;
float f = (float) i;

printf("double: %f\nfloat: %f\n\nlong i: %d\nint i: %d",ff, f,li,i);

return 0;
}


Output:
1
2
3
4
5
double: 1122618624.000000
float: 1122618624.000000

long i: 1122618573
int i: 1122618573


Create a new paste based on this one


Comments: