Questions

Q:

What would be the output of the following program?

main()

{

    extern int fun ( float );

    int a;

    a = fun ( 3. 14 );

    printf ("%d", a);

}

int fun ( aa )

float aa ;

{

     return ( (int) aa );

}

Answer

Error occurs because we have mixed the ANSI prototype with K & R style of function definition.


When we use ANSI prototype for a function and pass a float to the function it is promoted to a double. When the function accepts this double into a float a type mismatch occurs hence the error.


The remedy for this error could be to define the function as :


int fun (float aa)


{


  ....


}

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

9 8493
Q:

Whose period was known as the Golden Age of Rome?

Answer

 Augustus Caesar

Report Error

View answer Workspace Report Error Discuss

Subject: World History

21 8487
Q:

Among the following States, which one was formed last

A) Andhra Pradesh B) Gujarat
C) Karnataka D) Punjab
 
Answer & Explanation Answer: A) Andhra Pradesh

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

12 8487
Q:

Which one of the following industries is the biggest consumer of water in India?

 

A) Engineering B) Paper and pulp
C) Taxtiles D) Thermal power
 
Answer & Explanation Answer: D) Thermal power

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: Bank Exams

3 8485
Q:

The Indus valley people traded with the

A) Chinese B) Mesopotamians
C) Parthians D) Romans
 
Answer & Explanation Answer: B) Mesopotamians

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

12 8484
Q:

Improve the bracketed part of the sentence.

We don't need our computers to be infinitely fast, just a whole lot (faster than) they are today.

A) as fast as B) faster then
C) more faster than D) no improvement
 
Answer & Explanation Answer: D) no improvement

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 8482
Q:

Complete the following sentence with the most appropriate option.

 

A king will always have a ____.

 

A) Minister B) Kingdom
C) Sword D) Queen
 
Answer & Explanation Answer: B) Kingdom

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

1 8479
Q:

The term ' Regur ' is used for

A) Alluvial soil B) Peat soil
C) Laterite soil D) Black soil
 
Answer & Explanation Answer: D) Black soil

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

12 8477