意法半导体笔试题目分享(软件测试)
面试笔试1.9W
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;
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;
-
KPMG笔试(复旦大学)
今天是先考的是verbal,貌似记得在精华区里看到的是25分钟35道题,到里那边才知道是25分钟看12段话做48道题,当时就郁闷了例题就做了4道错了1道。开始做的时候就在想精华区里看到的两段话真题会比例题简单的不要慌。做verbal的时候发现都看懂,笑着就做完了。汗汗汗汗...
-
工行数据中心面经--2006,北邮
工行数据中心面经--2006,北邮先说地点,在西三旗建材城东二里。确实如水母上说的,极其扎眼的一栋建筑物,就是没有什么标示(我学金融的同学说银行就是要让你觉得他们有钱)正题:和几个人在一个小会议室里瞎扯,等到10点,终于轮到了我这一组。(今天好希奇,是7vs3,而不是昨天那个...
-
我的第一次笔试-麦德龙储备干部 中大 2006-12-10
我的第一次笔试-麦德龙储备干部中大2006-12-106日晚上12点,打算查查邮件,然后上床睡觉,竟然惊喜的发现麦德龙发了一份邮件给我,邀请我去参加9日在中大的笔试,虽然在500强企业精英学子见面会投简历的时候,我就觉得去麦德龙实习的机会是有的,那个可爱的HRJJ还问了我寒假...
-
笔试浪潮软件研发
下午2点开始笔试的,先填写了一份浪潮的职位申请表,很多与我简历中的内容都重复,所以填写的有些不耐烦,后面几项还有点意思。是否可以外驻:可以是否服从岗位分配:否期望月薪:3000在进考场之前,跟门外几个一起来考试的谈了一会儿,据说浪潮给应届本科生的待遇是月薪1500,感...