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 8971
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 8965
Q:

The cross section of a chisel is usually

A) Octagonal B) Rectangular
C) Hexagonal D) Circular
 
Answer & Explanation Answer: A) Octagonal

Explanation:

The cross section of a chisel is usually octagonal.

103313_xl1545906956.jpg image

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk

3 8962
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 8959
Q:

There are approximately how many muscles in Human body ?

A) 206 B) 310
C) 554 D) 700
 
Answer & Explanation Answer: D) 700

Explanation:

Approximatey there are 700 muscles in Human body.

Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE , Bank Exams
Job Role: Bank Clerk

46 8950
Q:

What has three feet but no toes?

Answer

A Yardstick has three feet used for measuring but no toes.

Report Error

View answer Workspace Report Error Discuss

Subject: Word Puzzles Exam Prep: CAT , Bank Exams , AIEEE
Job Role: Bank PO , Bank Clerk , Analyst

47 8944
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 8940
Q:

Which one of the following liberty is not embodied in the Preamble to the Constitution of India?

A) Liberty of Thought B) Liberty of Expression
C) Liberty of Belief D) Economic Liberty
 
Answer & Explanation Answer: D) Economic Liberty

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

9 8935