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

A spreadsheet contains

A) Rows B) Columns
C) Both A & B D) Tables
 
Answer & Explanation Answer: C) Both A & B

Explanation:

A_spreadsheet_contains1553603758.png image

 

A spreadsheet contains both rows and columns.

Report Error

View Answer Report Error Discuss

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

5 8908
Q:

Hoshangabad is situated on the bank of the river

A) Godavari B) Narmada
C) Musi D) Mahanadi
 
Answer & Explanation Answer: B) Narmada

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

20 8906
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 8905
Q:

Whose period was known as the Golden Age of Rome?

Answer

 Augustus Caesar

Report Error

View answer Workspace Report Error Discuss

Subject: World History

21 8901
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 8899
Q:

English is the official language of which one of the following Indian States?

A) Nagaland B) Tripura
C) Assam D) Manipur
 
Answer & Explanation Answer: A) Nagaland

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

13 8895
Q:

Riddle

How can you add eight 8's to get the number 1,000? (only use addition)

Answer

The key to this math riddle is realizing that the one place must be zero.
888 +88 +8 +8 +8 =1,000

Report Error

View answer Workspace Report Error Discuss

Subject: Math Puzzles

26 8895