意法半导体软件测试笔试题分享
A Test for The C Programming Language
I. History
1. C was originally designed for and implemented on the (what) operating system on the DEC PDP-11, by (who) .
2. The most recently approved ANSI/ISO C standard was issued in (when) , and single line comments notation “//” is or isn’t a feature of C89.
II. Syntax and Semantics
1. In a runtime C program, auto variables are stored in , static variables are stored in , and function parameters are stored in .
a. stack b. heap c. neither stack nor heap
2. The statement “extern int x;” is a , and the keyword extern is used during .
a. variable declaration b. variable definition c. compilation time d. runtime
3. There is a complicated declaration: void ( * signal (int, void (*)(int)) ) (int);If a statement “typedef void (*p) (int);” is given, please rewrite this complicated declaration.
4. The following code is a segment of C program.
..........
void func(int *p)
{...........}
..........
main()
{
int num=0;
.........
func(&num);
........
}
..........
Here, the function argument “&num” is passed .
a. by value b. by reference
III. Practice
Create a tree, which has h (h>0) layers, and its each node has w (w>0) se complete the following incomplete solution.
#include <stdlib.h>
#include <string.h>
struct tree{
char info;
p_sub; //link to sub-nodes};
// allocate memory and initiate
void dnode ( struct tree* tmp )
{
= malloc( sizeof (struct tree) );
= 0x41;
= NULL;
}
struct tree *dtree (struct tree* subtree, int height, int width)
{
int i;
if (!subtree ) //if necessary, allocte memory for subtree
denode(subtree);
if ( height == 1 )
return subtree;
else if ( height == 2 ) {
struct tree *leaf = NULL;
for ( i=0; i<width; i++ ) {
denode ( );
;
leaf = NULL;}
return subtree;}
else {
for ( i=0; i<width; i++ ) {
}
return subtree;
}
}
main()
{
.........
struct tree *root = NULL;
root = dtree (root, h, w); // h and w are integers get from input
.........
}
-
交通银行笔经(北京大学)
数字部分:重点是做例题的时候,不要做完就完了,要对图表进行进一步的分析。比如说今天的折线图,一条线表示总产量,另一条表示其中一种产品的产量,那么我们要做的就是在草稿纸上算出另外一种产品的产量。其他类似。因为例题中的图表在后面会再次出现,这样做能够节省很多...
-
中国人民银行直属事业单位笔经
中国人民银行直属事业单位笔经我考的是经济金融类,昨天考的,记性不太好今天已经忘得差不多了,欢迎补充!!上午考的英语,下午专业。英语的我看见人大的bbs上有笔经,就不写了,顺便转过来就好了。就先说说经济金融专业的考试吧。第一部分是填空。比如商业银行的业务(吸收存...
-
沃尔玛笔试分享
Wal-Mart笔试刚从沃尔玛笔试回来立马抱了电脑上床了头痛……上午是说明会和填表在我看来有点多余主要就是在宣扬他家的企业文化下午分组笔试我是第一组1:30--2:30正是最瞌睡的时候做完出来只觉得头痛欲裂恶心想吐题目倒也不难,中译英,英译中,25道英文...
-
招商银行- 招商银行的笔试
招商银行-招商银行的笔试居然迟到了几十分钟,佩服工作人员的时间观念……笔试分为两部分,两个半小时,基础知识类似于公务员题,但添加了专业的内容,注重,还包括主观题;专业的部分就根据不同情况而定了,我们是营销类的,一道案例题。一道可选题,关于宏观经济政策的论述。第...