bcarter5876 is right, but I didn’t know the “obtuse” reason behind it (although I see it now… sort of). But I came up with an answer (the wrong one, at first, but I was close) and used this code to check it:
short smallestNumber = -32768;
short largestNumber = 32767;
printf("smallestNumber = %d\n", smallestNumber);
printf("largestNumber = %d\n", largestNumber);
If it printed the correct number, I knew largestNumber wasn’t too big, but it might be too small. But if the number wasn’t displayed as I assigned it, I knew it was too big. So in the example above, if I increase largestNumber by 1, I get a value other than what I assigned to it (-32768 if short largestNumber = 32768; wrong sign!), and I knew the number just below that was the largest number possible. I did the same with the smallestNumber variable, but i decreased it.
I know this isn’t elegant, but it is a way to prove which number is correct if you think you have the right answer without looking at the forums for the answer. I didn’t see anyone else mention this, so I thought I’d share. Not sure if that helps anyone.