Searching for "L"

Q:

The Gathering  is written by

A) Winston Churchill B) Voltaire
C) George Washington D) Steven Spielberg
 
Answer & Explanation Answer: A) Winston Churchill

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

Q:

Output of the Program :

main()

{

int i = 1;

while (i <= 5)

    {

         printf( "%d", i );

         if (i > 2) goto here;

         i++;

     }

}

fun()

{

here : printf( "PP" );

}

A) 1 B) 2
C) Compilation error D) Exception occurs
 
Answer & Explanation Answer: C) Compilation error

Explanation:

Compiler error: Undefined label 'here' in function main

Report Error

View Answer Report Error Discuss

Filed Under: Programming

Q:

Wankhede stadium is situated in

A) Chandigarh B) Madras
C) Mumbai D) Bangalore
 
Answer & Explanation Answer: C) Mumbai

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports

Q:

What is the output of this program ?

class main_arguments {
            public static void main(String [ ] args)
            {
                String [][] argument = new String[2][2];
                int x;
                argument[0] = args;
                x = argument[0].length;
                for (int y = 0; y < x; y++)
                    System.out.print(" " + argument[0][y]);           
            }
        }

A) 1 1 B) 1 0
C) 1 0 3 D) 1 2 3
 
Answer & Explanation Answer: D) 1 2 3

Explanation:

In argument[0] = args;, the reference variable arg[0], which was referring to an array with two elements, is reassigned to an array (args) with three elements.
Output:
$ javac main_arguments.java
$ java main_arguments
1 2 3

Report Error

View Answer Report Error Discuss

Filed Under: Java
Exam Prep: GATE

Q:

Limba Ram is known for his outstanding performance in which of the following

A) Boxing B) Shooting
C) Swimming D) Archery
 
Answer & Explanation Answer: D) Archery

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports

Q:

Monica Seles is associated with which of the following games

A) Athletics B) Badminton
C) Basketball D) Tennis
 
Answer & Explanation Answer: D) Tennis

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports

Q:

Where did Yuvaraj Singh make his ODI debut

A) Nairobi, Kenya B) Mumbai, India
C) London England D) Lahore, Pakistan
 
Answer & Explanation Answer: A) Nairobi, Kenya

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports

Q:

main()

{

char *p; p = "Hello";

printf ("%cn", *&*p);

}

A) H B) Hello
C) Compilation error D) H E L L O
 
Answer & Explanation Answer: A) H

Explanation:

* is a dereference operator & is a reference operator. They can be applied any number of times provided it is meaningful. Here p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again & references it to an address and * dereferences it to the value H

Report Error

View Answer Report Error Discuss

Filed Under: Programming
Job Role: Software Architect