叠拓测试笔试题 yahoo测试类试题.doc

  1. 1、本文档共41页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
叠拓测试笔试题 yahoo测试类试题 下面是为您介绍的关于叠拓测试笔试题,请您对此进行参考: Instructions Please answer following questions in English, you can only use less than 60 minutes for this test 1. Preprocessor 10 points) a) Please define a Macro by using preprocess instruction #define in 16-bit machine, the constant is used to indicate how many seconds in one year. (To ignore the leap year) #define SEC_PER_YEAR (365*24*60*60UL) (Note: If you define it to be (365*24*60*60)UL, you maybe find that it does not pile well.) b) Please define a Macro, which is used to pare two parameters and return the smaller parameter. #define MIN(a, b) ((a)=(b)?(a):(b)) 2. What is the problem of the below code (5 points) #include string.h char* Func( void ) { char p[10]; strcpy( p, 111 ); return p; } This function can not return the string of 111. 3. Data declarations (10 points) Please define a variable according to the below requirement, for example Requirement: An integer Answer: int a; a) A pointer to an integer (1 point) int *a; b) A pointer to a pointer to an integer (1 point) int **a; c) An array of 10 integers (1 point) int a[10]; d) An array of 10 pointers to integers (1 point) int *a[10]; e) A pointer to an array of 10 integers (2 points) int (*a)[10]; f) A pointer to a function that takes an integer as an argument and returns an integer (2 points) int (*a)(int) g) An array of ten pointers to functions that take an integer argument and return an integer (2 points) int (*a[10])(int) 4. Whats the output of the function and why? (6 points) void foo(void) { unsigned int a = 6; int b = -20; (a+b 6) ? puts( 6) : puts(= 6); } Result:6 Reason: When a variable of integer operates with a variable of unsigned integer, the integer will be automatically converted to unsigned integer, so the -20 will be converted to be a large unsigned integer. 5. Const (9 points) In the following codes, there are some const, what is meaning of each them? a) const char *pa; The content of pa is read-only. b) char * const pc = ca;

文档评论(0)

raojun00006 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档