123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <signal.h>
- #include <errno.h>
- #include <unistd.h>
- #include <time.h>
- #include <sys/wait.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- #define MS 1000000
- #define SIG_TIMER SIGRTMIN
- int main(int argc, char *argv[]){
- int i;
- float f[2],x[2];
- f[0] = 0.2;
- f[1] = 0.3;
-
- memcpy(&i, &f[0], sizeof(int));
- memcpy(&x[0], &i, sizeof(int));
-
-
- memcpy(&i, &f[1], sizeof(int));
- memcpy(&x[1], &i, sizeof(int));
- printf("x[0] = %0.2f x[1] = %0.2f\n",x[0],x[1]);
-
-
-
-
-
- return 0;
- }
|