Thursday, December 25, 2008

Integer and float conversion

For efficient C programming, one has to understand the rules for conversion of floating point and integer values in C. {also see: Types of Arithmetic statement}
Some of the points are discussed below which are very important while writing an efficient C program.
  1. An arithmetic operation between two integers always produce an integer result.
  2. An arithmetic operation between two real always produce a real result.
  3. An arithmetic operation between an integer and real always produce a real result.

No comments:

Post a Comment

Please give your valuable comments or queries if you fell its helpful or if you like the contents of the site. Thanks...