delphi笔试题

 
发信人: copper (copper), 信区: job
标 题: Delphi CS笔试题(from 小百合)
发信站: 兵马俑BBS (Fri Oct 24 09:30:27 2003), 本站(bbs.xjtu.edu.cn)
 
 
1.List at least 3 sorts of programing languages you know.
 
2.List
most addressing methods inside 80x86 computer system you know.
 
3.
suppose:(DS)=2000H,(BX)=1250H,(SI)=528FH。
the displacement is 20A1H,
and (232F7H)=3280H,(264E5)=2450H.
then,
after excute inspector:JMP
TABLE[BX],(IP)=?
 
4.IRP X,(1,2,3,4,5,6,7,8,9,0)
 DB X
 ENDM
?the
result of above sentents compiled?
 
5.supposeed that comunication
telecommunication coding consisted of only 8 let
ters,the frequency of
each of these letters appearance is: 50,14,5,9,20,3,30,1
1 .please
design Huffman code for them.
 
6.what is the conditions of
dead-locking?what is the primary methods of resolv
e?
 
7......
 
面试的时
候要做自我介绍哦,基本上只围绕你的简历和答卷提问。有过工作经历的同学要
注意了,它会问为什么要离开?
是老美提问,旁边没有中国人,不过是很地道的
美语啦,比那个什么你杨说的英语好懂多
了,大家不要怕。
 
发信人: bomb (政治狂徒), 信区: job
标 题: delphi CS test1-10
发信站: 兵马俑BBS (Fri Oct 24 22:14:32 2003), 本站(bbs.xjtu.edu.cn)
 
1.how do you code an infinite loop in c?
While(1);
2. volatile:
        a)what does the keyword volatile mean?give an example
for   example,   status   registers
        b)can a parameter be both const and volatile? give an example
Yes     read-only   status   register  
        c)can a pointer be volatile?give an example
Yes,a   pointer   to   a   buffer  
3.what are the values of a,b,and c after the following instructions:
        int a=5,b=7,c
        c=a+++b;
a   =   6   b=7   c=   12  
4.what do the following declarations mean?
        a)const int a;
        b)int const a;
        c)const int *a;
        d)int *const a;
        e)int const *a const;
1.2.   a   const   integer.     3     a   pointer   to   a   const   integer   4   a   const   pointer   to   an   integer     5.a   const  pointer   to   a   const   integer  
5.which of the following statements describe the use of the keyword static?
        a)within the body of a function:a static variable maintains its value
          between function invocations
        b)within a module:a static variable is accessible by all functions
          within that module
        c)within a module:a static function can only be called by other
          functions within that module
6.Embedded systems always require the user to manipulate bits in register or
 variable.give an integer variable a,write two code fragments.The first
 should set bit 5 of a.The second should clear bit 5 of a.In both cases,the
 remaining bits should be unmodified.
7.what does the following function return?
        char foo(void)
        {
                unsigned int a=6;
                int b=-20;
                char c;
                (a+b>6)?(c=1):(c=0);
                return c;
        }
#define   BIT3   (0x1<<5)  
 static   int   a;  
 void   set_bit5   (void)  
 {  
 a   |=   BIT5;  
 }  
 void   clear_bit3(void)  
 {  
 a   &=   ~BIT5;  
 }
 
8.what values are printed when the following c program is executed?
        int i=8;
        void main(void)
        {
9.what will be the output of the following c code?
        main()
                int k,num=30;
                k=(num>5?(num<=10?100:200):500);
                printf("%d",k);
        }
200
10.what will the following c code do?
        int *ptr;
        ptr=(int *)0x67a9;
        *ptr=0xaa55;
11.what will be the output of the following c code?
        #define product(x) (x*x)
        main()
        {
                int i=3,j,k;
                j=product(i++);
                k=product(++i);
                printf("%d %d",j,k);
        }
12.simplify the following boolean expression
        !((i==12)||(j>15))
13.how many flip-flop circuits are needed to divide by 16?
14.provides 3 properties that make an os,a rtos?
15.what is pre-emption?
16.Assume the BC register value is 8538H,and the DE register value is 62A5H.
   Find the value of register BC after the following assembly operations:
        mov a,c
        sub e
        mov c,a
        mov a,b
        sbb d
        mov b,a
17.in the assembly code shown below
        loop:   mvi c,78H
                dcr c
                jnz loop
                hlt
 how many times is the dcr c operation executed?
18.describe the most efficient way(in term of execution time and code size)
   to divide a number by 4 in assembly language
19.what value is stored in m in the following assembly language code fragment
   if n=7?
                ldaa #n
        label1: cmpa #5
                bhi l3
                beq l2
                deca
                bra l1
        label2: clra
        label3: staa #m
20.what is the state of a process if a resource is not available?
21.using the #define statement,how would you declare a manifest constant that
   returns the number of seconds in a year?disregard leap years in your answer.
22.interrupts are an important part of embedded systems.consequently,many
   compiler vendors offer an extension to standard c to support interrupts.
   Typically,the keyword is __interrupt.the following code uses __interrupt
   to define an interrupt service routine(ISR).Point out problems in the code.
        __interrupt double compute_area(double *radius)
        {
                double area =PI*radius*radius;
                printf("/nArea=%f",area);
                return area;
        }
 
