Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

  1. 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)

  2. Answer the following question: Does adding the static keyword to the declaration of these variables in your program change their size?

  3. 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.

  4. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago