意法半導體筆試題目分享
面試筆試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;
-
意法半導體(上海)筆試歸來
那天是我第一次去紫竹的意法半導體,感覺相當之好。喜歡那種整個透明的建築風格,喜歡周圍空曠的環境。到了意法半導體的office裡,被招呼的挺好,讓我在那裡等面試官,還給我倒水喝:)等著等著,拿來了一張卷子,限時一個小時。題目有一定難度,和以前在學校的側重點很不一樣,做的...
-
浪潮的計算機硬體類筆試
今晚七點主樓參加的浪潮筆試,去的時候就有很多人,自己6點50去的以為很早了,沒想到那麼多人去得比我早。筆試是硬體B類,不知道A、B有什麼分別,也不知道有沒有C類。筆試題目是計算機硬體的知識,25個選擇,兩個問答,總之大部分都不會做,交卷的時候只能說一句不好意思。估計我的...
-
神州數碼筆經
剛剛神州數碼筆試回來關於這次筆試我可是所謂困難重重啊,差點棄了,但不管怎樣,總算考完了,現在談一下最近決定還是不考研了,準備找工作.關於暑期的實習生招聘,投了豪奪簡歷,神州數碼是第一個給我回的,也就意味著這是我的第一次筆試,所以我特別重視,網上查了好...
-
今天的benq筆試
今天參加了明基的筆試。這個公司是我們學校最近唯一一個大型公司的專場招聘,機會難得,正好還不限專業,一直等它來,今天終於來了。之前我查了好多關於它招聘的內容,大部分都是去年下半年的資訊。不知道這回一樣不就先準備著了。明基今天下午2.00在我們學校做的宣講。...