意法半导体笔试题目分享
面试笔试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;
-
奇码(Magima)笔试题目(收集篇)
收集一:一.填空1.集成电路的分类,按材料,工艺2.集成电阻的计算,以及其制造工艺,Vtn的正负判断,分别对于增强型和耗尽型电路功耗包括哪两个部分,功耗设计主要考虑的因素……(还有几道不记得了)二.填表全定制,门阵列,FPGA各自单元模块,连线的性质……三.填图CMOS工艺流程填图...
-
HSBC的Open Question
Pleasestatewhyyouchosetofollowtheseactivitiesandhowtheyhavecontributedtoyourpersonaldevelopment.Youmaywishtogivedetailsofyourrole,whetheranyoneelsewasinvolvedandanydifficultiesyouencountered.Pleasestatehowyouhavebenefitedfromyourworkexperie...
-
广东电网笔试题目
广东电网-电力科学研究院笔试(IT类)上一年在网上投的简历,前两天才通知,听那里的领导说,这单位好几年没有招员工了,今年情况比较特殊,刚开始招,时间是比较晚了。根据记忆写下些东西,希望对大家有用。s顺便积累点RP笔试:据说那里主要用J2EE了,所以考察的多数是JAVA,不过笔试...
-
五矿集团笔试经验
昨天中午,老板没有请我吃饭。我就自己去吃了吉野家,吃完饭之后,就在座位上看人来人往。开始的时候,我的右边坐的是一对情侣。不过还好,没有像大学食堂里面那么腻歪歪的相互喂饭。情侣走后,就来了几个甘家口商场的工作大妈。因为都是中年妇女,估计社会地位和工资都比较...