This problem for my intro to C coding class states:
Write a program that will determine the biggest positive value that your machine can achieve for each of the following data types. (and thus you can figure out the number of bits used for each of the data types). In order to find the biggest value, use a simple loop structure that increments a variable of that datatype, until it overflows.
It instructs me to do it with multiple data types, such as int
, char
, short int
, etc.
Im not really sure what the question is asking, am I just supposed to make an infinite loop that takes a variable of certain data type, and increase its value every time until it gets so big that the program breaks?? Or is it asking something totally different