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

Hitendra Desai was known outstanding in which field ?

A) Literature B) Politics
C) Journalism D) Social Service
 
Answer & Explanation Answer: B) Politics

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

4 5500
Q:

The...........dish is one of the most  popular dishes of Kashmir?

A) Aloo Ka Raita B) Dum Aloo
C) Kesar Chawal D) Murgh Achaari
 
Answer & Explanation Answer: B) Dum Aloo

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Culture

76 5500
Q:

A bond formed by the transfer of electrons betwwen atoms of the elements is called

A) ionic bond B) covalent bond
C) co ordinate bond D) none
 
Answer & Explanation Answer: A) ionic bond

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

8 5499
Q:

The Sunderbans are found in

A) The Luni Basin B) Godavari Delta
C) Ganga Delta D) Mahanadi Delta
 
Answer & Explanation Answer: C) Ganga Delta

Explanation:

These mangrove or tidal forests are found in the submerged coastal plains of the Ganga. The name comes from the abundant sundari trees found here. 

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

4 5496
Q:

It travels over land and water. Who invented the HOVERCRAFT?

A) C. Cockerell B) S. Sperrow
C) O. Stricheg D) T. Henman
 
Answer & Explanation Answer: A) C. Cockerell

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Inventions

2 5492
Q:

Answer the Following Puzzle

Number Puzzles Questions and Answers

A) 22 B) 33
C) 44 D) 55
 
Answer & Explanation Answer: A) 22

Explanation:

In each circle,lower number equals the product of the top two numbers, subtracting 3 for the left hand circle, 4 for the middle, and 5 for the right hand circle.

Report Error

View Answer Report Error Discuss

Filed Under: Number Puzzles

25 5491
Q:

Clouds usually form when

A) air temperature reaches the dew point B) evapouration has warmed the surrounding air
C) relative humidity is 0% D) condensation nuclei have been removed from the air
 
Answer & Explanation Answer: A) air temperature reaches the dew point

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

8 5490