GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  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 08:50:06 #7
 tweeto   Member Since: April 2009    Total Comments: 1 

RE: Fix Function
 
int Fix( float x)
{
      return (int)x;
}
     

 

Back To Question