Data Types How many bytes of RAM are used and what type of

Data Types - How many bytes of RAM are used and what type of data can be stored using the following data types? short float char Boolean pointer

Solution

Float occupies 4 bytes of memory.Here we can store numbers which is having fractional part .like 23.67

Short occupies 2 bytes of memory. We can store numbers with in range between -32768 to 32767.

Char occupies 1 byte of memory.In this we can store a single character like ‘a’,’b’ etc

Boolean occupies 1 byte of memory.Here we can store zero (0) or one (1).

Pointer occupies 8 bytes of memory.Pointer stores the address of another variable.

Int a=10; (Here we area declaring integer type variable)

Int pt*; (Here we are declaring pointer type variable)

pt=&a; (Storing the address of integer in pointer variable)

_________THANK YOU

 Data Types - How many bytes of RAM are used and what type of data can be stored using the following data types? short float char Boolean pointerSolutionFloat o

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site