I finish typing it at last!
 
发信人: dalumian (牛之初性本土), 信区: job
标 题: DELPHI cs的考题--欲哭无泪
发信站: 兵马俑BBS (Fri Oct 24 22:01:44 2003), 转信(bbs.xjtu.edu.cn)
 
DELPHI的考题
用英文做答,
答错要倒扣分,
时间:40分钟
 
<<<总的感觉:只考C语言很极端的概念,不考任何数据结构和C++内容,考一大堆根本没见过的
汇编>>>
1,写出一个无限循环语句.
 
2,问a,b,c的结果, c=a+++b
 
3,写出含义:
        int const a;
        const int a;
        int const * a
        const int * a const
 
4,写出结果:
#define product(x) (x*x) 那么,
product(i++)
product(++i)
 
5,写出程序运行结果:
void main()
{
        int i;
 
6,写出程序运行结果:
void foo(){
        unsigned int c =6,
        int i = -20,
        printf("%d", c+i);
}
 
7, 写出操作系统的3个特性,RTOS的特性
 
8, 有关intel 80x86 汇编的加减法指令,写出输出
 
9, 写出除4的最快捷方法
 
10, what is the pre-emption?
 
11,如果除16,需要多少个触发器?(flip-flop)
此外,至少出了3个读汇编代码的题目.都是不认识的汇编语言,只记得其中有LDAA指令
 
发信人: atman (想飞的鱼), 信区: job
标 题: Delphi10月24日西工大笔试题(软件)
发信站: 兵马俑BBS (Fri Oct 24 23:06:36 2003), 转信(bbs.xjtu.edu.cn)
 
1. How do you code an infinite loop in C?
  2. Volatile:
  (1)What does the keyword volatile mean? Give an example
  (2)Can a parameter be both const and volatile? Give an example
  (3)Can a pointer be volatile? Give an example
  3. What are the values of a, b, and c after the following instructions:
  int a=5, b=7, c;
c = a+++b;
6 7 12 词法分析的贪婪法
  4. What do the following declarations mean?
  (1)const int a;
  (2)int const a;
  (3)const int *a;
  (4)int * const a;
(5)int const * a const;
 
  5. Which of the following statements describe the use of the keyword static?
  (1)Within the body of a function: A static variable maintains its value between function revocations
  (2)Within a module: A static variable is accessible by all functions within that module
  (3)Within a module: A static function can only be called by other functions within that module
  6. Embedded systems always require the user to manipulate bits in registers or variables. Given an integer variable a, write two code fragments.
  The first should set bit 5 of a. The second shnuld clear bit 5 of a. In both cases, the remaining bits should be unmodified.
  7. What does the following function return?
  char foo(void)
  {
   unsigned int a = 6;
   iht b = -20;
   char c;
   (a+b > 6) ? (c=1): (c=0);
   return c;
}
1
  8. What will be the output of the following C code?
  main()
  {
   int k, num= 30;
   k =(num > 5 ? (num <=10 ? 100:200): 500);
   printf(“%d”, k);
}
200
三元运算符,优先级从右到左
  9. What will the following C code do?
  int *ptr;
  ptr =(int *)Ox67a9;
*ptr = Oxaa55;
设置地址为 Ox67a9 的值为 Oxaa55
  10. What will be the output of the follow C code?
  #define product(x) (x*x)
  main()
  {
   int i = 3, j, k;
   j = product(i++);
   k = product(++i);
   printf(“%d %d”,j,k);
}
9 49
  11. Simplify the following Boolean expression
  !((i ==12) || (j > 15))
  12. How many flip-flop circuits are needed to divide by 16?
   13. Provides 3 properties that make an OS, a RTOS?
  14. What is pre-emption?
  15. Assume the BC register value is 8538H, and the DE register value is 62A5H.Find the value of register BC after the following assembly operations:
  MOV A,C
  SUB E
  MOV C,A
  MOV A,B
  SBB D
  MOV B,A
  16. In the Assembly code shown below
  LOOP: MVI C,78H
   DCR C
   JNZ LOOP
   HLT
  How many times is the DCR C Operation executed?
  17. Describe the most efficient way (in term of execution time and code size) to divide a number by 4 in assembly language
  18. what value is stored in m in the following assembly language code fragment if n=7?
   LDAA #n
  LABEL1: CMPA #5
   BHI L3
   BEQ L2
   DECA
   BRA L1
  LABEL2: CLRA
  LABEL3: STAA #m
  19. What is the state of a process if a resource is not available?
  #define a 365*24*60*60
  20. Using the #define statement, how would you declare a manifest constant that returns the number of seconds in a year? Disregard leap years in your answer.
  21. Interrupts are an important part of embedded systems. Consequently, many compiler vendors offer an extension to standard C to support interrupts. Typically, the keyword is __interrupt. The following routine (ISR). Point out problems in the code.
  __interrupt double compute_area (double radius)
  {
   double area = PI * radius * radius;
   printf(“/nArea = %f”, area);
   return area;
  }
 
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值