Questions

Q:

Point out the error, if any, in the following program.

# include "stdio.h"

main()

{

     FILE *fp;

     char str[80];

     fp = fopen ("trail", "r");

     while (!feof (fp))

    {

           fgets (str, 80, fp);

           puts (str);

     }

     fclose (fp);

}

Answer

The last line from the file "trial" would be read twice. To avoid this, ues:


       While ( fgets (str, 80, fp) ! = NULL)


               puts (str);

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2911
Q:

Which of the following statements about GDP is correct?

A) Nominal GDP values production at constant prices, whereas real GDP values production at current prices. B) Nominal GDP values production at market prices, whereas real GDP values production at the cost of the resources used in the production process.
C) Nominal GDP consistently underestimates the value of production, whereas real GDP consistently overestimates the value of production. D) Nominal GDP values production at current prices, whereas real GDP values production at constant prices.
 
Answer & Explanation Answer: D) Nominal GDP values production at current prices, whereas real GDP values production at constant prices.

Explanation:
Report Error

View Answer Report Error Discuss

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

3 2911
Q:

If people sleep in closed rooms where charcoal fire is burning , they die due to 

A) carbon monoxide B) carbon dioxide
C) methane D) phosgene
 
Answer & Explanation Answer: A) carbon monoxide

Explanation:

A closed room is aplace where charcoal is burnt in limited supply of air. There is every chance for the formation of the deadly poisonous carbon monoxide, which when inhaled, reacts with the iron in haemoglobin of blood and prevents the supply of oxygen. It is said to be treacherous as there can be no previous warning of its presence because it is an odourless and colourless gas.

Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

2 2911
Q:

The State which tops in the production of rubber is 

A) Tamil Nadu B) Karnataka
C) Kerala D) Orissa
 
Answer & Explanation Answer: C) Kerala

Explanation:

A uniformly high temperature of 800F and the annual rainfall of 80 inches or more, required by rubber is available in Kerala.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank PO

3 2911
Q:

Who was the first englishman to sail around the world?

A) Magellan B) Sir Francis Drake
C) Juan Sebastian Elcano D) Henry Hudson
 
Answer & Explanation Answer: B) Sir Francis Drake

Explanation:

Sir Francis Drake was the first Englishman to sail around the world.

Report Error

View Answer Report Error Discuss

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

2 2910
Q:

Who was the first Musilm invader to enter India?

A) Mohammed Ghauri B) Mohammed - bin - Qasim
C) Mohammed Ghazni D) Qutab-ud-din Aibak
 
Answer & Explanation Answer: B) Mohammed - bin - Qasim

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

3 2910
Q:

Smasher is associated with which of the following sports?

A) Hockey B) Foot ball
C) Volley ball D) Boxing
 
Answer & Explanation Answer: C) Volley ball

Explanation:
Report Error

View Answer Report Error Discuss

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

2 2909
Q:

Who is the author of the book ' Family Life '

Answer

Akhil Sharma

Report Error

View answer Workspace Report Error Discuss

4 2909