国产精品一久久香蕉产线看-国产精品一区在线播放-国产精品自线在线播放-国产毛片久久国产-一级视频在线-一级视频在线观看免费

應(yīng)屆大學(xué)生面試技巧嵌入式方面3

時間:2022-07-12 03:05:16 面試 我要投稿
  • 相關(guān)推薦

應(yīng)屆大學(xué)生面試技巧嵌入式方面(3)

作為一個即將畢業(yè)的大學(xué)生,在外地實習(xí)找工作確實是一件很痛苦的事情,我們沒有很強(qiáng)的技能(除過那些很BT的家伙),沒有一定的社會閱歷,甚至沒有一點家庭背景.但是作為企業(yè)來說,他們在很大程度上也都是很了解應(yīng)屆大學(xué)生的,他們對我們的要求不是很高,除非有的公司是想刁難你,但是這樣的事情是很少發(fā)生的,

應(yīng)屆大學(xué)生面試技巧嵌入式方面(3)

我就我在北京的一些找工作的經(jīng)驗和學(xué)習(xí)到的一些知識分享給大家,僅代表一家之言,不足之處請大家指正.

 

操作篇:發(fā)些代碼給大家做做筆試參考.

1.下面的代碼輸出是什么,為什么?

void foo(void)
{ unsigned int a = 6;
int b = -20;
(a+b > 6) puts("> 6") : puts("<= 6");
}

2.評價下面的代碼片斷:

unsigned int zero = 0;
unsigned int compzero = 0xFFFF;

對于一個int型不是16位的處理器為說,上面的代碼是不正確的。應(yīng)編寫如下:

unsigned int compzero = ~0;

3.求輸出char *ptr;
if ((ptr = (char *)malloc(0)) == NULL)
puts("Got a null pointer");
else
puts("Got a valid pointer");

4.C語言同意一些令人震驚的結(jié)構(gòu),下面的結(jié)構(gòu)是合法的嗎,如果是它做些什么?
int a = 5, b = 7, c;
c = a+++b;

5.What will print out?

main()
{ char *p1=“name”;
char *p2;
p2=(char*)malloc(20);
memset (p2, 0, 20);
while(*p2++ = *p1++);
printf(“%sn”,p2);

}

Answer:empty string.

What will be printed as the result of the operation below:

main()
{ int x=20,y=35;
x=y++ + x++;
y= ++y + ++x;
printf(“%d%dn”,x,y);
}

Answer : 5794

What will be printed as the result of the operation below:

main()
{ int x=5;
printf(“%d,%d,%dn”,x,x<<2,x>>2);
}

Answer: 5,20,1

What will be printed as the result of the operation below:

#define swap(a,b) a=a+b;b=a-b;a=a-b;
void main()
{ int x=5, y=10;
swap (x,y);
printf(“%d %dn”,x,y);
swap2(x,y);
printf(“%d %dn”,x,y);
}

int swap2(int a, int b)
{ int temp;
temp=a;
b=a;
a=temp;
return 0;

}

Answer: 10, 5
10, 5

What will be printed as the result of the operation below:

main()
{ char *ptr = ” Cisco Systems”;
*ptr++; printf(“%sn”,ptr);
ptr++;
printf(“%sn”,ptr);
}

Answer:Cisco Systems
isco systems

What will be printed as the result of the operation below:

main()
{ char s1[]=“Cisco”;
char s2[]= “systems”;
printf(“%s”,s1);
} Answer: Cisco

What will be printed as the result of the operation below:

main()
{ char *p1;
char *p2;
p1=(char *)malloc(25);
p2=(char *)malloc(25);

strcpy(p1,”Cisco”);
strcpy(p2,“systems”);
strcat(p1,p2);

printf(“%s”,p1);

}

Answer: Ciscosystems

The following variable is available in file1.c, who can access it?:

static int average;

Answer: all the functions in the file1.c can access the variable.

WHat will be the result of the following code?

#define TRUE 0 // some code
while(TRUE)
{

// some code

}

Answer: This will not go into the loop as TRUE is defined as 0.

What will be printed as the result of the operation below:

int x;
int modifyvalue()
{ return(x+=10);
} int changevalue(int x)
{ return(x+=1);
}

void main()
{ int x=10;
x++;
changevalue(x);
x++;
modifyvalue();
printf("First output:%dn",x);

x++;
changevalue(x);
printf("Second output:%dn",x);
modifyvalue();
printf("Third output:%dn",x);

}

Answer: 12 , 13 , 13

