本站首页    管理页面    写新日志    退出

公告

You are all my reasons! 

桃李花林又一在

淫荡一日同风起,风骚直上九万里

仙子凌波微步罗衫飘忽十步一回头

我的最爱:网游,程序,文学

QQ:89636669


我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:一维空间
日志总数:163
评论数量:248
留言数量:33
访问次数:651509
建立时间:2007年10月24日




 [C++]EMC笔试题目,很值得做做【转】 

dskongenius 发表于 2008/11/9 22:45:48

转自http://topic.csdn.net/u/20080917/00/607a1362-c5cd-47d1-a8ce-b016a8f4c0b7.html?1151396135 去上海一家外企的面试题 不是很会 大家一起帮忙看看 就当是共同学习进步了 谢谢阿~~~ 22. In C, which of following definitions is correct in defining an array of pointers, with each item of this array being a pointer to function like int func(int *)? A. int (*p[20])(int *) B. int (*p)(int *)[20] C. int (*p)(int *[20]) D. int *(*p[20])(int *); E. None of the above. 23. In little-endian systems, what is the result of following C program? typedef struct bitstruct{ int b1:5; int :2; int b2:2; }bitstruct; void main(){ bitstruct b; memcpy(&b,”EMC EXAMINATION”,sizeof(b)); printf(“%d,%d\n”, b.b1, b.b2); } 24. In IA-32 systems, what is the result of following C program? #define MAX 255 int main(){ unsigned char A[MAX+1],i; for(i=0;i <=MAX;i++) A[i]=i; printf(“%d\n”,A[0]); Return 0; } A. 0 B. 255 C. 256 D. The program won’t return and will print nothing E. Compile error. 25. What is the result of following C program? int inc(int a){ return (++a); } typedef int (*FUNC1) (int in); int multi(int *a, int *b, int *c){ return (*c=*a**b); } typefef int (FUNC2) (int *, int *, int *); void show(FUNC2 fun, int arg1, int *arg2){ FUNC1 p=&inc; int temp=p(arg1); printf(“%d\n”,*arg2); } Main(){ Int a; Show(multi,10,&a); Return 0; } A.. 100 B. 110 C. 120 D. 130 E. None of the above 26. What will the following C function f2() print? void f1(char *s,.char *t){ if(*s==’\0’) return; *t=*s; f1(++s,++t); } void f2(){ char *s1=”The C Programming Language is good”; char *s2=”The C Programming Language”; char *t=(char *)malloc(strlen(s1)+1); memset(t,0,strlen(s1)+1); f1(s1,t); f1(s2,5); printf(“%s\n”,t); } A. egaugnaL gnimmargorP C ehT B. The C Programming Language C. 27 D. Doog si egaugnaL gnimmargorP C ehT E. The C Programming Language is good 27. In C++, Class A is defined simply as: Class A{}; What is results of calling sizeof(A)? A. 0 B. 1 C. 4 D. 64 E. None of the above 28. What will the following C++ function print? int func() { float a=1.0f; cout < <boolalpha < <( (int)a==(int &)a ) < <” ”; float b=0.0f; cout < <boolalpha < <( (int)b==(int &)b ) < <endl; } A. true true B. false false C. true false D. false true E. None of the above 29. Four people are in a group Alice says,”Exactly one of us is lying.” Bob says, ”Exactly two of us are lying.” Charles says, “Exactly three of us are lying.” Dick says, “All four of us are lying.” How many people in this group are lying? A. 0 B. 1 C. 2 D. 3 E. 4 30. Allen and Brenda, both have a note stuck on their forehead, with a positive integer number written on it .Both Allen and Brenda can see each other’s number. They also know that the two numbers have a difference of one. They are trying to figure out the number on their own forehead. Allen first says,”I don’t know my number.” Brenda says,” I don’t know my number either” Then Allen says “Now, I know my number” Brenda now says, “Yeah, I know my number also!” What is the number of Allen and Brenda? A. 2,1 B. 1,2 C. 3,2 D. 2,3 E. 4,3 31. The traveling gropu will consist of exactly three members to be selected from the seven pepole: A,B,C,D,E,F and G. The selection will be done according to the following conditiions: * Neither A nor B can be in the group unless the other is also in the group. *If C is in the group, the D must be in the group *E and F cannot sboth be in the group * If G is in the group, then A cannot be in the group Which of following is the travelling group? A. (C,E,G) B. (D,E,G) C. (C,D,A) D. (E,F,G) E. (A,B,G) 32. Two kinds of chemical material are stored in six buckets(each bucket has only one kind of chemical). The volumes of these buckets are: 8L, 13L, 15L, 17L, 19L and 31L. It is also known that the price of one chemical is twice that of the other. A man has purchased five of the buckets, and found that he spent the same amount money on each kind of chemical. Which bucket was left unsold? A. 8L B. 13L C. 15L D. 17L E. 19L


阅读全文(1889) | 回复(0) | 编辑 | 精华

 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.203 second(s), page refreshed 144752175 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号