Questions

Q:

Point out the error, if any, in the following program.

#include "stdarg.h"

main()

{

     display ( 4, 12.5, 13.5, 14.5, 44.3);

}

display(int num, ...)

{

       float c; int j;

        va_list ptr;

        va_start (ptr, num);

        for ( j = 1; j <= num; j++)

        {

            c = va_arg ( ptr, float );

            printf ("\n%f", c);

         }

}

Answer

While extracting a float argument using va_arg we should have useed 


c = va_arg (ptr, double)

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

1 5094
Q:

What is the name of the messaging platform to be used by the Indian Army shortly?

 

A) Safe Communication Network B) Secure Application for Internet
C) Safe Messaging Service D) Secure Instant Messaging
 
Answer & Explanation Answer: B) Secure Application for Internet

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

2 5093
Q:

Africa is seperated from Europe by

A) Red Sea B) Mediterranean Sea
C) Atlantic Ocean D) Persian Gulf
 
Answer & Explanation Answer: B) Mediterranean Sea

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

17 5092
Q:

This Union Territory possesses a coastal stretch of about 45 km with 28 marine fishing villages. However 45% of the population is engaged in agricultural and allied products.
Which among the following Union Territories is referred to in the above passage

A) Lakshadweep B) Pondicherry
C) Andaman and Nicobar D) Daman
 
Answer & Explanation Answer: A) Lakshadweep

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

11 5092
Q:

National Rural Development Institute is situated at

 

A) Assam B) Patna
C) Shimla D) Hyderabad
 
Answer & Explanation Answer: D) Hyderabad

Explanation:

National Institute of Rural Development is situated in Hyderabad. It is an organization involved in rural research and training in rural development.

 

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: Bank Exams

1 5091
Q:

Isotopes of an element have ______.

 

A) Same physical properties B) Different chemical properties
C) Different number of neutrons D) Different atomic number
 
Answer & Explanation Answer: C) Different number of neutrons

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: Bank Exams

1 5089
Q:

An atom bomb based upon the principal of ________

A) Nuclear fission B) Nuclear fussion
C) Controlled chain reaction D) None of these
 
Answer & Explanation Answer: A) Nuclear fission

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics

7 5089
Q:

Dome mountain are the result of

A) Intrusion of magma B) Folding
C) Frictions at the joints of the rocks D) Faulting
 
Answer & Explanation Answer: A) Intrusion of magma

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

5 5088