Questions

Q:

We want to round off x, a Float to an Int value. The correct way to do so would be

A) Y = ( int ) ( x + 0.5 ) ; B) Y = int ( x + 0.5) ;
C) Y = ( int ) x + 0.5; D) Y = ( int ) ( ( int ) x + 0.5 )
 
Answer & Explanation Answer: A) Y = ( int ) ( x + 0.5 ) ;

Explanation:

Rounding off a value means replacing it by a nearest value that is approximately equal or smaller or greater to the given number.

 

y = (int)(x + 0.5); here x is any float value. To roundoff, we have to typecast the value of x by using (int)

 

Example:

 

#include

 

int main ()

 

{

 

  float x = 2.6;

 

  int y = (int)(x + 0.5);

 

  printf ("Result = %d\n", y );

 

  return 0;

 

}

 

Result : 3

Report Error

View Answer Report Error Discuss

Filed Under: Programming

2 5374
Q:

Which of the following is not an agency of UN

A) World Health Organisation B) International Monetary Fund
C) International Committee of the Red Cross D) Food and Agricultural Organization
 
Answer & Explanation Answer: C) International Committee of the Red Cross

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Organisations

4 5372
Q:

Which of the statements given below are correct?

1. The author of the novel 'Fellside' is Victor LaValle.
2. The author of the novel 'A Head Full of Ghosts' is M.R Carey.
3. The author of the novel 'Brave New World' is Aldous Huxley.

A) 1 and 2 B) 2 and 3
C) 1 and 3 D) 1, 2 and 3
 
Answer & Explanation Answer: A) 1 and 2

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: Bank Exams

0 5371
Q:

As per the results of the 2011 Populatiom Census, which of the following groups occupies the three top places in respect of literacy?

A) Kerala, Goa, West Bengal B) Chandigarh, Goa, Kerala
C) Kerala, Lakshadweep, Mizoram D) Mizoram, Kerala, Tripura
 
Answer & Explanation Answer: D) Mizoram, Kerala, Tripura

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

91 5370
Q:

Match the following items of column A with column B.

 

 

A) I – 3, II – 1, III – 2   B) I – 2, II – 1, III – 3  
C) I – 2, II – 3, III – 1   D) I – 1, II – 2, III – 3
 
Answer & Explanation Answer: B) I – 2, II – 1, III – 3  

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: Bank Exams

2 5366
Q:

Which of the following is most urbanised State of India

A) Maharashtra B) Mizoram
C) Goa D) Tamil Nadu
 
Answer & Explanation Answer: C) Goa

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

5 5365
Q:

Pulakesin II belongs to _______ Kingdom.

A) Cholas B) Satavahanas
C) Gupthas D) Chalukyas
 
Answer & Explanation Answer: D) Chalukyas

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

17 5365
Q:

Deficiency of 'Thiamine'

A) Beri-Beri B) Pellagra
C) Anaemia D) Rickets
 
Answer & Explanation Answer: A) Beri-Beri

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

17 5364