意法半導體筆試題目分享
面試筆試1.5W
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 a runtime C program, auto variables are stored in , staticvariables 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 a runtime C program, auto variables are stored in , staticvariables 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,感...