Description
Define the INT, the deduction of the SHORT type, and output their storage space (unit: byte) in turn.
Input
none.
OUTPUT
One line, two integers, the storage space size of the two variables, is separated by a space.
Input Sample
OUTPUT SAMPLE
(Not provided)
`
hint
Use the sizeOF function to obtain a storage space of a specific variable. For example: For int variable x, the value of sizeof (x) is 4, that is, the storage space of x is 4 bytes.
Answer
CPP
include
using namespace std;
int Main ()
{{
int a, e, f;
Short B;
e = sizeof (a);
f = sizeof (b);
COUT << E << "" << f << Endl;
Return 0;
}
Result
Used Memory: 128KB
Run time: 1ms
Language: G ++
Submit time: 2019-03-24 09:40:36
Proplem Link
http://noi.openjudge.cn/ch0102/01/
OpenJudge 01:Size of integer data type storage space
Comments