智流提示 - 记录工作中的点点滴滴!!!

硬件巨头Intel笔试面试题目

时间:2006年09月26日  作者:本站编辑  点击:   加入收藏   有效营销

  智力题

1.每天中午从法国塞纳河畔的勒阿佛有一艘轮船驶往美国纽约,在同一时刻纽约也有一艘轮船驶往勒阿佛。已知横渡一次的时间是7天7夜,轮船匀速航行,在同一航线,轮船近距离可见。
请问今天中午从勒阿佛开出的船会遇到几艘从纽约来的船?

2.巴拿赫病故于1945年8月31日。他的出生年份恰好是他在世时某年年龄的平方,问:他是哪年出生的?

答案:

设他在世时某年年龄为x,则x的平方
struct bit
{ int a:3;
int b:2;
int c:3;
};
int main(int argc, char* argv<>)
{
bit s;
char *c = (char*)&s;
*c = 0x99;
cout
char
*reverse(char* str)
{
int len=0, i=0;
char *pstr=str, *ptemp,*pd;
while(*++pstr)
len++;
pstr--;
//ptemp=(char*)malloc(len+1);
ptemp=(char*)malloc(len+1);
pd=ptemp;
while(len--){
*ptemp=*pstr;
ptemp++;
pstr--;
i++;
}
*ptemp=*pstr;
ptemp++;
*ptemp='\\0';
return pd;
}
main()
{
char string<40>= “hello world!”;
char *pstr=string;
printf(“%s”, pstr);
printf(“%s”, reverse(pstr));
}

实验室笔试题
1.写出下列信号的奈亏斯特频率

(1)f(t)=1+cos(2000pait)+sin(4000pait)
(2)f(t)=sin(4000pait)/pait
(3)f(t)=(sin(4000pait)的平方)/pait

2.有两个线程

void producer()
{
while(1)
{
generatepacket();
putpacketintobuffer();
signal(customer);
}
}
void customer()
{
while(1)
{
waitforsignal();
if(packetinbuffer>10)
{
readallpackets();
processpackets();
}
}
}

(1)有没有其他方法可以提高程序的性能

(2)可不可以不使用信号之类的机制来实现上述的功能

3.优化下面的程序

(0)sum=0
(1)i=1
(2)t1=4*i
(3)t2=address(a)-4
(4)t3=t2
(5)t4=address(b)-4
(6)t5=4*i
(7)t6=t4
(8)t7=t3*t5
(9)sum=sum+t6
(10)i=i+1
(11)if i<20 goto (2) </

注意:本网所刊登的文章,均仅代表作者个人观点,并不代表本网立场。

相关文章

  • 没有相关内容!
  • 站长黑板报