å®æ°1.0ãç´æ¥å¤æããæ¹æ³ã¯ç¡ãã®ã§ãå¤æ°ã«å ¥ãã¦ããããããcharé åã ã¨é¨ãããããªãã ä¾ï¼ï¼ union _t { double d; char c_a[1]; /*å é è¦ç´ ã®ã¢ãã¬ã¹ããåå¾ã§ããã°è¯ãã®ã§è¦ç´ ã¯ï¼åã§è¯ã*/ } data; int i; char *p; data.d = 1.0; p=data.c_a; for (i = 0;i < sizeof(double);i++) printf("0x%2.2x ",*p++); putchar('\n'); ä¾ï¼ï¼ double d = 1.0; char *p; p = (char *)&d; for (i = 0;i < sizeof(double);i++) printf("0x%2.2x ",*p++); putchar('\n');
{{#tags}}- {{label}}
{{/tags}}