Special welcome gift. Get 50% off your first courses with code “AS50”. Find out more!

HomeInterviewC++ Q/AWhat are the different data types present in C++?
courses 18

What are the different data types present in C++?

Data Types in C++ are Mainly Divided into 3 Types: 

1. Primitive Data Types: These data types are built-in or predefined data types and can be used directly by the user to declare variables. example: int, char, float, bool, etc. Primitive data types available in C++ are: 

  • Integer
  • Character
  • Boolean
  • Floating Point
  • Double Floating Point
  • Valueless or Void
  • Wide Character

2. Derived Data Types: Derived data types that are derived from the primitive or built-in datatypes are referred to as Derived Data Types. These can be of four types namely: 

  • Function
  • Array
  • Pointer
  • Reference

3. Abstract or User-Defined Data TypesAbstract or User-Defined data types are defined by the user itself. Like, defining a class in C++ or a structure. C++ provides the following user-defined datatypes:  

  • Class
  • Structure
  • Union
  • Enumeration
  • Typedef defined Datatype

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

Categories

ads sidebar 1

You May Also Like

Oracle has several modes for shutting down the database: In normal mode, the database is shut down by default. It...
Materialized views are items that contain condensed sets of data from base tables that have been summarized, clustered, or aggregated. They...
Every database in Oracle has a tablespace called SYSTEM, which is generated automatically when the database is created. It also...