Placement Papers: Redpine Paper 2010Tab.Amp

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Test pattern consists of four subjects.

The paper having 100 marks.

  1. C − 42 marks (each question carries 3 or 2 marks on objective and descriptive)

  2. Data Structures-18 marks (only objective 2 or 3 marks)

  3. Operating Systems-30 marks (it consists objective and descriptive, some problems on memory management)

  4. Computer Networks-10 marks (both objective and descriptive)

Questions

  1. what is output for the following program. #include <stdio. h> main () { int * p, * q, i; p = (int * ) 100; q = (int * ) 200; i = q-p; printf ( “%d” i); }

    1. 100

    2. 25

    3. 0

    4. compile error

    Ans: 25

  2. what is output for the following program. #include <stdio. h> #define swap (a, b) temp = a, a = b, b = temp; main () { int a = 5, b = 6; int temp; if (a>b) swap (a, b); printf ( “a = %d, b = %d” a, b); }

    1. a = 5 b = 6

    2. a = 6 b = 5

    3. a = 0 b = 6

    4. None

    Ans: a = 5 b = 6

  3. what is output for the following program. #include <stdio. h> main () { unsigned char i; for (i = 0; i<300; i + + ) { printf ( “*” ); } }

    1. 299

    2. 300

    3. infinite

    4. none

    ans: c (infinite)

  4. what is output for the following program. #include <stdio. h> main () { int n = 2; int sum = 5; switch (n) { case 2: Sum = sum-2; case 3: Sum * = 5; break; default: Sum = 0; } printf ( “%d” sum); }

    1. 15

    2. 0

    3. 6

    4. none

    ans: 15

  5. /* what is the program indicates */#include <stdio. h> main () { char * q; int * ip; q = (char * ) malloc (100); ip = (int * ) q; free (ip); }

  6. What is output for the following program. #include <stdio. h> main () { int a = 10, b = 5; if (a = a&b) b = ab; printf ( “a = %d, b = %d” a, b); }

    1. a = 0, b = 5

    2. a = 10 b = 5

    3. a = 0, b = 0

    4. none

    Ans: a = 0, b = 5

  7. What is output for the following program. #include <stdio. h> main () { int a[5], i, * ip; for (i = 0; i<5; i + + ) a[i] = i; ip = a; printf ( “%d” * (ip + 3 * sizeof (int) ) ); }

    1. 0

    2. 5

    3. 1

    4. none

    Ans: None

  8. What is the size of the structure. #include <stdio. h> main () { struct { char a; short b; int c; }temp; }

    1. 7

    2. 8

    3. 12

    4. 120

    ans: b

  9. What is output for the following program. #include <stdio. h> main () { unsigned char c[] = { 0 × 1, 0 × 2, 0 × 3, 0 × 4, 0 × 11, 0 × 22, 0 × 33, 0 × 44}; unsigned int * p = c; unsigned short * s = c; printf ( “%x %x %x” c[2], p[2], s[2]); } Ans: Please execute this program.

  10. What is the difference between these two declarations:

    1. int * f ()

    2. int ( * f) ()

  11. Define pointer to function that take argument as character pointer and return void pointer. Ans: Void * ( * f) (char * )

  12. 5 − 2 − 3 * 5 − 2 evaluates 18 then

    1. -left associative * has precedence over-

    2. -right associative * has precedence over-

    3. * left associative-has precedence over *

    4. * right associative-has precedence over *

DataStructure questions

  1. Difference between re-entrance and recursion.

  2. In which datastructure recursion can be used. Ans: Stack.

  3. Merge sort problem can be solved using which method. Ans: Divide and conquer strategy.

  4. 8 queens problem can be solved by using which method. Ans: Back tracking.

  5. Two problems related to inorder and post order. First answer was: ± * a b c d (In objective its answer was (d) ) Second answer was: Inorder

Operating systems

  1. what are the necessary conditions for Deadlock refer Galvin Answer was: b&c

  2. Two problems on memory management. One answer was: 68.5 ns (average access time.)

  3. what are the different types of IPC mechanisms.

Computer Networks

  1. What is the use of ICMP in TCP/IP stack?

  2. What is the use of ARP in TCP/IP stack?

  3. What is the header length of Ether Net MAC.

  4. What is the mechanisms used for error detection in Data Link Layer?

Ans: CRC (cyclic redundency check.)