Question: #include #include #include using namespace std; int main ( ) { int i = 7 , j = 3 ; float f 1 = 7
#include
#include
#include
using namespace std;
int main
int i j ;
float f f;
char c c cA;
bool flag true;
string s s sA;
cout
Properties of a variable
;
cout "Name: itType: inttValue: i tMemory Location:
&i endl;
cout
A Integer Type
;
cout ij ij endl;
cout ij ij endl;
cout ij ij endl;
cout ij ij endl;
cout ij ij endl;
cout
B operator
;
cout i i endl;
cout i i endl;
cout
C Float Type
;
cout ff ff endl;
cout ff ff endl;
cout ff ff endl;
cout ff ff endl;
cout
D Character Type
;
cout "the integer value of char c intc endl;
cout "the integer value of char c intc endl;
cout
E String Type
;
cout ss endl;
cout
F Memory Allocation Type
;
cout "memory allocation for integer type short:
sizeofshort bytes
;
cout "memory allocation for integer type:
sizeofint bytes
;
cout "memory allocation for Unsigned type:
sizeofunsigned bytes
;
cout "memory allocation for long integer type:
sizeoflong int bytes
;
cout "memory allocation for long long integer type:
sizeoflong long int bytes
;
cout "memory allocation for float type:
sizeoffloat bytes
;
cout "memory allocation for float type double:
sizeofdouble bytes
;
cout "memory allocation for char type: sizeofchar
bytes
;
cout "memory allocation for boolean type: sizeofbool
bytes
;
cout "memory allocation for char A: sizeofc
bytes
;
cout "memory allocation for string A: sizeofs
bytes
;
cout "memory allocation for A sizeofA bytes
;
cout
G Constant Values
;
cout the actual value depends on the particular system
and library implementation. endl;
cout "Minimum value for an object of type int: INTMIN endl;
cout "Maximum value for an object of type int: INTMAX endl;
cout "Maximum value for an object of type unsigned int:
UINTMAX endl;
cout "Minimum value for an object of type long int:
LONGMIN endl;
cout "Maximum value for an object of type long int:
LONGMAX endl;
cout "Maximum value for an object of type unsigned long int:
ULONGMAX endl;
cout "Minimum value for an object of type long long int:
LLONGMIN endl;
cout "Maximum value for an object of type long long int:
LLONGMAX endl;
cout "Maximum value for an object of type unsigned long long int:
ULLONGMAX endl;
return ;
Why the results are different between int division in part A and float division in part C
Explain the result of the operations in Part B
What is the integer value of a character?
Is there any correlation between the memory size and the maximum value of an object of
that type? Explain your answer.
What is an integer overflow? Give an example.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
