嵌入式软件工程师C语言笔测试试题

嵌入式软件工程师C语言笔测试试题

ID:45683568

大小:184.50 KB

页数:9页

时间:2019-11-16

嵌入式软件工程师C语言笔测试试题_第1页
嵌入式软件工程师C语言笔测试试题_第2页
嵌入式软件工程师C语言笔测试试题_第3页
嵌入式软件工程师C语言笔测试试题_第4页
嵌入式软件工程师C语言笔测试试题_第5页
资源描述:

《嵌入式软件工程师C语言笔测试试题》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、嵌入式软件工程师C语言笔试题————————————————————————————————作者:————————————————————————————————日期:2软件笔试题(A)姓名:学校:专业:电话:(如无特殊说明,以下所有测试内容都是基于32位嵌入式系统)1)程序的局部变量存在于中,全局变量存在于中,动态申请数据存在于中。2)如何用if来做零值比较inta:if(a==0)boola:floata:void*a:3)voidfunc(charstr[100]){printf(“%d”,sizeof(str

2、));}输出结果是:有下列定义:charstr[]=“HelloWorld”;char*p=str;intn=10;void*ptr=malloc(100);请写出如下表达式的值:sizeof(str)=;sizeof(p)=;sizeof(n)=;sizeof(ptr)=;Countycontinuationrecordshasexaminedandapprovedthedraft,spirit,believe,comprehensiveYearbookofzhuanglangalreadyprepareddraf

3、t,enteredthephaseofevaluation.Civilairdefensework9/9unsignedchar*p1;unsignedlong*p2;p1=(unsignedchar*)0x87000000;p2=(unsignedlong*)0x80010000;请问p1+5=;p2+5=;1)charstr[10];strcpy(str,"0123456789");产生什么结果?为什么?2)用C语句,让程序跳转到绝对地址0xFFFF0去执行3)已知一个数组array,用一个宏定义,求出数组的元素

4、个数#defineARRAY_COUNT4)简要说明,为什么标准头文件都有类似以下的结构。#ifndef__INC_Honeywell_Debug#define__INC_Honeywell_Debug#ifdef__cplusplusextern"C"{#endif/*...*/#ifdef__cplusplus}#endif#endif/*__INC_Honeywell_Debug*/Countycontinuationrecordshasexaminedandapprovedthedraft,spirit,be

5、lieve,comprehensiveYearbookofzhuanglangalreadyprepareddraft,enteredthephaseofevaluation.Civilairdefensework9/9给定结构structtoken_t{chardigit:4;charindex:4;unsignedshortdata:8;unsignedlongtick;};问sizeof(token_t)=1)在空白处填写完整强制类型转换short(*day_p)[16];day_p=()malloc();2)

6、简述:TCP/UDP有何区别?TCP/IP通信建立的过程怎样?端口有什么作用?3)找出下列嵌入式系统中断处理函数中的错误:__interruptdoublecompute_area(doubleradius){doublearea=PI*radius*radius;printf("Area=%f",area);returnarea;}4)请写一个宏,若处理器是Big_endian的,则返回0;若是Little_endian的,则返回1Countycontinuationrecordshasexaminedandapp

7、rovedthedraft,spirit,believe,comprehensiveYearbookofzhuanglangalreadyprepareddraft,enteredthephaseofevaluation.Civilairdefensework9/91)数组a[N],存放了1至N-1个自然数,其中某个自然数重复一次。写一个函数,找出被重复的数字。要求:(时间复杂度为O(N),可用一种或一种以上方法)函数原型:intdo_dup(inta[],intN)Countycontinuationrecords

8、hasexaminedandapprovedthedraft,spirit,believe,comprehensiveYearbookofzhuanglangalreadyprepareddraft,enteredthephaseofevaluation.Civilairdefensework9/9基于如下数据结构,实现环形缓冲区的读写函数#d

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。