Starting from:
$35

$29

Programming Project 2 Solution

Comparing the size and address of all kind of variables in your computer.







Declare an integer variable or dynamically allocate an integer variable.



Assign a value to the integer variable.

Print the value of the integer, the address of the integer variable, and the size (number of bytes) of the integer variable. Proper messages are required in the output to be readable.




Do the same thing for all kinds of standard data types including but no limited to the following:






int, bool, char, short,
long int,
long


float, double, long double,






first element of double
array[5},




all elements of int array[4],
to integer,
.
and pointer variable pointing
and pointer variable pointing
to float.
For invalid data types, indicate
so in
the
output.
If you need values in the variable, you can put any correct vales into the variable.




b. The following should apply to all assignments during the semester.




Turn in with hard copy and the program and the output must be professional and the turn-in should include the source Program, and the displayed outputs as described above. Proper message in the output is required to indicate the execution and different outputs. Turn in all assignments in class. It will have late penalty 10% if your turn in 30 minutes after the class begins.




c. Anything not mentioned in this assignment, you are free to do whatever you desire. No need to ask questions.




d. Hint: Use program 9.1, 9.2, and 9.3

More products