answersLogoWhite

0

Binary data is intrinsically numeric, therefore every type (including user-defined types) can be represented as a number. Even an executable or a file is nothing more than an extremely large number, in binary, made up of a specific sequence of bits grouped in various ways (bytes, words, dwords, etc), each of which is a number in its own right.

What these numbers actually represent is purely a matter of interpretation. While a char type is typically used to represent an alphanumeric character or symbol, it is really just a character code (a number in the range 0 to 255) that can be mapped to a symbolic character in the ASCII character set. A char is therefore no different to a byte and can represent an actual number just as easily as it can a character.

The primitive types are: unsigned short int, short int, unsigned long int, long int, int, unsigned int, char, wchar_t, bool, float, double and long double, each of which is intrinsically numeric. All user-defined types, including classes and structures, are derived from some combination of these primitive types.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

When do we use int in c plus plus programming?

'int' is one of the built-in data-types, it is meant to hold integer values.


What are the two types of constant in c plus plus?

Constant data and constant functions.


User defined data type in c plus plus?

Use "typedef" : both in C and C++.


Memory allocation in c plus plus?

Although C++ inherits malloc/calloc, realloc and free from C, programmers are encouraged to use the object-oriented operators, new and delete instead. Not only are they much easier to use, they can also be used with primitive data types.


What use of void data type in c plus plus?

doesn't return the value.


Why c plus plus called as paritial oop?

C++ is only partially OOP because it is a superset of C and, for the sake of backward compatibility, retains the concept of primitive data types (such as integrals like char and int) and pointer data types, which are all strictly non-object-oriented. In Java and C#, there is no concept of a primitive data type. Even integral types such as int are treated as objects and there is no concept of a pointer data type.


How do you use or integrate c plus plus code in visual basic 6?

You can't integrate C++ source code directly into Visual Basic code. In order to make use of code written in another language, including C++, you must compile that source to produce a DLL. You can then link to that DLL via Visual Basic. The only caveat is that you must replace the C++ data types in the function declarations with the equivalent Visual Basic data types, such as 'Byte' for a C++ unsigned char, or 'Single' for a C++ float.


What is the difference between class data type and basic type in c plus plus .How can someone know which one is class type and which one is basic type.?

Basic types (primitive data types) have no methods associated with them.


Describe the four basic data types in c?

Describe the basic data types in C Describe the basic data types in C


What is object oriented in c plus plus?

Object-oriented programming is a feature in C++ that allows you to better model real-world objects. An object is an instance of a class, which is a data structure in C++ that allows you to group different, but related types of data together.


What types of data used in algorithm?

Whatever data you need. If you need the algorithm to operate with many different types of data, and you are programming in C++, you could use generic programming practices and use templates.


When you use decimal which type of data is it?

Decimal numbers are real numbers. In C and C++ we use the float, double and long double data types to represent real numbers.