1.

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» B. Y = int ( x + 0.5) ;


Discussion

No Comment Found

Related MCQs