Questions

Q:

Which of the following is true?

A) It is appropriate to use assertions to validate arguments to methods marked public B) It is appropriate to catch and handle assertion errors
C) It is NOT appropriate to use assertions to validate command-line arguments D) None
 
Answer & Explanation Answer: C) It is NOT appropriate to use assertions to validate command-line arguments

Explanation:

A is incorrect. It is acceptable to use assertions to test the arguments of private methods.

 

B is incorrect. While assertion errors can be caught, Sun discourages you from doing so.

Report Error

View Answer Report Error Discuss

Filed Under: Programming

0 3776
Q:

If I use the following printf() to print a long int why I am not warned about the type mismatch?

printf ("%d",num );

Answer

When a function accepts a variable number of arguments , its prototype cannot provide any information about the number of arguments and type of those variable arguments. Hence the compiler cannot warn about the mismatches. The programmer must make sure that arguments match or must manually insert explicit typecast.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 3776
Q:

How many times the following program would print 'Jamboree'?

main()

{

     printf ( "\nJamboree");

     main ();

}

Answer

Till the stack doesn't overflow

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

2 3775
Q:

Which of the following Rivers has no Bridges built over it?

A) Nile B) Congo river
C) Amazon river D) Yellow river
 
Answer & Explanation Answer: C) Amazon river

Explanation:

There are No bridges over The Amazon River.

The Amazon River, in South America, is the largest river by discharge volume of water in the world and the second longest in length after The Nile in Egypt.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Bank Clerk , Bank PO

11 3775
Q:

Bureaucracy literally means a system of government by

A) Elected representative B) Officials
C) Group of landlords D) Nominated representative
 
Answer & Explanation Answer: B) Officials

Explanation:

A bureaucracy is a way of administratively organizing large numbers of people who need to work together.

The term bureaucracy literally means "rule by desks or offices".

Organizations in the public and private sector, including universities and governments, rely on bureaucracies to function.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

4 3774
Q:

Classify the Hashing Functions based on the various methods by which the key value is found.

Answer

Direct method,


 Subtraction method,


 Modulo-Division method,


 Digit-Extraction method,


 Mid-Square method,


 Folding method,


Pseudo-random method

Report Error

View answer Workspace Report Error Discuss

Subject: Technology

5 3772
Q:

Which of the following layers of the earth is believed to have the heavist mineral materials of highest density

A) Central core B) Crust
C) Mantle D) Both (B) and (C)
 
Answer & Explanation Answer: A) Central core

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

0 3770
Q:

' Crime and Punishment ' was written by

A) Alexander Solzhenitysn B) Lewis Carroll
C) Fyodor Dostoevsky D) Valdimir Nabakov
 
Answer & Explanation Answer: C) Fyodor Dostoevsky

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

2 3769