Data Types In C++ In Hindi :- C++ Programming Me 3 Type Ke Data Type Hote Hai | 1.Primary data types And 2. Derived Data Types or 3. User Defined Data Type Hote Hai |
Data Types In C++ In Hindi
Contents
Jab Bhi Aap Kisi Value Ko Store Karne Ke Liye Variable Create Karte Hai To Aap Sath Hi Us Variable ka Data type Bhi Define Karte Hai | Data Type Se Compiler Ko Ye Pta Chalta Hai Ki Is Variable Mei Kis Type Ka Data Store Kiya Jayega |
C++ Supports Three Classes of Data Types
- Primary Data Types – Ye Wo data types Hote Hai Jo Jyadatar Sabhi programming languages Mai Paye Jate Hai।
- User Defined Data Types – C++ Aapko data type create Karne Ki capabilities provide Karti Hai ।
- Derived Data Types – Is Tarah Ke data types Koi data types Ke combination Hote Hai ।

1.Primary Data types
Primary Data types me 4 Data type Aate Hai Inhe Ham ek List Se Understad Karte Hai |.Niche Diye Gaye Column Me Data Types And Size ( In Bytes ) Or Sign Bataya Hai |
Data Type | Size (In Bytes) | Used For Sign |
Integer | 2 | %d |
Character | 1 | %c |
Float | 4 | %f |
String | 1 | %s |
Aap Upper Diye Gaye Example Ko Understand Kar Sakte Hai |
Integer Data Types, Storage Size and Range
Integer category Ke data types whole number Ko store Karne Ke Liye Istemal Kiye Jate Hai |
Data Types | Storage Size | Range |
---|---|---|
int (16-bit) | 2 Bytes | -32,768 to 32,767 |
int (32-bit) | 4 Bytes | -2,147,483,648 to 2,147,483,647 |
int (64-bit) | 8 Bytes | -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807 |
unsigned int (16-bit) | 2 Bytes | 0 to 65,535 |
short int | 2 Bytes | -32,768 to 32,767 |
unsigned short int | 2 Bytes | 0 to 65,535 |
signed short int | 2 Bytes | –32,768 to 32,767 |
long int | 4 Bytes | –2,147,483,647 to 2,147,483,647 |
unsigned long int | 4 Bytes | 0 to 4,294,967,295 |
signed long int | 4 Bytes | –2,147,483,648 to 2,147,483,647 |
In Data types Ko Inki size Or range Ke base Par differentiate Kiya Gya Hai । Aap Inhe Jarurat Ke Hisab Koi Bhi data type Istemal Kar Sakte Hai । Niche Diya Gya Example Ko Dekh Sakte Hai|
int balance = 650000;
Floating Point Data Types, Storage Size and Range
Floating point data types Aese Number Ko store Karne Ke Liye Istemal Hota Hai | Jinme Point Hota Ho |
Data Type | Size (In bytes) | Range |
float | 4 | 3.4E-38 to 3.4E+38 |
double | 8 | 1.7E-308 to 1.7E+308 |
long double | 10 | 3.4E-4932 to 1.1E+4932 |
Upper Diye Gye Data types Ko Inki size Or range Ke base Par Istemal Kar Sakte Hai । Aap Inhe Jarurat Ke Hisab Koi Bhi data type Istemal Kar Sakte Hai । Niche Diya Gya Example Ko Dekh Sakte Hai|
float PI = 3.14;
Character Data Types
Kisi Number Ke Alawa Yadi Aap Kisi Character Ko Store Karna Chahte Hai | To Aap Iske Liye Character Data Types Ka Istemal Kar Sakte Hai |
Data Type | Size (In bytes) | Range |
char | 1 | -128 to 127 |
unsigned char | 1 | 0 to 255 |
signed char | 1 | -128 to 127 |
Character data types Example
char Name = “M”; |
Sizeof Is keyword Se int Data Types Ke size Ka Pata Karte Hai |
Example:
// C++ program to sizes of data types #include<iostream> using namespace std; int main() { cout << "Size of char : " << sizeof(char) << " byte" << endl; cout << "Size of int : " << sizeof(int) << " bytes" << endl; cout << "Size of short int : " << sizeof(short int) << " bytes" << endl; cout << "Size of long int : " << sizeof(long int) << " bytes" << endl; cout << "Size of signed long int : " << sizeof(signed long int) << " bytes" << endl; cout << "Size of unsigned long int : " << sizeof(unsigned long int) << " bytes" << endl; cout << "Size of float : " << sizeof(float) << " bytes" <<endl; cout << "Size of double : " << sizeof(double) << " bytes" << endl; cout << "Size of wchar_t : " << sizeof(wchar_t) << " bytes" <<endl; return 0; }
Output:
Size of char : 1 byte Size of int : 4 bytes Size of short int : 2 bytes Size of long int : 8 bytes Size of signed long int : 8 bytes Size of unsigned long int : 8 bytes Size of float : 4 bytes Size of double : 8 bytes Size of wchar_t : 4 bytes
2.Derived Data Types
Derived / Secondary Data types Wo Data Type Hote Hai Jo Koi New Data Type Create Nhi Kar Sakte Hai |
- Arrays
- Structures
- Unions
- Functions
- Pointers
Aap Upper Dekh Sakte hai Secondary Data Types Me 5 Data Types Hote Hai| inhe Ham Jab Istemal Karte Hai Jab Hame Thora Advance Program Create Karna Hota Hai | Inke Example Ham Aage ki Post Me Dekhenge Kyoki Aapko Understand Karne Mei Thori Dikkat Hogi |
3.User defined Data Type
User defined data types me 2 data type Ke Hote Hai |
- typedef
- enumerated data type
Aap Dekh Sakte hai user defined data types keval two Hote Hai |
Data Type In Hindi
Also Read This Post
Dosto mujhe ummed hai ki aap Data Types In Cpp In Hindi ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |