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

Rearrange the parts of the sentence in correct order.

 

A truly free nation will

P-will fail in the marketplace of ideas
Q-destruction as a bad idea that
R-confidently view even its advocated

 

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

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 8405
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 8401
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 8398
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 8397
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 8397
Q:

What are the stipulations of C2 level security?

Answer

C2 level security provides for:


 


1.Discretionary Access Control


2.Identification and Authentication


3.Auditing


4.Resource reuse

Report Error

View answer Workspace Report Error Discuss

19 8392
Q:

Which amendments are the bill of rights?

 

A) Amendments 2 to 5 B) Amendments 1 to 8
C) Amendments 1 to 10 D) Amendments 8 to 10
 
Answer & Explanation Answer: C) Amendments 1 to 10

Explanation:

The Bill of Rights is the first 10 Amendments to the Constitution. 

And it specifies that "the enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people."

 

Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: Bank Exams

0 8392