Placement Papers: Microsoft Paper on 5th Sept 2009

Doorsteptutor material for CTET/Paper-2 is prepared by world's top subject experts: get questions, notes, tests, video lectures and more- for all subjects of CTET/Paper-2.

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: You can՚t use any local variables in the function, 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:

Tricks

Two of the trickiest questions and the easiest ones:

  1. AMAZING BEST
  2. void Compute (int x) {cout < if (x < 20000) {Compute (x ⚹ 2) ;} cout <}