When I only use short integers in my program, is it better to use:
void printVars(int x1, int x2, int x3)
or
void printVars(short int x1, short int x2, short int x3)
as argument for my functions?
Thank you in advance.
If you are 100% sure you will never use bigger integers than short int, it's better to use it as it might save 2 bytes (in most of the cases, on most systems, but not necessarily). It's indeed always a good idea to not use more resources than you need. The difference would probably be negligible with most applications though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With