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 5094
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 5093
Q:

Which of the statements given below are correct?

1. The author of the novel 'Half of a Yellow Sun' is Chimamanda Ngozi Adichie.
2. The author of the novel 'Middlesex' is Jeffrey Eugenides.
3. The author of the novel 'Missile Gap' is China Mieville.

A) 1 and 2 B) 2 and 3
C) 1 and 3 D) 1, 2 and 3
 
Answer & Explanation Answer: A) 1 and 2

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: Bank Exams

0 5091
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 5090
Q:

This Union Territory possesses a coastal stretch of about 45 km with 28 marine fishing villages. However 45% of the population is engaged in agricultural and allied products.
Which among the following Union Territories is referred to in the above passage

A) Lakshadweep B) Pondicherry
C) Andaman and Nicobar D) Daman
 
Answer & Explanation Answer: A) Lakshadweep

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

11 5090
Q:

Select the antonym of

 

cosset

 

A) ignore B) close
C) caress D) fondle
 
Answer & Explanation Answer: A) ignore

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 5087
Q:

Dome mountain are the result of

A) Intrusion of magma B) Folding
C) Frictions at the joints of the rocks D) Faulting
 
Answer & Explanation Answer: A) Intrusion of magma

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography

5 5085
Q:

When was the national emblem of Bangladesh adopted?

 

A) 1971 B) 1973  
C) 1975   D) 1977
 
Answer & Explanation Answer: A) 1971

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

3 5085