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

Where does most weather occur in the atmosphere?

A) Ionosphere B) Stratosphere
C) Troposphere D) Mesosphere
 
Answer & Explanation Answer: C) Troposphere

Explanation:

The troposphere is the lowest layer of the atmosphere and where most clouds are. That means all weather is in the troposphere. Almost all weather occurs in the Troposphere, basically, the lowest layer that goes up to about 10 - 15 kms.

Report Error

View Answer Report Error Discuss

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

3 3238
Q:

What occurs when an atom loses an electron?

A) The atom's radius decreases and the atom becomes a positive ion. B) The atom's radius increases and the atom becomes a negative ion.
C) The atom's radius decreases and the atom becomes a negative ion. D) The atom's radius increases and the atom becomes a positive ion.
 
Answer & Explanation Answer: A) The atom's radius decreases and the atom becomes a positive ion.

Explanation:

When an atom loses an electron it becomes a positive ion by acquiring negatively charged. When it loses electron, the atom's radius also decreased.

Report Error

View Answer Report Error Discuss

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

1 3238
Q:

Antisnake venom is prepared by 

A) Pasteur institute B) Hoffkine's institute
C) Birla's Institute D) Indian science Institute
 
Answer & Explanation Answer: B) Hoffkine's institute

Explanation:

Antisnake venom: In the Hoffkine Institute at Bombay snake venom in mild dose is injected into horses and the horses are induced to produce anti-venom bodies. These are extracted and used in cases of snake bites.

Report Error

View Answer Report Error Discuss

Filed Under: Biology

2 3237
Q:

What three statements make up the cell theory?

A) All living things are made up of cells. B) New cells come frome exisiting cells.
C) Cells are the basic unit of structure/function in living things. D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

The three statements make up the cell theory are::

 

1. All living things are made up of cells.

2. Cells are the basic unit of structure/function in living things.

3. New cells come frome exisiting cells.

 

These cells can vary widely, but all living things are composed of cells.

 

Report Error

View Answer Report Error Discuss

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

1 3237
Q:

The international date line passes through

A) Hudson Bay B) Denmark Strait
C) Bering Strait D) Baffin Bay
 
Answer & Explanation Answer: C) Bering Strait

Explanation:
Report Error

View Answer Report Error Discuss

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

2 3237
Q:

The occasional development of warm ocean surface waters along the coast of Ecuador and Peru is known as 

A) EI Nino and La Nina B) EI Nino
C) La Nina D) Southern Oscillation
 
Answer & Explanation Answer: B) EI Nino

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

4 3237
Q:

Which one of the following years is known as the 'Year of the Great Divide' with regard to population, after which there has been a continuous and rapid growth in India's population?

A) 1911 B) 1921
C) 1941 D) 1951
 
Answer & Explanation Answer: B) 1921

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

2 3237