| |
GeekInterview.com > Interview Questions > Programming > C
| Print | |
Question: Fix Function
Answer: Write the implementation of Fix function? fix(2.5) = 2 and fix(-2.25) = -3, this is the expected result. Write the code to implement this behaviour? |
| April 04, 2009 05:29:28 |
#8 |
| kushaagra |
Member Since: April 2009 Total Comments: 1 |
RE: Fix Function |
| #include<math.h> #include<conio.h> #include<stdio.h>
void main() { clrscr(); printf("n The Value of 2.25 is = %lf, and -2.25 is = %lf",floor(2.25), floor(-2.25)); getch(); } |
| |
Back To Question | |