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

Find the odd word/letters/number from the given alternatives.

(A) BCE (B) WXZ (C) MNP (D) GHK

A) A B) B
C) C D) D
 
Answer & Explanation Answer: D) D

Explanation:
Report Error

View Answer Report Error Discuss

0 8428
Q:

Which country is set to register Himalayan pink salt as Geographical Indications (GI)?

 

A) Pakistan B) Nepal
C) Bangladesh D) India
 
Answer & Explanation Answer: A) Pakistan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

1 8428
Q:

Rearrange the parts of the sentence in correct order.

Public goods are
P-important as they
Q-mitigate the impact of
R-income poverty and inequality

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

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 8428
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 8423
Q:

Which statement about broadheads is true?

A) Use needle-nose pliers or locking pliers to screw on broadheads B) Broadheads are risk-free
C) Dress game with great caution until you find all parts of the broadhead D) Broadheads have a dull edge
 
Answer & Explanation Answer: C) Dress game with great caution until you find all parts of the broadhead

Explanation:

The statement about broadheads is true is Dress game with great caution until you find all parts of the broadhead.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

5 8422
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 8419
Q:

The Indian Council of 1892 Act was based on which plan?

 

A) Northbrook Plan B) Dufferin Plan
C) Ripon Plan D) Gladstone Plan
 
Answer & Explanation Answer: B) Dufferin Plan

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: Bank Exams

1 8415