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 5545
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 5544
Q:

26 L of the A?

Answer

The given letter equation 26 L of the A implies that 26 Letters of the Alphabet.

Report Error

View answer Workspace Report Error Discuss

Subject: Logic Puzzles Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

7 5544
Q:

World’s largest floating Solar Farm launched in ____________.

A) Japan B) China
C) Russia D) France
 
Answer & Explanation Answer: B) China

Explanation:

China flicked the switch on the world’s largest floating solar energy plant.  The massive waterborne plant is expected to generate 40 megawatts at one time and could supply electricity for over 15,000 homes. The pioneering project, located in eastern China, is thought to cement China’s status as a top producer of solar energy in the world.  The plant has been built in Huainan city, Anhui Province, by Sungrow Power Supply, a Chinese company specialised in renewable energy.

Report Error

View Answer Report Error Discuss

Filed Under: Longest, Shortest, Deepest
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

11 5541
Q:

Minjar Fair is the important fair celebrated in Chamba district. What does 'Minjar' represent for  ?

A) Lotus flowers B) Wheat flowers
C) Local Custom D) Maize flowers
 
Answer & Explanation Answer: D) Maize flowers

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Famous Places
Exam Prep: Bank Exams

6 5539
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 5539
Q:

I am always infront of you, but you will never see me. Who am I?

A) Mirror B) Shadow
C) Future D) None of the above
 
Answer & Explanation Answer: C) Future

Explanation:

Yes, future is always infront of us, but no one can see it.

Report Error

View Answer Report Error Discuss

3 5535
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 5534