以前的MOTO笔试题

南摩笔试题    

  1.what   packet   switching   provides   assured   delivery    

  a.   X.25     b.Frame   Relay       c.ATM       d.   ISDN    

     

  2.which   mthod   can   speed   up   the   access   memory   disk   virtual   memory?    

  a.   select   a   good   replacement   algorithm    

  b.   make   mapping   from   virtual   address   to   real   address   fast    

  b.   make   memory   accessing   time   shorten    

  d.   all   of   above    

     

  3.In   Unix,   how   many   files(including   directories)   at   maximum   can   be    

  contained   in   one   directory    

  a.   depends   on   the   i-node   space    

  b.   depends   on   the   file   length    

  c.   unlimited    

  d.   512    

     

  4.what   limits   the   sensitivity   of   a   receiver    

  a.   thernal   noise    

  b.   nois   figure   of   the   receiver    

  c.   phase   noise   in   the   receiver    

  d.   all   of   the   above    

     

  5.the   use   of   SIM   kard   in   GSM   mobile   phone    

  a.   identification   of   the   caller    

  b.   authentification   of   the   caller    

  c.    

  d.    

     

  6.   y(n)=a1*y(n-1)+b0*x(n)+b1*x(n-1)    

        w(n)=a1*w(n-1)+x(n)    

  求y(n)与w(n)两个信号的关系    

  a.                 b.                           c.                           d.    

     

  7.   int   i=5,j;    

        j=(++i)*(i--);    

        运行后i=   5   ,j=  36 

     

     

     

  补充几道    

  8.     int   a[]   =   {0,1,2,3,4};    

          int   *p[]   =   {a,a+1,a+2,a+3};    

          int   **pp   =   p;    

          假设a=8239150(记不清了,大概吧),p=8239168    

          *(pp++)-a   =   0;    

     

  9.int   a[100],i,*p=a;    

      for(i=0;i<100;i++)   a[i]=i;    

      for(i=0;i<100;i++)    

      {    

          *p=a[i];    

          g(&p);    

      };    

      for(i=0;i<100;i++)    

          printf("%d",a[i]);    

  };    

  void   g(int   **p);    

  {    

      **p++;    

      *p++;    

  }    

     

     

     

  10.下面函数的作用:    

  fun(char   *a,char   *b)    

  {    

  while   (*a++=*b++)    

      {};    

  return;    

  }    

     

  11.CDMA的分集方式    

  四个选项为空间分集、时间分集、频率分集、**分集等四选三的组合。    

     

  12.下面那项不属于PCB进程控制块的内容    

     

  13.抽象类的特点    

发信人: gegetony (待业青年,攒rp中……), 信区: Job

标  题: Re: 发以前的MOTO笔试题,为明天的笔试攒rp

发信站: 北邮人论坛 (Sat Nov  4 09:52:37 2006), 站内

 

motorola笔试题目

1.打印如下图案,共19行,只能有一个for循环(题目已经提供)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


           

for(i=0;i<19;i++)

{

 

}

 

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#define MAXSIZE 19

void main()

{

 int i,k;

 char ch;

 char format[30],stars[30],tmp[3];

 ch = '*';

 strcpy(stars,"");

 for(i=0; i<MAXSIZE; i++)

 {

  if(i <= MAXSIZE/2)

  {

   k = (MAXSIZE + 1)/2 - i;

   strcpy(format,"%");

   itoa(k,tmp,10);

   strcat(format,tmp);

   strcat(format,"c");

   if(i>0)

   {

    strcat(stars,"**");

    strcat(format,stars);

   }

   printf(format,ch);

   printf("/n");

  }

  else

  {

   k = i + 2 - (MAXSIZE + 1)/2;

   strcpy(format,"%");

   itoa(k,tmp,10);

   strcat(format,tmp);

   strcat(format,"c");

   stars[MAXSIZE -1 -(2*(i+1) - MAXSIZE -1)] = 0;

   strcat(format,stars);

   printf(format,ch);

   printf("/n");

  }

 }

 //getchar();

 //getchar();

}

 

注:printf格式%mc表示输入字符宽度为m位,左边补空格.

 

2.#define f1(n) (n)*(n)

int i=5;

int k=0;

k=f1(i++);

printf("%d %d",i,k);

 

输出结果:7 25

注:define宏不计算直接替换k=(i++)*(i++);

 

3.下面哪个for循环是无限循环

for(int i=010;i==10;i+=0)

for(int i=10;(i++^--i)==0;i+=0)

还有几个忘了

 

第一不是,因为010表示8进制,i=8;

第二是,因为i++^--i表示数字9与9进行异或运算,确实为0

注:以0x开头为16进制数,以0开头为8进制数.

 

4.Email relay 和Email access分别用了什么协议?

SMTP,POP3

注: SMTP:Simple MAIL Transfer Protocol,简单邮件传输协议,互联网上的电子邮件发送就是使用这个协议。SMTP open relay host:开放的SMTP中继主机——它很可能被恶意的人利用,来产生大量垃圾邮件.

POP3协议允许客户机通过(临时的或永久的)TCP/IP连接或其他网络协议的连接,从一个服务器(这时就称为POP3服务器)上获取电子邮件(E-MAIL),POP3不负责发送邮件.

5.in a mobile phone,软件运行期stack data (栈)存在于

A.rom, B .flash C .eeprom D.ram E .none of the above

答:D.ram。这题稍微涉及到一点硬件知识,ROM的全称是Read Only Memory,即只读存储器,flash ,eeprom都是ROM家族的一员,RAM是Random Access Memory的简称,意为随机存取存储器,也就是内存了。不管是堆还是栈都是放在内存里的。

6.int i;

int x=0x12345678;

unsigned char *p=(unsigned char *)&x;

for(i=0;i<sizeof(x);i++)

printf("%2x",*(p+i));

 

在80x86pc机器上运行结果

Sun Sparc Unix上运行结果

80x86系列机的堆栈的伸展方向是从高地址向低地址.堆栈操作都是字操作.数据入栈16位,高字节在前,低字节在后(即先压入高字节).出栈时,低字节在前,高字节在后(即低字节先出).低字节占低地址,高字节占高地址.  

Intel x86全部为little-endian字节顺序,即低字节的寄存器占用低内存地址线.

Sun Sparc Unix为big-endian字节顺序,即低字节寄存器占用高内存地址线.

 

x在PC机上的内存存放顺序为78 56 34 12,高字节在前,低字节在后,因此输出78563412

Sun Sparc Unix上输出12345678

7.char a[2][2][3]={{{1,6,3},{5,4,15}},{{3,5,33},{23,12,7}} };

 

for(int i=0;i<12;i++)

printf("%d ",_______);

空格处填上合适的语句,顺序打印出a中的数字

*(*(*(a+i/6)+(i/3%2))+i%3)

或者a[i/6][i/3%2][i%3]

将输出的序号依次写出一些,如000,001,002,010,011,012,100,101,102,110,111,112

 

8.void fun(char *a,char *b)

{

a=b;

(*a)++;

}

void main()

{

char s1='A',s2='a';

char *p1=&s1;

char *p2=&s2;

fun(p1,p2);

printf("%c%c",s1,s2);

请写出输出结果

Ab
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值