![]() |
syntax in c???
does the symbol % represent remainder as in java ???? :confused:
thnx rockie team |
Re: syntax in c???
yes.
|
Re: syntax in c???
% is usually called the "mod" or "modulus" operator, but that means the same thing as remainder.
A couple of things to be careful of. The behavior of % with negative operands is not standardized. In Code:
( a % b )The order of precedence of '%' is the same as for '*' and '/', which is higher than for '+' and '-'. So Code:
( ii + 16 % 8 )Code:
(ii + 0)Code:
(ii)Code:
( (ii+16) % 8 )-norm |
| All times are GMT -5. The time now is 02:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi