欢迎来到天天文库
浏览记录
ID:58819156
大小:31.50 KB
页数:7页
时间:2020-10-25
《C--求职笔试题汇总.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、C++求职笔试题汇总.txt永远像孩子一样好奇,像年轻人一样改变,像中年人一样耐心,像老年人一样睿智。我的腰闪了,惹祸的不是青春,而是压力。。。。。。当女人不再痴缠,不再耍赖,不再喜怒无常,也就不再爱了。华为笔试题1.请你分别画出OSI的七层网络结构图和TCP/IP的五层结构图。 2.请你详细地解释一下IP协议的定义,在哪个层上面?主要有什么作用?TCP与UDP呢? 3.请问交换机和路由器各自的实现原理是什么?分别在哪个层次上面实现的? 4.请问C++的类和C里面的struct有什么区别? 5.请讲一讲析构函数和虚函数的用法和作用。 6.全局变量和局部变量有什么区别?是怎么实
2、现的?操作系统和编译器是怎么知道的? 7.8086是多少位的系统?在数据总线上是怎么实现的?联想笔试题1.设计函数intatoi(char*s)。 2.inti=(j=4,k=8,l=16,m=32);printf(“%d”,i);输出是多少? 3.解释局部变量、全局变量和静态变量的含义。 4.解释堆和栈的区别。 5.论述含参数的宏与函数的优缺点普天C++笔试题1.实现双向链表删除一个节点P,在节点P后插入一个节点,写出这两个函数。 2.写一个函数,将其中的t都转换成4个空格。 3.Windows程序的入口是哪里?写出Windows消息机制的流程。 4.如何定义和实现
3、一个类的成员函数为回调函数? 5.C++里面是不是所有的动作都是main()引起的?如果不是,请举例。 6.C++里面如何声明constvoidf(void)函数为C程序中的库函数? 7.下列哪两个是等同的 intb; Aconstint*a=&b; Bconst*inta=&b; Cconstint*consta=&b; Dintconst*consta=&b; 8.内联函数在编译时是否做参数类型检查? voidg(base&b){ b.play; } voidmain(){ sons; g(s); return; }1.Howdoyoucodean
4、infiniteloopinC? 2.Volatile: (1)Whatdoesthekeywordvolatilemean?Giveanexample (2)Canaparameterbebothconstandvolatile?Giveanexample (3)Canapointerbevolatile?Giveanexample 3.Whatarethevaluesofa,b,andcafterthefollowinginstructions: inta=5,b=7,c; c=a+++b; 4.Whatdothefollowingdeclarationsmean?
5、 (1)constinta; (2)intconsta; (3)constint*a; (4)int*consta; (5)intconst*aconst; 5.Whichofthefollowingstatementsdescribetheuseofthekeywordstatic? (1)Withinthebodyofafunction:Astaticvariablemaintainsitsvaluebetweenfunctionrevocations (2)Withinamodule:Astaticvariableisaccessiblebyallfunction
6、swithinthatmodule (3)Withinamodule:Astaticfunctioncanonlybecalledbyotherfunctionswithinthatmodule 6.Embeddedsystemsalwaysrequiretheusertomanipulatebitsinregistersorvariables.Givenanintegervariablea,writetwocodefragments. Thefirstshouldsetbit5ofa.Thesecondshnuldclearbit5ofa.Inbothcases,therema
7、iningbitsshouldbeunmodified. 7.Whatdoesthefollowingfunctionreturn? charfoo(void) { unsignedinta=6; ihtb=-20; charc; (a+b>6)?(c=1):(c=0); returnc; } 8.WhatwillbetheoutputofthefollowingCcode? main() { intk,num=30;
此文档下载收益归作者所有