意法半導體軟件測試筆試題分享
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、現金出納員從銀行提取現金之後,應做什麼記賬憑證A、現金收款憑證B、現金付款憑證C、銀行存款收款憑證D、銀行存款付款憑證2、我國確定人民幣儲蓄利率的機構是:當然是中國人民銀行,其他選項我忘記了3、IP電話是通過...
-
Yahoo筆試歸來
週三接到筆試通知,開始很高興,但是後來發現越來越多的人收到了通知,開始懷疑是否投的都被叫去筆試了。這個咱管不着,做好自己的事情就可以了。到了現場,真的是有如新生報到一樣,四個大教室,當時以為這也罷了,但考完才知道後面還有另一場,不知道是隻有這兩場還是全天都在...
-
青牛華科筆試經歷
六點二十了,來參加北京青牛軟件的人還真夠多的。身邊到處都是華科的人,心裏又開始有些受不住了...呵呵。果然是數據庫與網絡的內容多,但不是太難卻易錯,不知道答得怎樣,因為卷子不夠工作人員與學生們不斷的溝通中。語言部分,我想都沒想要了JAVA的做,一看就傻了眼,隔壁...
-
中國人民銀行統計筆經
中國人民銀行統計筆經都是統計學原理,考的很基礎一、14個多選,一個一分。考了抽樣、第一類錯誤第二類錯誤、可決係數與相關係數關係、標準差、集中趨勢等基本概念。可惜都忘得差不多了,似是而非,瞎選。。。二、5個判斷題5分。四分位數之類的東西。三、填空,大概一空...