意法半導體筆試題目分享
面試筆試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;
-
筆試大唐和Moto
匆忙中又進行了兩門筆試,懷着不一樣的心理,做着同樣的事。星期天筆試Moto,從投簡歷到Moto一直以來從來沒有想過會有後面的事情,算自己走運,通過了簡歷篩選這一關進入第一輪的筆試。Moto的筆試分為兩輪進行,第一輪為軟素質測試,説白了就是智力測試,第二輪是真正的技術筆...
-
廣東電網筆試題目
廣東電網-電力科學研究院筆試(IT類)上一年在網上投的簡歷,前兩天才通知,聽那裏的領導説,這單位好幾年沒有招員工了,今年情況比較特殊,剛開始招,時間是比較晚了。根據記憶寫下些東西,希望對大家有用。s順便積累點RP筆試:據説那裏主要用J2EE了,所以考察的多數是JAVA,不過筆試...
-
三星筆試經驗外企筆試
三星筆試經驗寫得有點晚了,貌似過幾天還有人要筆試,寫些心得給後面筆試的朋友吧,也攢點RP^^我是11.8筆試的。三星筆試真的很嚴格的,進來時要核對身份證,髮捲子之前還要把身份證收上來在核對一遍。所以大家一定要記得帶身份證啊,不然很麻煩的。HR説大家一定要認真答,因...
-
聯想筆經
45道選擇題,限時39分鐘答完.....選擇題中:第一部分25道,限時20分鐘,考IQ常見的題目,例如告訴你前面兩個,讓你推第三個.....第二部分12道,限時7分鐘,5個選項讓你根據實際的邏輯排出最佳的順序....第三部分8道,限時12分鐘,都是計算題,有一道很經典的小明回家,爸...