Data Types In C++ In Hindi – Data Type In Hindi

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

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

  1. Primary Data Types – Ye Wo data types Hote Hai Jo Jyadatar Sabhi programming languages Mai Paye Jate Hai।  
  2. User Defined Data Types – C++ Aapko data type create Karne Ki capabilities provide Karti Hai ।  
  3. Derived Data Types – Is Tarah Ke data types Koi data types Ke combination Hote Hai ।
Data Types In Cpp In Hindi

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
Integer2%d
Character  1%c
Float%f 
String%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 TypesStorage SizeRange
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 Bytes0 to 65,535
short int2 Bytes-32,768 to 32,767
unsigned short int2 Bytes0 to 65,535
signed short int2 Bytes–32,768 to 32,767
long int4 Bytes–2,147,483,647 to 2,147,483,647
unsigned long int4 Bytes0 to 4,294,967,295
signed long int4 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 TypeSize (In bytes) Range 
float3.4E-38 to 3.4E+38 
double81.7E-308 to 1.7E+308
long double10 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 TypeSize (In bytes) Range 
char -128 to 127 
unsigned char10 to 255 
signed char-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 |

Danish Ali

I Am a Cyber Security Student & I have Skills C, C++ ,Python, HTML,CSS, Computer & Advance Hacking & Blogger & YouTuber.

Leave a Reply

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

Show Buttons
Hide Buttons