It's quite easy actually. ;)
The key is, when you exceed the maximum of a data type SOMETHING is going to go haywire. When you exceed a positive integer, it might go negative (or do something else).
A simple while loop (or for loop) will get you "close". Just keeping multiplying a test number of that data type, by 2. When you are "close", you might want to get even closer by using a smaller number, say 1.4, etc.
But you have to find out what "haywire" is for your compiler, and recognize it, in your code. When I did this, I found I could go quite a ways past that limit in the header, before it went "bonkers", with the number.
Don't be put off by the huge size of the floating point range - you multiple by 2 and you'll be as far as you want to go with x 2, pretty quickly.
Mine went x2, for N times, then another loop took the number x 1.6, for N2 times, then a third loop took the number x 1.4, and finally addition was used to zero in the maximum value (which was well beyond the value in limits.h).
I don't want to spoil it by posting my code for it - it's a great exercise to build up your problem solving skills.