Saturday, March 14, 2009

Microsoft Paper


Paper Type : Technical - C & C++
Test Date : 5 September 2008
Posted By : Sruthi

MICROSOFT PAPER ON 5TH SEPTEMBER,2008

Question 1. [10]
Find the output of the following program segment
#include
char *c[]={“ENTNG”, “NST”,”AMAZI”,”FIRBE”};
char** cp[]={c+3, c+2, c+1, c};
char ***cpp= cp;
void main() {
printf(“%s”,**++cpp);
printf(“%s “,*--*++cpp+3);
printf(“%s”,*cpp[-2]+3);
printf(“%s”,cpp[-1][-1]+1);
}

Question 2. [5]
Write a function delete(struct node** Head) to delete the linked list node by node by deallocating them from the memory and at the end assign the head pointer to NULL.
void deleteListTest(struct node* headRef) {
struct node* myList=Listonetwothree();
delete(headRef);
}
//write your code here

Question 3. [10]
Write a function Compute(int x) such that it prints the values of x, 2x, 4x, 8x …. till the value doesn’t exceed 20000. After reaching 20000, it again comes back from …8x, 4x, 2x, x and stops there.
Note: (1) You can’t use any local variables in the function
(2) You can’t use any loops (for or while or do..while) or any GOTO statement.

Question 4. [10]
List all data structures you would use for a memory management module.

Question 5. [5]
Share 2 high complexity and 2 low complexity test cases for a coke vending (ATM) machine.

Question 6. [10]
Explain 3 high priority test cases for the performance of MSN search engine.

Answers:
Two of the trickiest questions and the easiest ones:
(1) AMAZING BEST
(3)void Compute (int x) {
cout<<<”\N”;
if(x<20000) {
Compute(x*2);
}
cout<<<”\N”;
}

Related Articles :


Stumble
Delicious
Technorati
Twitter
Facebook

0 comments:

Post a Comment

Career Launchers!!!

Note:

This blog can be viewed using all the browsers but can be best viewed in Mozilla Browser.
 

Career Launchers!!! Copyright © 2010 LKart Theme is Designed by Lasantha