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

Crack the Logical #MathPuzzle?

24131501_1487128788060887_7609767785986555556_n1512621550.jpg image

Answer

From given data,


Rs. 1 = 40 strawberries => Rs. 2 = 80 strawberries


Rs. 5  = 1 apple => Rs. 95 = 19 apple.


Rs. 3 = 1 mango => Rs. 3 = 1, mango


Now, Total So 100 Rs = 100 Fruits.

Report Error

View answer Workspace Report Error Discuss

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

12 5126
Q:

Africa is seperated from Europe by

A) Red Sea B) Mediterranean Sea
C) Atlantic Ocean D) Persian Gulf
 
Answer & Explanation Answer: B) Mediterranean Sea

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

17 5125
Q:

What is the capital of Telangana?

A) Warangal B) Hyderabad
C) Nizamabad D) Adilabad
 
Answer & Explanation Answer: B) Hyderabad

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

13 5122
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 5116
Q:

An atom bomb based upon the principal of ________

A) Nuclear fission B) Nuclear fussion
C) Controlled chain reaction D) None of these
 
Answer & Explanation Answer: A) Nuclear fission

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics

7 5112
Q:

Quartz composed of which two elements

A) Iron and magnesium B) Iron and oxygen
C) Oxygen and silicon D) Silicon and iron
 
Answer & Explanation Answer: C) Oxygen and silicon

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

1 5112
Q:

Why do Fold mountains have enormous thickness of sedimentary rocks?

A) Due to deposition of sediments in a valley for milions of years B) Due to accumulation of sediments in a geosyncline
C) The plains were folded into mountains D) The sediments were folded into recumbent and nappe
 
Answer & Explanation Answer: B) Due to accumulation of sediments in a geosyncline

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

1 5112