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

Guess the Number missed in Number Challenge ?

18034303_1300193573421077_7214011606574212801_n1499930701.jpg image

A) 3 B) 5
C) 9 D) 1
 
Answer & Explanation Answer: B) 5

Explanation:

Sum of numbers in all individual boxes must be equal.

Here sum must be equal to 30.

=> x + 14 + 9 + 2 = 30 => x = 5. 

Report Error

View Answer Report Error Discuss

Filed Under: Number Puzzles
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

15 5466
Q:

If both the office of President and Vice-president vacant, who has been empowered the President function.

A) Chief Justice B) Prime Minister
C) Speaker of Loksabha D) Chief of Army Staff
 
Answer & Explanation Answer: A) Chief Justice

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

2 5466
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 5465
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 5463
Q:

The first battle of Panipat (1526) was fought between

A) Akbar and Hemu B) Babur and Rana Sanga
C) Ibrahim Lodhi and Babur D) Prithviraj Chauhan and Mohd Gauri
 
Answer & Explanation Answer: C) Ibrahim Lodhi and Babur

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

13 5462
Q:

What is formed by all the ecosystems of the earth?

A) Biosphere B) Troposphere
C) Stratosphere D) Ionosphere
 
Answer & Explanation Answer: A) Biosphere

Explanation:

A biosphere is the sum of all the ecosystems established on planet Earth.

An ecosystem is an area in which the plants and animals all interact to create a living environment. Therefore ecosystem is a smaller unit of earth, all ecosystems together form the earth.

 

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT , GATE , GRE
Job Role: Analyst , Bank Clerk , Bank PO , IT Trainer

1 5461
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 5460