You are on page 1of 2

INTRODUCTION OF PROGRAMMING

ASSIGNMENT NO 1

SUBITLE: C++
Name: Syed Abdul Moiz Shah
Reg No: 3349
Integer:
Integer it is 4 bytes on 64-bit.This is one of the points in c++ that can be confusing at first, but
the c++ standard only specifies a minimum range for integer types, that is guaranteed to be
supported. It is 16-bit required in this case int is 2bytes.

Float:
Float data type allow a variable to store decimal values. Storage size of float is 4 bytes.

Character
Character data type allows a variable to store only. Storage size of char is 1 .

Double
Double allows double variables and numbers. Its size is 8 bytes.

Size of int: 4 bytes or 2 bytes

Size of float: 4 bytes

Size of double: 8 bytes

Size of char: 1byte

Reason to justify the answer

There are 4 variables integer type, float type, double type, character type respectively. Then the size of
each variables is possible using size of operator

You might also like