- Introduction to C data types in Hindi
- Different C data types in Hindi
Introduction to C Data Types
/* A Integer type variable */
int age; |
Different C Data Types
- Integer Types
- int
- short int
- long int
- signed int
- unsigned int
- Floating Point Types
- float
- double
- Character Types
- char
Integer Types
Data Type
|
Size (bytes)
|
Range
|
int
|
2
|
-32768 से 32767
|
short int
|
1
|
-128 से 127
|
long int
|
4
|
-2,147,483,648 से 2,147,483,647
|
signed int (negative values के लिए)
|
2
|
-32768 से 32767
|
unsigned int
|
2
|
0 से 65535
|
/* A Long integer type variable */
long int population = 200000000; |
Floating Point Types
Data Type
|
Size (bytes)
|
Range
|
float
|
4
|
3.4E-38 से 3.4E+38
|
double
|
8
|
1.7E-308 से 1.7E+308
|
/* A double type variable */
double balance=810.12354984; |
Character Types
Data Type |
Size (bytes)
|
Range
|
char
|
1
|
-128 से 127
|
unsigned char
|
1
|
0 से 255
|
/* A character type variable */
char bestlanguage = “C”; |
Void Type
- यदि आपका function कोई value return नहीं करता है तो आप उसका return type void define करते है। उदाहरण के लिए आप इस प्रकार function define कर सकते है। void myFunction();।
- यदि आप function में कोई parameters नहीं ले रहे है तो आप उनकी जगह पर void define कर सकते है। Void type से पता चलता है की इस function में कोई argument नहीं लिया जाता है। इस प्रकार void को parameter के रूप में pass कर सकते है। int myFunction(void);।
- यदि आप निश्चित नहीं है की pointer variable किस type के variable को point करेगा तो आप उसका type void declare कर सकते है। इसके बाद आप void pointer से किसी भी variable को point कर सकते है।
कोई टिप्पणी नहीं:
एक टिप्पणी भेजें