意法半導體筆試題目分享(軟體測試)
面試筆試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;
-
百安居筆試題目
四種題型:1.情景模擬:(30分)如果你是滬太店木材部主管,手下有8名員工,10名廠方推銷員,今天是星期一你需要制定下週的排班,共有4個通道,100多件商品,每天分8:00-17:00以及11:00-20:00兩班,每個通道上都要有人,所有人都是做五休二。(1)下週有兩名員工休假各兩天。(2)你週三上午需要上門...
-
聯想筆經
45道選擇題,限時39分鐘答完.....選擇題中:第一部分25道,限時20分鐘,考IQ常見的題目,例如告訴你前面兩個,讓你推第三個.....第二部分12道,限時7分鐘,5個選項讓你根據實際的邏輯排出最佳的順序....第三部分8道,限時12分鐘,都是計算題,有一道很經典的小明回家,爸...
-
今天的benq筆試
今天參加了明基的筆試。這個公司是我們學校最近唯一一個大型公司的專場招聘,機會難得,正好還不限專業,一直等它來,今天終於來了。之前我查了好多關於它招聘的內容,大部分都是去年下半年的資訊。不知道這回一樣不就先準備著了。明基今天下午2.00在我們學校做的宣講。...
-
凱德筆試及一面(杭州)
昨天晚上筆試,夜裡十一點半通知第二天上午十點半面試。投了這麼多簡歷,終於有了迴音。其實筆試後並沒有報太大的希望,因為做完題後感覺不太好。筆試分為兩部分,第一部分20題,類似於公務員考試的行政能力測試,20分鐘完成,感覺時間挺緊,沒做完,好幾道題只能靠蒙,算是為公務...