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

Safdar Hashmi is a name associated with

A) Drawing and Painting B) Journalism
C) Instrumental Music D) None of these
 
Answer & Explanation Answer: D) None of these

Explanation:

Correct Answer : Safdar Hashmi is a name associated with Drama

Report Error

View Answer Report Error Discuss

Filed Under: Famous Personalities

21 8974
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 8973
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 8968
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 8959
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 8948
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 8945