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

Which one of the following was not authorised by Annie Besant?

A) The future of Indian politics B) How India fought for freedom
C) The case for India D) India Old and New
 
Answer & Explanation Answer: D) India Old and New

Explanation:

Except option D all the other were posted by Annie Besent

Report Error

View Answer Report Error Discuss

Filed Under: Indian History

3 5539
Q:

One who deserts his religion

A) Profane B) Turn coat
C) Apostate D) Deserter
 
Answer & Explanation Answer: C) Apostate

Explanation:

Apostate:

A person who abandons or renounces or deserts his religious or political beliefs or principles.

Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams , CAT , GRE , TOEFL
Job Role: Analyst , Bank Clerk , Bank PO

2 5539
Q:

Which organization created a shared economy?

A) North American Free Trade Agreements B) Association of Southeast Asian Nations
C) World Trade Organization D) European Union
 
Answer & Explanation Answer: D) European Union

Explanation:

The organization that created the shared economy is European Union.

Report Error

View Answer Report Error Discuss

Filed Under: World Organisations
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

3 5538
Q:

Commissioners for the Affairs of India were known as 

A) Court of directors B) Board of Directors
C) Board of Control D) Board of Merchants
 
Answer & Explanation Answer: C) Board of Control

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

6 5537
Q:

Pushkalavati was capital of which of the following acient Kingdoms ?

A) Magadha B) Kashi
C) Gandhara D) Kosal
 
Answer & Explanation Answer: C) Gandhara

Explanation:

Pushkalavati was capital of ancient Kingdom of Gandhara. Its ruins are currently located in Charsadda, Pakistan, located in Peshawar valley in the Khyber Pakhtunkhwa province (formerly NWFP). Pushkalavati was home of the Sanskrit grammarian Panini.

Report Error

View Answer Report Error Discuss

Filed Under: Indian History
Exam Prep: Bank Exams

12 5536
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 5536
Q:

Late Raja Ravi Verma, was an eminent figure in which of the following fields

A) Dance B) Politics
C) History D) Painting
 
Answer & Explanation Answer: D) Painting

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

3 5533