Question
Prints out the size of (theres a hint, by the way) variables with the following C data types int, long, unsigned, long long, char, float
-
Prints out the size of (theres a hint, by the way) variables with the following C data types int, long, unsigned, long long, char, float and double. This is how many bytes of memory a variable of that type occupies on this machine, using your chosen compiler. (Xcode)
-
Answer the following question: Does adding the static keyword to the declaration of these variables in your program change their size?
-
Answer the following question: What is the largest number and smallest numbers that can be represented in the variables in your program with the following C data type int, long, long long, unsigned, char. This is asking about the range of values, not just the size of the variable. Of course, you could Google this, but I strongly recommend that you construct a program that prints out these values, to ensure that they really are the limits of your particular compiler installation. Usually the needed values, such as MAX_INT, can be gotten from the limits.h file supplied with your compiler/IDE.
-
Answer the following question: Which of these types allow negative numbers to be meaningfully assigned as values? (int, unsigned, char, long)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started