笔试题(六)

1. Please choose the right statement about const usage:

A. const int a;  //const integer

B. int const a;  //const integer

C. int const *a; //a pointer which point to const integer

D. const int *a; //a const pointer which point to integer

E. int const *a;  //a const pointer which point to integer

const integer const pointer 的差别在于 const * 的左边还是右边

 

2.

答案:22221111

 

3. 1 of 1000 bottles of water is poisoned which will kill a rat in 1 week if the rat drunk a mount of the water. Given the bottles of water have no visual difference, how many rats are needed at least to find the poisoned one in 1 week?

A. 9          B. 10         C. 32               D. 999             E. None of the above

4. Which of following statement(s) equal(s) value 1 in C programming language?

A. the return value of main function if program ends normally.

B. return (7 & 1);

C. char *str = "microsoft"; return str == "microsoft";

D. return "microsoft" = "microsoft";

E. None of the above.

Don't know why A is wrong, return 0?

 

5. If you computed 32 bit signed integers F and G from 32 bit signed integers X using F = X/2 and G=(X>>1),and you found F!=G, this implies that

A. There is a complier error       B. X is odd        C. X is negative   

D. F - G = 1        E. G - F = 1

 

6. How  many rectangles you can find from 3*4 grid?

A.   18               B. 20                C.40                 D 60                  E. None of above is correct

 

7.  One line can split a surface to 2 part, 2 line can split a surface to 4 part. Give 100 lines, no tow parallel lines, no tree lines join at the same point, how many parts can 100 line split?

A. 5051            B. 5053               C. 5510                    D. 5511

   

分析:递推公式:x(n) - x(n-1) = n , x(0) = 1

 

8. Model-View-Controller(MVC) is an architectural pattern that frequently used in web applications. Which of the following statement(s) is(are) correct:

A. Models often represent data and the business logics needed to manipulate the data in the application

B. A view is a (visual) representation of its model. It renders the model into a form suitable for interaction, typically a user interface element.

C. A controller is the link between a user and the system. It accepts input from the user and instructs the model and a view to perform actions based on that input.

D. The common practice of MVC in web application is, the model receives GET or POST input from user and decides what to do with it, handing over to controller and which hand control to views(HTML- generating components)

E. None of the above

 

9. Given the following database table, how many rows will the following SQL statement update?

update Books set NumberOfCopies=NumberOfCopies+1 Where AuthorID in

Select AuthorID from Books

group by AuthorID

having sum(NumberOfCopies)<=8

A. 1            B. 2               C. 3                D. 4                E. 5

 

10. Given a set of N balls and one of which is defective (weighs less than others), you are allowed to weigh with a balance 3 times to find the defective. Which of the following are possible N?

A. 12               B. 16                     C. 20                        D. 24                          E. 28

每次分 3 .

转载于:https://www.cnblogs.com/zhouzhuo/p/3632739.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值