CSC/ECE 517 Fall 2011/ch3 3h ss

From Expertiza_Wiki
Revision as of 18:21, 6 October 2011 by Ssgujar (talk | contribs) (Created page with "== Introduction == In any programming language, the data type refers to the class of data which contains specific type or range of values. Data types are used along with variab...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

In any programming language, the data type refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.

The primitive data types refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably.

Many object-oriented programming languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types. Primitive objects refer to the objects of built-in classes which provide the same functionality or rather more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects.

The common built-in data types are integers, floating point numbers, characters, strings and booleans.

Different object-oriented programming languages implement these primitive data types and primitive objects in different manner.