|
On 2014-04-01 04:46, frank kolmann wrote:
I have coded my first C program.
One thing I noticed is that you have a numeric constant starting with zero.
#define I03 02
In C, when a numeric constant starts with zero, it's an octal constant (base 8). You're ok with 02 since it means 2 in both decimal and octal.
But if was a constant like 023, it would be 19 in octal (2*8 + 3)
Barbara Morris
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.