
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
What are primitive data type in C++?
A primitive type is a data type where the values that it can represent have a very simple nature (a number, a character or a truth-value); the primitive types are the most basic building blocks for any programming language and are the base for more complex data types.
C++ has the following primitive data types −
S.No | Type | Description |
---|---|---|
1 | bool | Stores either value true or false. |
2 | char | Typically a single octet (one byte). This is an integer type. |
3 | int | The most natural size of an integer for the machine. |
4 | float | A single-precision floating point value. |
5 | double | A double-precision floating point value. |
6 | void | Represents the absence of type. |
- Related Articles
- What are Primitive and Non-Primitive Data Types in JavaScript?
- What are primitive data types in Java?
- What are primitive data types in JavaScript?
- Is array a primitive data type in Java?
- Is String a primitive data type or an object in Java?
- What are the differences between JavaScript Primitive Data Types and Objects?
- What are the default values of instance variables whether primitive or reference type in Java?
- What is MySQL ENUM data type? What are the advantages to use ENUM data type?
- Java primitive data types
- Data Structures Stack Primitive Operations
- Uninitialized primitive data types in C/C++
- Get the name of a primitive type in Java
- Convert short primitive type to Short object in Java
- Convert byte primitive type to Byte object in Java
- Default value of primitive data types in Java

Advertisements