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

Energy produced in nuclear reaction is given by

A) Charle's law B) Grahm's law
C) Gay - Lussac's law D) Einstein's law
 
Answer & Explanation Answer: D) Einstein's law

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

2 3192
Q:

World Elder's day is observed on

A) October 30 B) November 1
C) September 30 D) October 1
 
Answer & Explanation Answer: B) November 1

Explanation:
Report Error

View Answer Report Error Discuss

1 3191
Q:

Air temperatures are effected by slope and orientation as slopes facing into the Sun will be 

A) Warmer than those facing away B) Colder than those facing away
C) Neither warmer nor colder than those facing away D) None of these
 
Answer & Explanation Answer: A) Warmer than those facing away

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

3 3190
Q:

Which Greek statesman is called 'the father of democracy'?

Answer

Pericles

Report Error

View answer Workspace Report Error Discuss

0 3189
Q:

In a confederal system of government, power is

A) with States B) with Central
C) Both A & B D) None of the above
 
Answer & Explanation Answer: A) with States

Explanation:

Government can be classified in three manners:

(1) who participates,

(2) geographic distribution of power, and

(3) legislative/executive relationship.

 

Who can participate is generally broken down into two forms of government,

democracy or dictatorship

 

While the legislative/executive relationship is broken down into

presidential or parliamentary

 

The geographic distribution of power is broken down into unitary, federal, and confederation (confederal).


Confederal System of Government ::

A system of government where power is located with the independent states and there is little power in the central government.

 

Today, no nation follows a confederal system. Organizations, like the European Union and the Commonwealth of Independent States, are based on the ideas of a confederal system. Several nations make up these organizations, but they still retain the majority of their independence.

Report Error

View Answer Report Error Discuss

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

4 3188
Q:

The Savannas of Orinoco Basin are termed as 

A) pampas B) steppes
C) prairies D) llanos
 
Answer & Explanation Answer: D) llanos

Explanation:

llanos is a tropical grassland while the remaining three are temperature grasslands

Report Error

View Answer Report Error Discuss

Filed Under: World Geography

1 3188
Q:

Jamini Roy was a famous

A) Actor B) Producer
C) Dancer D) Painter
 
Answer & Explanation Answer: D) Painter

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

1 3187