软件笔试题(A)姓名:学校:专业:电话:(如无特殊说明,以下所有测试内容都是基于32位嵌入式系统)1)程序的局部变量存在于中,全局变量存在于中,动态申请数据存在于中
2)如何用if来做零值比较inta:if(a==0)boola:floata:void*a:3)voidfunc(charstr[100]){printf(“%d”,sizeof(str));}输出结果是:有下列定义:charstr[]=“HelloWorld”;char*p=str;intn=10;void*ptr=malloc(100);请写出如下表达式的值:sizeof(str)=;sizeof(p)=;sizeof(n)=;sizeof(ptr)=;4)unsignedchar*p1;unsignedlong*p2;p1=(unsignedchar*)0x87000000;p2=(unsignedlong*)0x80010000;请问p1+5=;p2+5=;5)charstr[10];strcpy(str,"0123456789");产生什么结果
6)用C语句,让程序跳转到绝对地址0xFFFF0去执行7)已知一个数组array,用一个宏定义,求出数组的元素个数#defineARRAY_COUNT8)简要说明,为什么标准头文件都有类似以下的结构
#ifndef__INC_Honeywell_Debug#define__INC_Honeywell_Debug#ifdef__cplusplusextern"C"{#endif/*
*/#ifdef__cplusplus}#endif#endif/*__INC_Honeywell_Debug*/3/79)给定结构structtoken_t{chardigit:4;charindex:4;unsignedshortdata:8;unsignedlong