image not found

Oops! That page can't be found.


Directions to Solve

In questions below, each passage consist of six sentences. The first and sixth sentence are given in the begining. The middle four sentences in each have been removed and jumbled up. These are labelled as P, Q, R and S. Find out the proper order for the four sentences.

Q1:
S1: Far away in a little street there is a poor house.
P : Her face is thin and worn and her hands are coarse, pricked by a needle, for she is a seam stress.
Q : One of the windows is open and through it I can see a poor woman.
R : He has a fever and asking for oranges.
S : In a bed in a corner of the room her little boy is lying ill.
S6: His mother has nothing to give but water, so he is crying.
The Proper sequence should be:

A RSPQ

B PQSR

C QPSR

D SRQP

Q2: Point out the error in the program
#include<stdio.h>
int f(int a)
{
  a > 20? return(10): return(20);
}
int main()
{
    int f(int);
    int b;
    b = f(20);
    printf("%d\n", b);
    return 0;
}

A Error: return statement cannot be used with conditional operators

B Error: Prototype declaration

C No error

D None of above

Q3: Which interface provides the capability to store objects using a key-value pair?

A Java.util.Map

B Java.util.Collection

C Java.util.Set

D Java.util.List

Q4: Which collection class allows you to associate its elements with key values, and allows you to retrieve objects in FIFO (first-in, first-out) sequence?

A java.util.LinkedHashMap

B java.util.HashMap

C java.util.TreeMap

D java.util.ArrayList

Q5: Which collection class allows you to access its elements by associating a key with an element's value, and provides synchronization?

A java.util.Hashtable

B java.util.TreeSet

C java.util.TreeMap

D java.util.SortedMap

Q6: Which is valid declaration of a float?

A float f = 1.0d;

B float f = "1";

C float f = 1.0;

D float f = 1F;

Q7:
/* Missing Statement ? */
public class foo 
{
    public static void main(String[]args)throws Exception 
    {
        java.io.PrintWriter out = new java.io.PrintWriter(); 
        new java.io.OutputStreamWriter(System.out,true); 
        out.println('Hello'); 
    } 
}
What line of code should replace the missing statement to make this program compile?

A include java.io.*;

B import java.io.*;

C No statement required.

D import java.io.PrintWriter;

Q8: What is the numerical range of char?

A -256 to 255

B 0 to 65535

C -32768 to 32767

D 0 to 32767

Q9: What is the numerical range of char?

A 0 to 32767

B -32768 to 32767

C -256 to 255

D 0 to 65535

Q10:
Which of the following are Java reserved words?
  1. run
  2. import
  3. default
  4. implement

A 2 and 4

B 2 and 3

C 1 and 2

D 3 and 4