Sujet : Re: if(!(i%16))
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 30. Mar 2024, 23:36:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uua45d$18naj$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
On 30/03/2024 21:44, fir wrote:
void bytes_dump_in_hex()
{
for(int i=0; i<bytes_size; i++)
{
if(!(i%16)) printf("\n");
printf("%02x ", bytes[i]);
}
}
in the code above seem that those inner () in if(!(i%16)) are needed
why is that so?
Without them !i%16 will be parsed as (!i)%16.