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

Select the antonym of

bland

A) blah B) insipid
C) tame D) lively
 
Answer & Explanation Answer: D) lively

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

1 8412
Q:

Rearrange the parts of the sentence in correct order.

To begin with,

P-­is not that they are 'unsmart'
Q-­the problem with Indian cities
R-­but that they are dysfunctional

A) RPQ B) QRP
C) QPR D) PRQ
 
Answer & Explanation Answer: C) QPR

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 8411
Q:

The famous book Kankal is authored by ?

A) Ketan Bhagat B) Mahesh Rao
C) Nirmal Verma D) Jaishankar Prasad
 
Answer & Explanation Answer: D) Jaishankar Prasad

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: Bank Exams , CAT
Job Role: Bank PO

23 8410
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 8409
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 8407
Q:

What is the purpose of adding Gypsum to the cement?

 

A) For lubrication B) To slow down its rate of setting
C) To increase its rate of setting D) To make it strong
 
Answer & Explanation Answer: B) To slow down its rate of setting

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: Bank Exams

1 8404
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 8402