Welcome Guest | Sign in | Register
Inbuilt Functions - Discussion Page For Q.10722 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Inbuilt Functions > Questions and Answers

Q: What will the code below print when executed?
Code:
double x = -3.5, y = 3.5;
printf( "%.0f : %.0f\n", ceil( x ), ceil( y ) );
printf( "%.0f : %.0f\n", floor( x ), floor( y ) );
ceil =>rounds up 3.2=4 floor =>rounds down 3.2=3 
A. -3 : 4
-4 : 3
B. -4 : 4
-3 : 3 
C. -4 : 3
-4 : 3 
D. -4 : 3
-3 : 4 
E. -3 : 3
-4 : 4

Answer and Explanation

Answer:-3 : 4
-4 : 3

Explanation:
There is no explanation...

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.