题目是自己做的,求讨论、吐槽、拍砖
1. Which of the following callingconvension(s) support(s) support variable length parameter(e.g. printf)? (3Points)
A. cdecl B. stdcall C_pascal D. fastcall
分析:<来自百科>
__cdecl 是C Declaration的缩写(declaration,声明),表示C语言默认的函数调用方法:所有参数从右到左依次入栈,这些参数由调用者清除,称为 手动清栈。被调用函数不会要求调用者传递多少参数,调用者传递过多或者过少的参数,甚至完全不同的参数都不会产生编译阶段的错误。2_ What’s the output of thefollowing code?(3 Points)
A: B::f() B::f() const B: B::f() A::f() const C: A::f() B::f() const D: A::f() A::f() const
3. What is the different between a linked list and an array?
A. Search complexity when both are sorted
B. Dynamically add/remove
C. Random access effficiency
D. Data storage type
4. About the Thread and Process in Windows, which description(s) is (are) correct:
A. One application in OS must have one Process, but not a necessary to have one Thread.
B. The Process cound have its own Stack but the thread only could share the Stack of its parent Process.
C. Thread must belongs to a Process
D. Thread could change its belongiing Process
5_ What is the output of the following code?
A. 10, 10 B. 10, 11 C. 11, 10 D. 11. 11
分析:该代码为定义,但是结果是D。
6. For the following Java or C# code
int[][] myArray3 = new int[3][]{ new int[3{5,6,2}, new int[5{6,9,7,8,3}, new int[2{3,2} };what will
myArray3[2][2]returns?
A. 9 B. 2 C. 6 D. overflow
7. 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
8_ Given the following code:
which is the correct result?
A. 11111111 B. 12121212 C. 11112222 D.21212121
答案:22221111
9. 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
10. 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.
11. 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
12. How many rectangles you can find from 3*4 grid?
A. 18 B. 20 C.40 D 60 E. None of above is correct
13. 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
14. Which of the following sorting algorithm(s) is (are) stable sorting?
A. bubble sort B. quicksort C. heap sort D. merge sort E. Selection sort
15. 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
16. We can reover the binary tree if given the ouput of
A. Preorder traversal and inorder traversal
B. Preorder traversal and postorder traversal
C. Inorder traversal and postorder traversal
D. Postorder traversal
17. Given a string with n characters, suppose all the characters are different from each other, how many different substrings do we have?
A. n+1 B. n^2 C. n(n+1)/2 D. 2^n -1 E. n!
18. 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)<=8A. 1 B. 2 C. 3 D. 4 E. 5
19. What is the shortest path between node S and node T, given the graph below? Note: the numbers represent the length of the connected nodes.
[attach]80598[/attach]欢迎光临 应届生求职招聘论坛 (https://bbs.yingjiesheng.com/) | Powered by Discuz! X3.2 |