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

Which phase change is an example of an exothermic process?

A) Liquid to Solid B) Gas to Solid
C) Gas to Liquid D) All the above
 
Answer & Explanation Answer: D) All the above

Explanation:

Processes that require or give off heat will be limited to changes of state, known as phase changes, and changes in chemical constitution, or chemical reactions. Changes of state involve a solid melting, a liquid freezing, a liquid boiling or a gas condensing.

 

An exothermic process is one that gives off heat, which is transferred to the surroundings. An endothermic process is a reaction which heat has to be supplied to the system from the surroundings.

 

Here in all the given options, heat is taken away from them to change there phase. 

Liquid to Solid --- Freezing

Gas to Liquid --- Condensation

Gas to Solid --- Deposition 

are all examples of exothermic processes.

 

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

6 3131
Q:

The technique of DNA fingerprinting in human was developed for first time by _________

A) Lalji Singh B) Alec Jeffreys
C) R. Ericson D) J. Black
 
Answer & Explanation Answer: B) Alec Jeffreys

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

6 3130
Q:

A man stands on the pan of a balance holding a fish in his right hand and bucket of water in his left hand. If he transfers the fish into the bucket, the total weight on the pan

A) increases B) decreases
C) remains the same D) first increases and then decreases
 
Answer & Explanation Answer: C) remains the same

Explanation:

Before transferring the fish, the position is the man with the fish and the bucket of water. After transferring the position is : the man without the fish, but the fish inside the water in the bucket. Thus to know whether there is any change in weight, it is enough to consider whether there is any change in weight when the fish in air is transferred into the water. The answer is there is no change as when in water though it loses weight due to upthrust of water on it, the level of water increases and exerts an equal force at the bottom

Report Error

View Answer Report Error Discuss

Filed Under: Physics

5 3129
Q:

Generally, plants absorb dissolved nitrates from soil and convert them into

A) Ammonia B) Urea
C) Protein D) Nitrogen
 
Answer & Explanation Answer: D) Nitrogen

Explanation:

Generally, plants absorb dissolved nitrates from soil and convert them into free nitrogen.

 

  • Free nitrogen is simply molecular nitrogen (N2).

 

  • Nitrogen, in its molecular form, consists of two nitrogen atoms bound together with a triple bond.
Report Error

View Answer Report Error Discuss

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

5 3129
Q:

Which of the following investment choices is least risky?

A) Renting B) Bonds
C) Flipping D) CD's
 
Answer & Explanation Answer: D) CD's

Explanation:

CDs are the least risky investment choice when compared to flipping, renting and bonds.

A certificate of deposit (CD) is a savings certificate with a fixed maturity date, specified fixed interest rate and can be issued in any denomination aside from minimum investment requirements. A CD restricts access to the funds until the maturity date of the investment. CDs are generally issued by commercial banks.

CDs are issued by the bank and are guaranteed by the government. So even if the bank goes bankrupt the investor's money is guaranteed to a certain extent.

Flipping and renting are subjected to market fluctuations while bonds are not insured.

 

Report Error

View Answer Report Error Discuss

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

0 3128
Q:

Bangkok lies on river

A) Kizil B) Spree
C) Karnaphuli D) Menam
 
Answer & Explanation Answer: D) Menam

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

3 3127
Q:

Who has sworn in as 45th Chief Justice of India  ?

A) Dipak Misra B) J S Khehar
C) T. S. Thakur D) Ranganath Misra
 
Answer & Explanation Answer: A) Dipak Misra

Explanation:
Report Error

View Answer Report Error Discuss

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

4 3126