Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // image28
- // gcc ptr-test.c -ffloat-store --std=c99 -o ptr-test
- // Still no luck there 000000M000000
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- int main()
- {
- unsigned int a[2];
- void *d;
- d=calloc(1,8);
- for(a[0]=0; a[0]<256; a[0]++)
- {
- memcpy(d,&a,8);
- for(a[1]=0; a[1]<256; a[1]++)
- {
- printf("%u.%u %lf\n",a[0],a[1],(double *)d); // OOOOOOMOOOOOOO
- }
- }
- return(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement