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: We now know that the oceans are very deep.
P : For example, the Indian ocean has a range called the Indian Ridge.
Q : Much of it is fairly flat.
R : However, there are great mountain ranges as well.
S : On average the bottom is 2.5 miles to 3.5 miles down
S6: This reaches from the India to the Antarctic.
The Proper sequence should be:

A SQPR

B PQSR

C RSQP

D QPRS

Q2: What will be the output of the program?
#include<stdio.h>
#include<stdlib.h>

int main()
{
    int i=0;
    i++;
    if(i<=5)
    {
        printf("AptitudeCrack");
        exit(1);
        main();
    }
    return 0;
}

A Prints "AptitudeCrack" 5 times

B Function main() doesn't calls itself

C Infinite loop

D Prints "AptitudeCrack"

Q3: What will be the output of the program?
int I = 0;
    outer:
    while (true) 
    {
        I++;
        inner:
        for (int j = 0; j < 10; j++) 
        {
            I += j;
            if (j == 3)
                continue inner;
            break outer;
        }
        continue outer;
    }
System.out.println(I);

A 1

B 2

C 3

D 4

Q4: What will be the output of the program?
for (int i = 0; i < 4; i += 2) 
{ 
    System.out.print(i + ' '); 
} 
System.out.println(i); /* Line 5 */

A 0 2 4

B 0 2 4 5

C 0 1 2 3 4

D Compilation fails.

Q5: What will be the output of the program?
int x = 3; 
int y = 1; 
if (x = y) /* Line 3 */
{
    System.out.println('x =' + x); 
}

A x = 1

B x = 3

C Compilation fails.

D The code runs with no output.

Q6: What will be the output of the program?
Float f = new Float('12'); 
switch (f) 
{
    case 12: System.out.println('Twelve'); 
    case 0: System.out.println('Zero'); 
    default: System.out.println('Default'); 
}

A Zero

B Twelve

C Default

D Compilation fails

Q7: What will be the output of the program?
int i = 0; 
while(1) 
{
    if(i == 4) 
    {
        break;
    } 
    ++i; 
} 
System.out.println('i = ' + i);

A i = 0

B i = 3

C i = 4

D Compilation fails.

Q8: What will be the output of the program?
public class Delta 
{ 
    static boolean foo(char c) 
    {
        System.out.print(c); 
        return true; 
    } 
    public static void main( String[] argv ) 
    {
        int i = 0; 
        for (foo('A'); foo('B') && (i < 2); foo('C')) 
        {
            i++; 
            foo('D'); 
        } 
    } 
}

A ABDCBDCB

B ABCDABCD

C Compilation fails.

D An exception is thrown at runtime.

Q9: What will be the output of the program?
for(int i = 0; i < 3; i++) 
{ 
    switch(i) 
    { 
        case 0: break; 
        case 1: System.out.print('one '); 
        case 2: System.out.print('two '); 
        case 3: System.out.print('three '); 
    } 
} 
System.out.println('done');

A done

B one two done

C one two three done

D one two three two three done

Q10:
What will be the output of the program?
public class Test 
{  
    public static void main(String args[]) 
    { 
        int i = 1, j = 0; 
        switch(i) 
        { 
            case 2: j += 6; 
            case 4: j += 1; 
            default: j += 2; 
            case 0: j += 4; 
        } 
        System.out.println("j = " + j); 
    } 
}

A j = 0

B j = 2

C j = 4

D j = 6