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 3185
Q:

Hot water is poured simultaneously in four metallic tumblers painted outside with different points. After some time the water will be found to have cooled most in the tumbler painted.

A) rough white B) rough black
C) shining white D) shining black
 
Answer & Explanation Answer: B) rough black

Explanation:

Black  surfaces are good emitters of heat ( They are also good absorbers of heat). If the black surface is rough too, the emitting will be better. So (b) is the correct answer. Shining surfaces reflect back radiation. So if the black surface is also shining the effectiveness of emitting heat is lessened.

Report Error

View Answer Report Error Discuss

Filed Under: Physics

4 3185
Q:

Who wrote the line: ' A thing of beauty is a joy for ever '

A) P.B.Shelley B) William Wordsworth
C) John Keats D) Robert Browning
 
Answer & Explanation Answer: C) John Keats

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

1 3184
Q:

Name the mountain that seperates France and Spain

A) Alps B) Pyrenees
C) Jura D) Vosges
 
Answer & Explanation Answer: B) Pyrenees

Explanation:

Pyrenees, a chief mountain in Europe, forms a part of the great mountain across Europe and Asia.

Report Error

View Answer Report Error Discuss

Filed Under: World Geography

0 3183
Q:

Latitude of place is indicative of its

A) Temperature B) Altitude
C) Time D) Rainfall
 
Answer & Explanation Answer: A) Temperature

Explanation:

Latitude of place is indicative of its temperature. In geography, latitude is a geographic coordinate that specifies the north–south position of a point on the Earth's surface. Latitude is an angle which ranges from 0° at the Equator to 90° at the poles.

Report Error

View Answer Report Error Discuss

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

2 3183
Q:

Reduction of oxygen which forms water occurs during

A) Respiration B) Photosynthesis
C) Both A & B D) Neither photosynthesis nor respiration
 
Answer & Explanation Answer: A) Respiration

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: AIEEE , Bank Exams , GATE
Job Role: Analyst , Bank Clerk , Bank PO

1 3183
Q:

Who is the author of the book ' The Rights of Man '

A) Thomas Hardy B) Thomas Mann
C) Thomas Moore D) Thomas Paine
 
Answer & Explanation Answer: D) Thomas Paine

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

3 3182
Q:

One of the main issues discussed in the 40th Ministrial Meeting of the ASEAN held in August, 2007 was 

A) America's overstay in Iraq B) Presidential Election in Pakistan
C) Draft blueprint of the ASEAN Charter D) The 123 Agreement between India and USA
 
Answer & Explanation Answer: C) Draft blueprint of the ASEAN Charter

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams
Job Role: Bank PO

1 3182