answersLogoWhite

0


Best Answer

The fundamental built in data types in C++ are integral (char, short, int, and long) and floating (float, double, and long double1).

The fundamental derived data types in C++ are arrays, functions, pointers, and references.

The composed derivative data types in C++ are classes, structures, and unions.

----------------------------------------------------------

1Microsoft specific ??

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

9y ago

You cannot have a "fundamental derived data type". There are only three fundamental data types in C++: integral, floating and void. You cannot derive from a fundamental data type. A function is only fundamental insofar as all functions, like all instances of a type, are addressable.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

The standard library is replete with derived data types. For instance, the I/O stream class hierarchy is defined as follows:

class ios_base;

class basic_ios<> : public ios_base;

class basic_istream<> : virtual public basic_ios<>;

class basic_ostream<> : virtual public basic_ios<>;

class basic_iostream<> : public basic_istream<>, public basic_ostream<>;

The standard library also includes two specializations of these types which cater for the two most common type of I/O stream: char and wchar_t (narrow and wide streams, respectively).

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

An array is not a derived type since it is not an object, it is a structure. An array is simply a block of contiguous memory containing one or more elements of a given type, whether those types are primitive data types or complex data types (objects).

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Derived data types are based on fundamental data types. i.e. a derived data types is represented in the memory as a fundamental data type.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

This is because an array is a collection of elements of a primitive (or fundamental) data type such as integers, characters or the like.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Two example of derived data types in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the difference between basic data types and derived data types and user defined data types in C plus plus?

By basic types you presumably mean primitive types or built-in types. These include char, int, long, short, wchar_t, float, double and bool, amongst others. Most are simply variations of each other, but their lengths are implementation dependant. The only exception is char which is always 1 byte in length. User-defined types are those you yourself define or are defined for you. These include typedefs, enums, classes, structs and unions, but can also include some implementation-specific built-in types and all third-party types. Regardless, all user-defined types build upon the primitive data types or other user-defined types. In the case of class and struct types, methods (or member functions) can be associated with those types, thus combining data and the specific methods that act upon that data into a single entity. Objects are specific instances of a class or struct. A derived type is a class (or struct) which inherits from another class (or struct). A derivative cannot inherit from a primitive, enum or union. Derived types are also, by definition, user-defined types.


How is c plus plus built?

C++ object oriented programming (OOP) language and supports three kinds of object types 1) Fundamental Types. 2) Derived Types. 3) Class Types.


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.


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.


What is different between primitive date type and non primitive data type in c plus plus programming language?

A primitive data type is built into the language - int, char, long, etc. A non-primitive data type is am abstract data type that is built out of primitive data types - linked list, queue, stack, etc.

Related questions

What is the difference between basic data types and derived data types and user defined data types in C plus plus?

By basic types you presumably mean primitive types or built-in types. These include char, int, long, short, wchar_t, float, double and bool, amongst others. Most are simply variations of each other, but their lengths are implementation dependant. The only exception is char which is always 1 byte in length. User-defined types are those you yourself define or are defined for you. These include typedefs, enums, classes, structs and unions, but can also include some implementation-specific built-in types and all third-party types. Regardless, all user-defined types build upon the primitive data types or other user-defined types. In the case of class and struct types, methods (or member functions) can be associated with those types, thus combining data and the specific methods that act upon that data into a single entity. Objects are specific instances of a class or struct. A derived type is a class (or struct) which inherits from another class (or struct). A derivative cannot inherit from a primitive, enum or union. Derived types are also, by definition, user-defined types.


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

Constant data and constant functions.


How is c plus plus built?

C++ object oriented programming (OOP) language and supports three kinds of object types 1) Fundamental Types. 2) Derived Types. 3) Class Types.


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.


What type of data does a datatable use?

A datatable typically uses tabular data, organized in rows and columns. It can store various types of data such as numbers, strings, dates, and more, providing a structured format for easier manipulation and analysis.


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.


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 find the mean of the data?

Th find the mean of a data set, you add up all the values in the data set and divide this sum by the number of data values. For example, the mean for the data set 2, 5, 6, and 7 is given as 2 plus 5 plus 6 plus 7, which is 20. You divide this sum by number of values in the data set, which is 4 to get 5 as the mean.


Can a c plus plus class be derived from a Java class?

No.


In spreadsheets cells may be formatted to suit many different data like date and time currency number etc?

Yes, that can be done. For example, in Excel, the main data types seem to include dates, text, and numbers - plus various formats for special cases, such as to show percentages.


What is different between primitive date type and non primitive data type in c plus plus programming language?

A primitive data type is built into the language - int, char, long, etc. A non-primitive data type is am abstract data type that is built out of primitive data types - linked list, queue, stack, etc.


How do you begin c plus plus?

By working from the inside out. Since all functions and data types must be forward declared, it makes sense to design these first. This means you must break the problem down into its component parts, identify the key classes and other data types required by your program and design them first.