CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

float to integer conversion

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
asimraufawan



Joined: 04 Jul 2008
Posts: 12
Location: Karachi Pakistan

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

float to integer conversion
PostPosted: Fri Sep 04, 2009 5:46 am     Reply with quote

how to convert the floating value into integer or long integer.
Ttelmah
Guest







PostPosted: Fri Sep 04, 2009 6:59 am     Reply with quote

C does this automatically. Just pass a value from a float variable to a int variable, and the int variable receives the integer part of the float. A search here will find a lot of examples, and also if you search on the keyword 'cast', you will find how to force the conversion at different points in an equation.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group