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

What is the national sport of Pakistan?

 

A) Cricket B) Football
C) Hockey D) Table Tennis  
 
Answer & Explanation Answer: C) Hockey

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Sports
Exam Prep: Bank Exams

1 5368
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 5368
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 5363
Q:

Greek Roman art has found a place in

A) Buddhist Art B) Ellora
C) Kalinga D) Gandhara
 
Answer & Explanation Answer: A) Buddhist Art

Explanation:
Report Error

View Answer Report Error Discuss

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

8 5362
Q:

Which is the National Aquatic Animal of India?

A) Penguin B) Whale
C) River Dolphin D) Seal
 
Answer & Explanation Answer: C) River Dolphin

Explanation:

River Dolphin is the National Aquatic Animal of India.

Which_is_the_National_Aquatic_Animal_of_India1548756729.jpg image

Report Error

View Answer Report Error Discuss

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

7 5359