📖 Samacheer Kalvi · 11th TN - English Medium · Computer Science · Page 138question

Data Types, Variables and Expressions · Part 5

Chapter 3: 4 · Computer Science

of bytes in terms of bits char byte bits - to int bytes bits - , to , float bytes bits . × - to . × - double bytes bits . × - to .

× - . . Data type modifiers: Modifiers are used to modify the storing capacity of a fundamental data type except void type. Usually, every fundamental data type has a fixed range of values to store data items in memory.

For example, int data type can store only two bytes of data. In reality, some integer data may have more length and may need more space in memory. In this situation, we should modify the memory space to accommodate large integer values. Modifiers can be used to modify (expand or reduce) the memory allocation of any fundamental data type.

They are also called as Qualifiers. There are four modifiers used in C++. They are: ( ) signed ( ) unsigned ( ) long ( ) short These four modifiers can be used with any fundamental data type. The following Table .

shows the memory allocation for each data type with and without modifiers. Integer type Table . Memory allocation for Data types Data type Space in memory Range of value in terms of bytes in terms of bits short short is a short name for short int bytes bits - , to , unsigned short an integer number without minus sign. bytes bits to 65535 signed short An integer number with minus sign bytes bits - , to , Both short and signed short are similar int An integer may or may not be signed bytes bits - , to , Chapter Page - - unsigned int An integer without any sign (minus symbol) bytes bits to 65535 signed int An integer with sign bytes bits - , to , Both short and int are similar long

Related topics

Have a question about this topic?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →