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 5367
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:

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:

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

Default read write and execute permissions given to a file for owner, group and others are

A) 6-4-4 B) 6-4-2
C) 6-4-6 D) 6-6-6
 
Answer & Explanation Answer: A) 6-4-4

Explanation:

Default permissions given to a file are:

Owner - read write and execute - 6

group - write - 4

others - write - 4

Report Error

View Answer Report Error Discuss

6 5359