⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 host-order.c

📁 嵌入式linux下
💻 C
字号:
/*Little Application to test processor's endian mode*/#include <stdio.h>int main(){	unsigned int a[1];	a[0] = 0x3344;	unsigned char *b = a;	unsigned char *c = (b+0x00000001);	printf("a:0x%x,b:0x%x,c:0x%x,a[0]:0x%x,*b:0x%0x,*c:0x%x\n",a,b,c,a[0],*b,*c);	if(*b == 0x33)  	printf("the host(processor) byte order is big-endian!\n");	if(*b == 0x44)  	printf("the host(processor) byte order is little-endian!\n");	printf("unsigned int:%d\n",sizeof(unsigned int));	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -