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

The mass of one molecule of oxygen is

 

A) 2.3 x 10-23 g B) 3.3 x 10-23 g
C) 4.3 x 10-23 g D) 5.3 x 10-23 g
 
Answer & Explanation Answer: D) 5.3 x 10-23 g

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: AIEEE , Bank Exams

4 8423
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:

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 8419
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 8416
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 8411
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 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