SSA Global Java Questions: Pramati Java 2003Tab.Amp

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

There is some information regarding the written test conducted by Pramati Technologies this year. I don't have the question paper with me, but following are the questions which I know were there in their paper:

NOTE: There were 2 sections of which, second section was subdivided into two subsections. The first section was Analytical and Logical Reasoning. The 1st and 2nd subsections of the second section were ‘Computer Basics’ and ‘C/Java knowledge’ The no. Of questions in each section and corresponding time is as follows: Section no. Of questions time

C/Java 1230

Computer Basics 2015

Analytical/Logical3030

  1. Write a program in C/java for implementing towers of honoi. The function should take the number of rings as the argument. The output should be of this form: Move from disc 1 to 3 Move from disc 1 to 2 …

  2. Identify the error in the following code, if any. If there is no error, then mention the output of the code. Main () { union test { char * id; char * name; }; union test me; me. Id = “hello” printf ( “\n%s” me. Id); printf ( “\n%s” me. Name); }

  3. Mention the error, if any, in the following code. If there is no error, then mention the output of the code:

  4. Write a program which fork () s a child, after which, both the processes print the following information:

    1. “parent” / “child” depending upon whether it is the parent process or the child process

    2. process id

    3. parent process id

  5. Write a function ‘copy’ which takes two file names as arguments (one source file and another target file) and copies the contents from source file to the target file.

  6. There were two (multiple choice) questions regarding relation b/w threads and processes. One of them was: Which is true of threads and processes:

    1. they share the same stack

    2. they share the same heap

    3. they take the same time for context-switching

    4. threads cannot communicate through sockets

  7. Which of the following trees is not a height-balanced tree:

    1. AVL tree

    2. Binary-search tree

    3. Splay tree

    4. Red-black tree

  8. Which of these would you use for indexing, if you want to build a search engine:

    1. A * tree

    2. hash table

    3. B tree

    4. binary tree

  9. Two questions (multi choice) on paging, trashing and segmentation. One of these questions was of the following form: Which is true:

    1. Trashing results in increase in number of page faults

    2. 80X85 microprocessors don't use paging

    3. Trashing results in delay in memory access time

  10. There are 6 identical cups lying inverted on a table in a row. There is a single ball under each cup. Each ball has a solid different colour. The colours of the balls are (not in order): Red, magenta, purple, orange, yellow, green. The red ball is in the adjacent cup of the purple ball. The yellow ball always comes before orange ball. The green ball is in the fifth cup. Which of the following can be a possible ordering of the balls: ____

  11. What is the output of the following program: #define SUM (a) (a + a) main () { int j = 5; printf ( “\n%d” SUM (j + + ) ); printf ( “\n%d” j); }

  12. Write the code for dynamically allocating memory for an m by n array using malloc ()

  13. Fill up the blank such that the result of the program is 10.

  14. Write the output of the following program. Some printf statements may produce undefined outputs.

  15. What is the output of the following program, main () { char c; for (c = 0; c ⇐ 255; c + + ) { printf ( “\n%c %d” c, c); } }

  16. There is a grid like structure in which each cell is either a building (obstruction), rock (obstruction), road (conducive), hilly terrain (difficult for walking). One has to go from a given cell to a destination cell. The obstructions can creep up or disappear while walking. Which algorithm is suitable to decide the next cell in the path:

    1. best-first search

    2. Dijkstra's Algorithm

    3. A * algorithm

  17. The alteration of table schema will be done in

    1. DDL

    2. DML

    3. WSDL

    4. DCL