1 2 3 4 5 6 | void foo() { short int val = 0xFF00; char *char_pointer = (char *) &val; //This prints 0 in x86 (or x86_64) machines and ff in ppc (or ppc64) machines. printf("%x\n", *char_pointer); } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |