微软暑期实习笔试题
发信人: loccs(short), 信区: JobForum
发信站: 饮水思源 (2012年04月07日18:53:56 星期六)Choose部分是我自己做的答案,非标准答案.有些题目选项记不起来了,非常抱歉.
1. Selection sort 80 items, after 32 iterations, how many positions of items are determined?
Choose:32。
2. Which is used in sync process//thread in operation system?
A. Mutex box phore l procedure callChoose: AC
3. Size of a stack is 5, input is a sequence 1, 2, …, 7, which is possible output?
A. 1234567 B. 7654321 C.5643721 D. 1765432 E. 3217564Choose: AC
4. 010111001 * 011001 + 1101110 = ?
A. 0001010000111111 B. 0101011101110011 C. 0011010000110101Choose: A
5. What is the output of the follow code?
void main(int argc, char* argv[]) {
int i = 11;
int const *p = &i;
p++;
cout<<*p<
A. 11 B. 12 C. Garbage value D. Comipler error E. None of aboveChoose: C
6. Which code is correct?
C. vectorf() {
vectorv(3);
return v;
}
E. None of above
Choose: C
7. Which number has difference 78633 after 180-degree rotation?
A. 60918 B.91086 C. 18609 D. 10968 E.86901Choose: D
8 Which statement is true?
A. Inorder and preorder can determine a Binary treeB. Postorder and preorder can determine a Binary treeC. For almost sorted array, Insertion sort is more efficient than QuicksortD. If T(n)=2T(n/2)+⊖(n), Then T(n)=⊖(nLogn)E. none of above
Choose: ACD
9. Which statement is true?
A. Insertion and buble sort are not effient for large data setsB. The complexity of Quick Sort is O(n2) in worst caseC. It is needed 6 swap operations to sort sequence 7,6,5,4,3,2,1(ascending) by Selection sortD. Heap sort has two operations: Insertion and root deletionE. None of above
No choose
12. The output of the following code is 0 20 1 20, what are the type of a and b?
class Test{
____ int a;
____ int b;
Test(int _a, int _b) {a = _a; b=_b;}
}
void main() {
Test t1(0, 0), t2(1,1);
t1.b = 10;
t2.b = 20;
cout< A. static/const B. const/static C. __/static D. const static/static E. None ofabove Choose: C 13. A 3-order B-tree has 2047 key words, what is the maximum height? A. 11 B. 12 C. 13 D. 14no choose 14. Which can be used both to variable and function? A. static B. virtual C. extern D. inline E. constChoose: ACE 15. What is the output of the follow code? char * f(char *str, char ch) { char *it1 = str; char *it2 = str; while(*it2 != ) { while(*it2 == ch) { it2++; } *it1++ = *it2++; } return str; } int main(int argc, char* argv[]) { char *a = new char[10]; strcpy(a, "abcdcccd"); cout< return 0; } A. abdcccd B. abdd C. abcc D. abddcccd E. Access violationChoose: D 16. What is the complexity of the result call of power(b, e) in the follow code? int power(int b, int e) { if(e==0) return 1; if(e%2 == 0) return power(b*b, e/2); return b*power(b*b,e/2); } A. logarithmic B. linear C. quadratic D. exponenticalChoose: A 17. Take 2 cards from one full poker(52 cards, 26 red and 26 black) and half poker each, what is the probability of the event that two cards are both red? A. 1/2,1/2 B. 25/102,12/50 C. 50/51, 24/25 D. 25/51,12/25 E. 25/51,1/2Choose: B 18. How many kinds of output of stack with the input 1,2,…,n? B. C_2n^n-C_2n^(n+1) C. ((2n)!)/(n+1)n!n! D. n! E. noneChoose: C 19. What is the minimum time and space complexity to compute the Largest Increased Subsequence(LIS) of array? A. N^2,N^2 B. N^2,N C. NlogN,N D. N, N E. N,CChoose: C 20. What is the output of the follow code? struct Item{ char c; Item *next; }; Item* f1(Item* x){ Item *prev = NULL; Item *curr = x; while(curr) { Item *next = curr->next;curr->next = prev; prev = curr; curr = next; } return prev; } void f2(Item *x){ while(x){ cout x = x->next; } } int main(int argc, char* argv[]){ Item *x, d = {d, NULL}, c = {c, &d}, b = {b, &c}, a = {a, &b};x = f1(&a); f2(x); return 0; } Choose: dcba
-
享受了大学生补贴能不能申请安居房
补贴,是指一成员方政府或任何公共机构向某些企业提供的财政捐助以及对价格或收入的支持,以直接或间接增加从其领土输出某种产品或减少向其领土内输入某种产品,或者对其他成员方利益形成损害的政府性措施。接下来由小编为大家整理出享受了大学生补贴能不能申请安居...
-
如何打造最佳形象,在面试中脱颖而出
一、如何通过礼仪上的出色表现成为考官心中最佳形象(一)语言表述层面第一、要准确准确是指在答题过程中使用确切的词语恰当的表述自己的想法,切忌使用生僻的词语及一些华而不实的语句,多用自己的语言,要让考官感觉到你的真诚和良好的语言表达能力。第二、要精练言...
-
应届生面试问题解答?
经典面试问题解答问题一:请你自我介绍一下思路:1、这是面试的必考题目。2、介绍内容要与个人简历相一致。3、表述方式上尽量口语化。4、要切中要害,不谈无关、无用的内容。5、条理要清晰,层次要分明。6、事先最好以文字的形式写好背熟。问题二:谈谈你的家庭情况思路...
-
12.11MKMT 一面面试经历分享
面官说是今天下午5点之前如果没有消息的话,就没戏了!估计我又要被鄙视了!写点面经鼓励后来人吧!时间:12.11地点:静安希尔顿面试形式:群面面试战友:复旦1外贸3上交2上外1面官:一个HR一个MKmanager首先是一分钟的英文自我介绍,并结合自己对于MKMT的看法进行。大家基本就...