意法半导体软件测试笔试题分享
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
.........
}
-
盛大笔试题--技术类
大概两周前,盛大叫我去他们公司笔试(技术累的),一共有四题,1,与sql有关的查询,还要写一段asp来发布查询的内容,2,C程序差错,是两道指针的题目,主要是错在临时变量和只想为止区域,3,C基础,主要是写几个类,体现出继承,多态等面向对象的特性,4,与socket有关的,好像是先用广播的方式...
-
笔试应对技巧大集合
笔试是一种常用考核办法,目的是考核应聘人员的文字能力,知识面和综合分析事物的能力。它通常用于一些专业技术要求很强和对录用人员素质要求很高的单位,如一些涉外部门、技术要求很高的专业公司双及国家机关选聘公务员等。(一)常见的笔试种类目前常见的笔试种类:1...
-
沃尔玛笔试分享
Wal-Mart笔试刚从沃尔玛笔试回来立马抱了电脑上床了头痛……上午是说明会和填表在我看来有点多余主要就是在宣扬他家的企业文化下午分组笔试我是第一组1:30--2:30正是最瞌睡的时候做完出来只觉得头痛欲裂恶心想吐题目倒也不难,中译英,英译中,25道英文...
-
详版金地笔试题
详版金地笔试题发信人:greenmoss(青苔),信区:Work公文筐测试笔试题1测试一:现在已经是11月了,你手里有一大堆的任务要去做,这些任务是:1.各个公司开始来学校开招聘会,你想参加;2.你在一个公司做兼职;3.收到一些公司的面试通知;4.和男/女朋友约会;5.参加学校组织的一些活...