Quantcast
Channel: MPLAB XC16
Viewing all articles
Browse latest Browse all 1508

the % (modulus) operator does not work ?! (neworld)

$
0
0
unsigned char p; p = 15;p = p % 2;printf("\n\rp = %d", p);//prints p = 1 p = 14;p = p % 2;printf("\n\rp = %d", p);//prints p = 1 haha, love to hear the explanation behind this. tried xc16 v1.24 and v1.25..

Viewing all articles
Browse latest Browse all 1508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>