4 ms·
> only the first 50 integers or the first 100 integers https://gcc.gnu.org/wiki/avr-gcc https://gcc.gnu.org/wiki/avr-gcc
by felixr 6y ago
> only the first 50 integers
or the first 100 integers https://gcc.gnu.org/wiki/avr-gcc https://gcc.gnu.org/wiki/avr-gcc
- MertsA 6y agoFor anyone who isn't well versed in C, int is most of the time 32 bits but it's architecture dependent with some machines being e.g. 16 bit. If you need the size to be exactly 32 bits then you can just use int32_t or similar and let the compiler make that happen regardless of the architecture it's compiling to. The original code should have specified 200 * sizeof(int) or better yet since it's a local variable just ditch the memset and change it to int hasz[200] = {}; which will do the same.