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

India’s longest bridge “Dhola-Sadia Bridge” has built over which tributary of the Brahmaputra River ?

A) Kameng River B) Lohit River
C) Subansiri River D) Manas River
 
Answer & Explanation Answer: B) Lohit River

Explanation:

The Prime Minister Narendra Modi has inaugurated India’s longest bridge “Dhola-Sadia Bridge” in Assam on May 26, 2017. This three lane, 9.15 kilometre bridge has been built over river Lohit, a tributary of the Brahmaputra river. It links Dhola in Assam to Sadia. The bridge will reduce the distance from Rupai on NH- 37 in Assam to Meka-Roing on NH-52 in Arunachal Pradesh by 165 KM. The travel time between the two places will come down from the current six hours to just one hour, a total five hour reduction. This will result in saving of petrol and diesel worth Rs 10 Lakh per day. It will also cater to the strategic requirements of the country in the border areas of Arunachal Pradesh, besides facilitating numerous hydro power projects coming up in the state.

Report Error

View Answer Report Error Discuss

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

19 5371
Q:

World Tobacco Day is celebrated on _____ ?

A) 30 May B) 31 May
C) 1 June D) 5 June
 
Answer & Explanation Answer: B) 31 May

Explanation:
Report Error

View Answer Report Error Discuss

10 5370
Q:

An office is divided into 8 cubicles. How many of the cubicles are painted if only 1/8 of the cubicles are painted?

A) 2 B) 4
C) 8 D) 1
 
Answer & Explanation Answer: D) 1

Explanation:

Given total number of the cubicles = 8

Given that only 1/8 of the cubicle is painted

 

Then of the total 8 cubicles, 1/8 is

 

1/8 x 1 = 1 cubicle. 

Report Error

View Answer Report Error Discuss

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

16 5369
Q:

When a ray of light is  refracted by a prism such that the angle of deviation is minimum then

A) the angle of emergence is equal to the angle of incidence B) the angle of emergence is greater than the angle of incidence
C) the angle of emergence is smaller than the angle of incidence D) the sum of the angle of incidence and the angle of emergence is equal to 90 degrees
 
Answer & Explanation Answer: A) the angle of emergence is equal to the angle of incidence

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics

5 5367
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 5365
Q:

Washing soda is 

A) sodium hydroxide B) sodium carbonate
C) sodium bicorbonate D) Potassium chloride
 
Answer & Explanation Answer: B) sodium carbonate

Explanation:

Sodium hydroxide - NaOH is caustic soda

 

Sodium carbonate - Na2CO3 is washing soda

 

Sodium bicarbonate - NaHCO3  is baking soda 

Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: AIEEE

7 5365
Q:

Which is fastest swimming fish

Answer

sailfish

Report Error

View answer Workspace Report Error Discuss

34 5362