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

Scalar Quantities are

A) physical quantities which have magnitude only and no direction B) physical quantities which have no magnitude only and only direction
C) physical quantities which have magnitude only and direction D) physical quantities which have no magnitude and no direction
 
Answer & Explanation Answer: A) physical quantities which have magnitude only and no direction

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics

4 2896
Q:

Article I of the Constitution of India declares India as

A) Fedaral State B) Quasi Federal State
C) Unitary State D) Union of States
 
Answer & Explanation Answer: D) Union of States

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

2 2895
Q:

Who is the new Chairman of ISRO in 2018?

A) K. Sivan B) S. Manish Arya
C) A.S. Kiran Kumar D) Bibeth Roy
 
Answer & Explanation Answer: A) K. Sivan

Explanation:

Rocket specialist K. Sivan has been appointed as new Chairman of India's space agency ISRO for a three-year term. He replaces current ISRO Chairman A.S. Kiran Kumar, whose term ends January 14, 2018.

 

  • He is currently Director of Vikram Sarabhai Space Centre in Trivandrum.

 

  • His expertise gave ISRO ability to send 104 satellites in a single mission.
Report Error

View Answer Report Error Discuss

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

10 2895
Q:

Who among the following took over as the 25th Director General of the Border Roads(DGBR) ?

A) Lt. Gen. Suresh Sharma B) Lt. Gen. David R. Syiemlieh
C) Lt. Gen. Srikanth Mishra D) Lt. Gen. Sanjeev Kumar Shrivastava
 
Answer & Explanation Answer: D) Lt. Gen. Sanjeev Kumar Shrivastava

Explanation:

Lt. Gen. Sanjeev Kumar Shrivastava took over as the 25th Director General of the Border Roads (DGBR). He has replaced Lt. Gen. Suresh Sharma. Prior to it, he was holding the appointment of Director General Combat Engineers at Integrated Headquarters of Ministry of Defence(Army).

Report Error

View Answer Report Error Discuss

2 2895
Q:

Tap water is placed in an open pad and allowed to evaporate. After some time the temperature of water 

A) increases to a great extent B) increases slightly
C) decreases slightly D) decreases rapidly
 
Answer & Explanation Answer: C) decreases slightly

Explanation:

Evaporation causing cooling.Here the evaporation is less. Therefore cooling is less.

Report Error

View Answer Report Error Discuss

Filed Under: Physics

3 2894
Q:

What is e-commerce?

A) Buying and selling international goods B) Buying and selling products and services not found in stores
C) Buying and selling products and services over the internet D) Buying and selling products having to do with computer
 
Answer & Explanation Answer: C) Buying and selling products and services over the internet

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: Bank Exams
Job Role: Bank PO

10 2894
Q:

Magnetic Tape can serve as

A) Input device B) Secondary storage device
C) Output device D) None of the above
 
Answer & Explanation Answer: B) Secondary storage device

Explanation:

Related image

Magnetic tape can serve as a Secondary storage unit. It is a medium for magnetic recording, made of a thin, magnetizable coating on a long, narrow strip of plastic film.

Report Error

View Answer Report Error Discuss

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

17 2893