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

Tochi, Gilgit and Hunza are tributaries of

A) Ganga B) Indus
C) Brahmaputra D) Yamuna
 
Answer & Explanation Answer: B) Indus

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

19 8437
Q:

At which one of the following places do two important rivers of India originate;while one of them flows towards north and merges with another important river flowing towards Bay of Bengal, the other one flows towards Arabian Sea?

A) Amarkantak B) Badrinath
C) Mahabaleshwar D) Nasik
 
Answer & Explanation Answer: A) Amarkantak

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

16 8433
Q:

The Machkund project is a joint project of which two states?

 

A) West Bengal and Odisha   B) West Bengal and Bihar  
C) Odisha and Andhra Pradesh   D) Karnataka and Andhra Pradesh  
 
Answer & Explanation Answer: C) Odisha and Andhra Pradesh  

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: Bank Exams

2 8433
Q:

Where was the 7th edition of Rashtriya Sanskriti Mahotsava held from 14 January to 20 January, 2018?

 

A) New Delhi B) Bengaluru
C) Jaipur D) Kanpur
 
Answer & Explanation Answer: B) Bengaluru

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

1 8428
Q:

An objective of the National Food Security Mission is to increase the production of certain crops through area expansion and productivity enhancement in a sustainable manner in the identified districts of the country. What are those crops?

A) Rice and Wheat only B) Rice, Wheat and pulses only
C) Rice, Wheat, Pulses and oil seeds only D) Rice, Wheat, Pulses, oil seeds and vegetables
 
Answer & Explanation Answer: B) Rice, Wheat and pulses only

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

8 8427
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 8425
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 8423