Placement Papers - Microsoft

Why Microsoft Placement Papers?

Learn and practice the placement papers of Microsoft and find out how much you score before you appear for your next interview and written test.

Where can I get Microsoft Placement Papers with Answers?

IndiaBIX provides you lots of fully solved Microsoft Placement Papers with answers. You can easily solve all kind of placement test papers by practicing the exercises given below.

How to solve Microsoft Placement Papers?

You can easily solve all kind of questions by practicing the following exercises.

MICROSOFT PLACEMENT PAPER (TECHNICAL-C, DS ,UNIX)

Posted By : Nitesh Reddy Rating : +11, -1

PAPER: MICROSOFT PLACEMENT PAPER (TECHNICAL-C, DS ,UNIX)

1. If you are on a boat and you throw out a suitcase, Will the level of water increase.
 
2. Print an integer using only putchar. Try doing it without using extra storage.
 
3. Write C code for (a) deleting an element from a linked list (b) traversing a linked list
 
4. What are various problems unique to distributed databases
 
5. Declare a void pointer

ANS. void *ptr;
 
6. Make the pointer aligned to a 4 byte boundary in a efficient manner

ANS. Assign the pointer to a long number and the number with 11...1100 add 4 to the number
 
7. What is a far pointer (in DOS)

8. Describe the file system layout in the UNIX OS
 
  9. describe boot block, super block, inodes and data layout
 
10. In UNIX, are the files allocated contiguous blocks of data
 
ANS. no, they might be fragmented
 
11.How is the fragmented data kept track of
 
ANS. Describe the direct blocks and indirect blocks in UNIX file system
 
12. What is a volatile variable?
 
13. What is the scope of a static function in C ?
 
14. What is the difference between "malloc" and "calloc"?
 
15. struct n { int data; struct n* next}node;
node *c,*t;
c->data = 10;
t->next = null;
*c = *t;
what is the effect of the last statement?
 
16. If you're familiar with the ? operator x ? y : z
you want to implement that in a function: int cond(int x, int y, int z); using only ~, !, ^, &, +, |, <<, >> no if statements, or loops or anything else, just those operators, and the function should correctly return y or z based on the value of x. You may use constants, but only 8 bit constants. You can cast all you want. You're not supposed to use extra variables, but in the end, it won't really matter, using vars just makes things cleaner. You should be able to reduce your solution to a single line in the end though that requires no extra vars.
 
17. How do we test most simply if an unsigned integer is a power of two?
ANS. #define power_of_two(x)  ((x)&&(~(x&(x-1))))
 
18. Set the highest significant bit of an unsigned integer to zero.
ANS. (from Denis Zabavchik) Set the highest significant bit of an unsigned integer to zero
#define zero_most_significant(h)
(h&=(h>>1)|(h>>2),
h|=(h>>2),
h|=(h>>4),
h|=(h>>8),
h|=(h>>16))
 
19. Let f(k) = y where k is the y-th number in the increasing sequence of non-negative integers with the same number of ones in its binary representation as y, e.g. f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 1, f(4) = 3, f(5) = 2, f(6) = 3 and so on. Given k >= 0, compute f(k).
 
20. A character set has 1 and 2 byte characters. One byte characters have 0 as the first bit. You just keep accumulating the characters in a buffer. Suppose at some point the user types a backspace, how can you remove the character efficiently. (Note: You cant store the last character typed because the user can type in arbitrarily many backspaces)
 
21. What is the simples way to check if the sum of two unsigned integers has resulted in an overflow.
 
22. How do you represent an n-binary tree? Write a program to print the nodes of such a tree in breadth first order

Like this page? +11 -1




Companies List:

3i Infotech - AAI - ABACUS - ABB - Accel Frontline - Accenture - Aditi - Adobe - ADP - Agreeya - Akamai - Alcatel Lucent - Allfon - Alumnus - Amazon - Amdocs - AMI - Andhra Bank - AppLabs - Apps Associates - Aricent - Ashok Leyland - Aspire - Atos Origin - Axes - Bajaj - Bank of Maharashtra - BEL - BEML - BHEL - BirlaSoft - Blue Dart - Blue Star - BOB - BPCL - BPL - Brakes - BSNL - C-DOT - Cadence - Calsoft - Canara Bank - Canarys - Capgemini - Caritor - Caterpillar - CDAC - CGI - Changepond - Ciena - Cisco - Citicorp - CMC - Consagous - Convergys - CORDYS - Crompton - CSC - CTS - Cummins - Dell - Deloitte - Delphi-TVS - DeShaw - Deutsche - Dotcom - DRDO - EDS - EIL - ELGI - ELICO - ERICSSON - Essar - Fidelity - Flextronics - Freescale - FXLabs - GAIL - GE - Genpact - Geodesic - Geometric - Globaledge - GlobalLogic - Godrej - Google - Grapecity - HAL - HCL - Hexaware - Honeywell - HP - HPCL - HSBC - Huawei - Hughes - IBM - IBS - ICICI - iGate - Impetus - iNautix - Indian Airforce - Indian Airlines - Infosys - Infotech - Intec - Integra - Intergraph - IOCL - iSOFT - ISRO - Ittiam - JSW - Keane - Kenexa - L & T - L & T Infotech - LG Soft - Lifetree - LionBridge - Mahindra Satyam - Mastek - Maveric - McAfee - MECON - Microsoft - MindTree - Miraclesoft - Mistral - Motorola - Mphasis - MTNL - NIC - Nokia Siemens - Novell - NTPC - Nucleus - ORACLE - Patni - Perot - Polaris - Ramco - Robert Bosch - Samsung - SAP - Sapient - Sasken - SBI - Sierra Atlantic - Sonata - Sony India - Sutherland - Syntel - TCS - Tech Mahindra - VeriFone - Virtusa - Wipro - Zensar.