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 3174
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 3173
Q:

Abu Simbel is located in which country?

A) South Africa B) Iran
C) Iraq D) Egypt
 
Answer & Explanation Answer: D) Egypt

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Places

4 3173
Q:

What is consumption disease in the 19th century?

A) Tuberculosis B) Paralysis
C) Plague D) Cholera
 
Answer & Explanation Answer: A) Tuberculosis

Explanation:

Tuberculosis (TB) was the leading cause of death in the United States and one of the most feared diseases in the world during the 19th and early 20th centuries.

Formerly known as Consumption diseases because many types of lung diseases were lumped under the term 'consumption'. Lung cancer and bronchitis were examples.

Report Error

View Answer Report Error Discuss

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

15 3173
Q:

A sentence whose meaning is unclear

A) Anonymous B) Ambiguous
C) Unanimous D) Congruent
 
Answer & Explanation Answer: B) Ambiguous

Explanation:

A sentence whose meaning is unclear is called as Ambiguous.

Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: AIEEE , Bank Exams , CAT , GATE , GRE , TOEFL
Job Role: Analyst , Bank Clerk , Bank PO , Database Administration , IT Trainer

1 3173
Q:

I have 9 letters, Nobody can read without me, 4+5+6 is an animal, 7 is me, 3 is u, 2+8+9+1 is completed. Who am I ?

A) Literature B) Dictionary
C) Education D) Dedication
 
Answer & Explanation Answer: C) Education

Explanation:

The answer is EDUCATION

 

4,5,6 make up the word cat,

7th is 'i' which means me,

3rd letter is 'u' which mean you,

2,8,9,1 make up the word done, which means completed

and nobody can read without education.

Report Error

View Answer Report Error Discuss

6 3172
Q:

Under what section of trade union act, workers are entitled to protection if strike is illegal?

Answer

Dispute Act, 1947 put certain prohibitions on the right to strike. A strike may be illegal if it contravenes the provision of section 22, 23 or 24 of the Act.

Report Error

View answer Workspace Report Error Discuss

Subject: Indian Politics Exam Prep: Bank Exams
Job Role: Bank Clerk , Bank PO

5 3172
Q:

The GPS device in an automobile uses which communication channel?

A) Satellite B) Microwave
C) Radio frequency D) Infrared
 
Answer & Explanation Answer: A) Satellite

Explanation:

All automobiles uses satellite communication channel for their GPS devices.

Report Error

View Answer Report Error Discuss

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

2 3171