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

Damage to hearing is caused by sounds which exceed

A) 70 decibles B) 80 decibles
C) 100 decibles D) 120 decibles
 
Answer & Explanation Answer: D) 120 decibles

Explanation:

High frequency sound attacks the tympanic memberane and makes it defective. 120 decibles is too high a pitch to be heard and therefore it impairs the hearing ability.

Report Error

View Answer Report Error Discuss

Filed Under: Biology

3 2903
Q:

Which is the Largest lake of the world ?

Answer

Caspian Sea (371,000 sq km)

Report Error

View answer Workspace Report Error Discuss

13 2902
Q:

Who has been described as the "destroyer of the Sakas, the Yavanas and the Pallavas"?

A) Skanda Gupta B) Gautamiputra Satakarni
C) Simuka D) Satakarni I
 
Answer & Explanation Answer: B) Gautamiputra Satakarni

Explanation:

Gautamiputra Satakarni has been described as the "destroyer of the Sakas, the Yavanas and the Pallavas".

Report Error

View Answer Report Error Discuss

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

5 2902
Q:

Which of the following year is considered as the first year of the Muslim calender ? 

A) AD 622 B) AD 671
C) AD 571 D) AD 651
 
Answer & Explanation Answer: A) AD 622

Explanation:

Muhammad had to leave Mecca his birth place where he started preaching and take refuse in Medina, where he was given a warm welcome. This event took place in AD 622 and is known as the year of the Hijira, or migration, which became the first year of the Muslim Calendar.

Report Error

View Answer Report Error Discuss

Filed Under: World History

2 2902
Q:

Which of the following is a Heterogeneous Mixture?

A) Air B) Table salt
C) Soda D) Brass
 
Answer & Explanation Answer: C) Soda

Explanation:

Here Soda is a Heterogenous Mixture.

 

A Heterogeneous Mixture is a mixture having a non-uniform composition i.e, the mixture contains components in different phases. Using various means, the parts in the mixture can be separated from one another.

Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: AIEEE , Bank Exams , CAT , GATE , GRE
Job Role: Analyst , Bank PO

9 2902
Q:

Scalar Quantities are

A) physical quantities which have magnitude only and no direction B) physical quantities which have no magnitude only and only direction
C) physical quantities which have magnitude only and direction D) physical quantities which have no magnitude and no direction
 
Answer & Explanation Answer: A) physical quantities which have magnitude only and no direction

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics

4 2901
Q:

Which is the Largest Organ in the Human Body?

A) Heart B) Brain
C) Skin D) Liver
 
Answer & Explanation Answer: C) Skin

Explanation:

There are about 70 organs in the human body. The Top 10 largest organs in the human body based on size are:

1. Skin

2. Liver

3. Brain

4. Lungs

5. Heart

6. Kidneys

7. The Spleen

8. The Pancreas

9. Thyroxin

10. The Prostrate.

Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE , Bank Exams , GATE , GRE
Job Role: Analyst , Bank PO

16 2901