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