Questions

Q:

If the following program (myprog) is run from the command line as 

myprog 1 2 3 

what would be the output?

main(int argc, char *argv[])

{

    int i, j = 0;

    for (i = 0; i < argc ; i++)

           j = j + atoi ( argv[i]);

    printf ("%d", j);

}

A) 123 B) 6
C) Error D) "123"
 
Answer & Explanation Answer: B) 6

Explanation:

When atoi() tries to convert argv[0] to a number it cannot do so (argv[0] being a file name) and hence returns a zero.

Report Error

View Answer Report Error Discuss

Filed Under: Programming

2 13245
Q:

Choose the word that best defines the given phrase

‘A style in which a writer makes a display of hisknowledge’

A) Verbose B) Pedantic
C) Ornate D) Pompous
 
Answer & Explanation Answer: A) Verbose

Explanation:

Verbose means using or expressed in more words than are needed.

Pedantic means excessively concerned with minor details or rules.

Ornate means elaborately or highly decorated.

Pompous means self-important

Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 13238
Q:

Which type of reaction occurs when carbon burns in oxygen to give carbo dioxide?

 

A) Addition reaction B) Substition reaction
C) Combustion reaction D) Decomposition reaction
 
Answer & Explanation Answer: C) Combustion reaction

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: Bank Exams

0 13237
Q:

Who was the man to attend the Imperial Durbar in 1877 dressed in hand-spun Khadi and was one of the founders of the Poona Sarvajanik Sabha in 1807?

A) M.G.Ranade B) S.N. Banerjee
C) Ganesh Vasudev Joshi D) Bal Gangadhar Tilak
 
Answer & Explanation Answer: C) Ganesh Vasudev Joshi

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

103 13233
Q:

main()

{

float me = 1.1;

double you = 1.1;

if(me==you)

printf("yes");

else

printf("No");

}

A) Yes B) No
C) Both D) Compilation error
 
Answer & Explanation Answer: B) No

Explanation:

For floating point numbers (float, double, long double) the values cannot be predicted exactly. Depending on the number of bytes, the precession with of the value represented varies. Float takes 4 bytes and long double takes 10 bytes. So float stores 0.9 with less precision than long double.

Report Error

View Answer Report Error Discuss

Filed Under: Software Testing
Job Role: Software Architect

10 13232
Q:

Which planet has the most volcanoes in our solar system?

 

A) Jupiter B) Venus
C) Saturn D) Neptune
 
Answer & Explanation Answer: B) Venus

Explanation:

Venus has the most number of volcanoes than any other planet in the solar system.

 

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: Bank Exams

1 13226
Q:

Improve the bracketed part of the sentence.

I gave her the book that I (won) as a prize.

 

A) will win B) had won
C) am winning D) no improvement
 
Answer & Explanation Answer: B) had won

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 13222
Q:

Ball bearings are used in cycles, scooters etc to

A) Increase the friction between the wheel and the axle B) Reduce the friction between the wheel and the axle
C) Reduce the friction between ground and the whee D) None of the above
 
Answer & Explanation Answer: B) Reduce the friction between the wheel and the axle

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics

47 13219