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

Golden Temple of Amritsar is located in which country?

A) Bangladesh B) Pakistan
C) China D) India
 
Answer & Explanation Answer: D) India

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Places

3 3230
Q:

Technically, tempera is paint in which the vehicle is in

A) an emulsion B) a pigment
C) an impasto D) a ground
 
Answer & Explanation Answer: A) an emulsion

Explanation:
Report Error

View Answer Report Error Discuss

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

0 3230
Q:

Cretinism is due to the disorder of the glands

A) Thymus B) Parathyroid
C) Thyroid D) Adrenal
 
Answer & Explanation Answer: C) Thyroid

Explanation:

Cretinism is a disease caused by hypothyroidism(less thyroxine formation).The symptoms of the disease are retardation  of mental, physical and sexual developments. Potbellt, protruding tongue, dry skin etc are also indicative of this disease.

Report Error

View Answer Report Error Discuss

Filed Under: Biology

7 3229
Q:

Clarence Pine Top Smith played what style of piano?

A) Mozart B) Boogie - Woogie
C) Beethoven D) Liszt
 
Answer & Explanation Answer: B) Boogie - Woogie

Explanation:

Pine Top Smith (1899-1929) Considered to be the originator of the Boogie -Woogie style of piano playing.

Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO

1 3229
Q:

______ is a particular area from which all the voters living there choose their representatives.

A) Constituency B) Voting Area
C) Election Area D) Legislative Area
 
Answer & Explanation Answer: A) Constituency

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: Bank Exams

6 3229
Q:

The capacity of a water heater is measured in

A) Gallons B) Liters
C) Meters D) Both A & B
 
Answer & Explanation Answer: D) Both A & B

Explanation:

The capacity of a water heater is measured in Gallons or Liters. In the USA, it is measured in Gallons and in India, we measure it in Liters.

Hence, if the capacity of the water heater is 15 gallons or 15 liters, then it says that it can hold 15 gallons or 15 liters of water.

Report Error

View Answer Report Error Discuss

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

3 3229
Q:

The More You Have, The Less You See. What is it?

A) Light B) Darkness
C) Sight D) None
 
Answer & Explanation Answer: B) Darkness

Explanation:

The More You Have the Darkness, The Less You See i.e, visible less.

Report Error

View Answer Report Error Discuss

6 3228