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

Data Types, Variables and Expressions · Part 4

Chapter 3: 4 · Computer Science

type ie., floating point operations are slower than integer operations. This is a disadvantage of floating point operation. For Example float num= . ; In the above example, num variable is declared as float type .

( ) double data type: This is for double precision floating point numbers. (precision means significant numbers after decimal point). The double is also used for handling floating point numbers. But, this type occupies double the space than float type.

This means, more fractions can be accommodated in double than in float type. The double is larger and slower than type float. double is used in a similar way as that of float data type. ( ) void data type: The literal meaning for void is ‘empty space’.

Here, in C++, the void data type specifies an empty set of values. It is used as a return type for functions that do not return any value. . What do you mean by fundemantal data types?

. The data type char is used to represent characters. then why is it often termed as an integer type? .

What is the advantage of floating point numbers over integers? . The data type double is another floating point type. Why is it treated as a distinct data type?

. What is the use of void data type? ? Evaluate Yourself .

. Memory representation of Fundamental Data types: One of the most important reason for declaring a variable as a particular data type is to allocate appropriate space in memory. As per the stored program concept, every data should be accommodated in the main memory before they are processed. So, C++ compiler allocates specific memory space for each and every data handled according to Chapter Page - - the compiler’s standards.

The following Table . shows how much of memory space is allocated for each fundamental data type. Remember that, every data is stored inside the computer memory in the form of binary digits (See Unit I Chapter ). Table .

Memory allocation for Fundamental data types Data type Space in memory Range of value in terms

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 →