What will be printed as the result of the operation below:

main()
{ int x=10, y=15;
x = x++;
y = ++y;
printf(“%d %dn”,x,y);
}

Answer: 11, 16

What will be printed as the result of the operation below:

main()
{ int a=0;
if(a==0)
printf(“Cisco Systemsn”);
printf(“Cisco Systemsn”);
}

Answer: Two lines with “Cisco Systems” will be printed.

再次更新C++相關(guān)題集

6. 以下三條輸出語句分別輸出什么?[C易]
char str1[] = "abc";
char str2[] = "abc";
const char str3[] = "abc";
const char str4[] = "abc";
const char* str5 = "abc";
const char* str6 = "abc";
cout << boolalpha << ( str1==str2 ) << endl; // 輸出什么? 0
cout << boolalpha << ( str3==str4 ) << endl; // 輸出什么? 0
cout << boolalpha << ( str5==str6 ) << endl; // 輸出什么? 1

7.寫一個函數(shù),反映出電腦是大端存儲(BIG_ENDER)還是小端存儲(LITTLE_ENDER)?

8.不用庫函數(shù),編寫函數(shù)strcmp()和strcat() strcpy()

9.折半查找函數(shù)?

10.int fun(int *p)和int fun(int p)區(qū)別?

11.struct

{

bit a;

char b;

int c;

float d;

}a;

求sizeof(a)=?

12.int main(int argc,char *argv[])
{
int c=9,d=0;
c=c++%5;
d=c;
printf("d=%d\n",d);
return 0;
}
a) 寫出程序輸出
5
b) 在一個可移植的系統(tǒng)中這種表達(dá)式是否存在風(fēng)險?why?
13 .# include "stdio.h"
int a=0;
int b;
static char c;
int main(int argc,char *argv[])
{
char d=4;
static short e;

a++;
b=100;
c=(char)++a;
e=(++d)++;
printf("a=%d, b=%d, c=%d, d= %d, e=%d",a,b,c,d,e);
return 0;
}
a) 寫出程序輸出
以前學(xué)過c++,這個是可以的 e=(++d)++;
現(xiàn)在才發(fā)現(xiàn)在c中,這是不行的
a=2, b=100, c=2, d= 6, e=5
b) 編譯器如果安排各個變量(a,b,c,d)在內(nèi)存中的布局(eg. stack,heap,data section,bss section),最好用圖形方式描述。
data section: a
bss section: b,c,e
stack d
在采用段式內(nèi)存管理的架構(gòu)中,數(shù)據(jù)段(data segment)通常是指用來存放程序中已初始化的全局變量的一塊內(nèi)存區(qū)域。數(shù)據(jù)段屬于靜態(tài)內(nèi)存分配。

在采用段式內(nèi)存管理的架構(gòu)中,BSS段(bss segment)通常是指用來存放程序中未初始化的全局變量的一塊內(nèi)存區(qū)域。BSS是英文Block Started by Symbol的簡稱。BSS段屬于靜態(tài)內(nèi)存分配。

 

主站蜘蛛池模板: 亚洲青草 | 亚洲成人手机在线 | 精品偷国情拍在线视频 | 天天摸日日摸 | 88影视在线观看污污 | 国产精品成久久久久三级 | 女人找男人皮日日视频 | 色综久久天天综合绕视看 | 一级aaa级毛片午夜在线播放 | 鲁丝片一区二区三区免费 | 中文字幕制服丝袜 | 色综合综合在线 | 色狠狠色综合久久8狠狠色 色狠狠成人综合网 | 欧美综合第一页 | 日韩精品免费在线观看 | 人人添人人澡人人澡人人诱 | 午夜天堂视频 | 手机在线成人精品视频网 | 日韩精品www | 婷婷久久久五月综合色 | 在线免费资源 | 99pao在线视频成精品 | 亚洲成a人片在线观看导航 亚洲成a人片在线观看精品 | 亚洲日本中文字幕一本 | 一级片中国 | 欧美成人另类人妖 | 免费看一片 | 国产成人综合高清在线观看 | 黄色免费网站在线播放 | 久久久久久久久综合影视网 | 国产盗摄一区二区欧美精品 | 欧美精品亚洲网站 | 激情影院网站 | 黄色三级视屏 | 国内精品视频成人一区二区 | 亚洲欧美视频一级 | 国产成在线观看免费视频 | 韩国午夜影院 | 色视频免费网站 | 成人一区二区免费中文字幕 | 欧美国产丝袜日韩精品 |