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

Data Types, Variables and Expressions

Chapter 3: 4 · Computer Science

Data Types, Variables and Expressions . Introduction Every programming language has two fundamental elements, viz., data types and variables. They are very essential elements to write even the most elementary programs. C++ provides a predefined set of data types for handling the data items.

Such data types are known as fundamental or built-in data types. Apart from the built-in data types, a programmer can also create his own data types called as User-defined data types. In this chapter, we are going to learn about built-in data types. .

Concept of Data types Let us look at the following example, Name = Ram Age = = . In the above example, Name, Age, are the fields which hold the values such as Ram, , and . respectively. In a programming language, fields are referred as variables and the values are referred to as data .

Each data item in the above example looks different. That is, “Ram” is a sequence of alphabets and the other two data items are numbers. The first value is a whole number and the second one is a fractional number. In real-world scenarios, there are lots of different kinds of data we handle in our day-to-day life.

The nature or type of the data item varies, for example distance (from your home to school), ticket fare, cost of a pen, marks, temperature, etc., In C++ programming, before handling any data, it should be clearly specified to the language compiler, regarding what kind of data it is, with some predefined set of data types. . C++ Data types In C++, the data types are classified as three main categories ( ) Fundamental data types ( ) User-defined data types and ( ) Derived data types. Chapter Page - - Data Types User Defines Data types Derived Data types Floating Point Integral types Structure, Union, Class, Enumeration Void int char float double Array, Function, Pointer, Reference Fundamantal Built - in data types Figure .

Data types in C++ In this chapter, we are going to learn about only the Fundamental data types. In order

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 →