|
Data type |
Format specifier |
symbol |
Memory occupy |
Rang |
|
Interger |
%d |
Int |
2byte |
-32,768
to 32,767 |
|
character |
%c |
char |
1byte/char |
-128
to 127 |
|
float |
%f |
float |
4byte |
1.2E-38
to 3.4E+38 |
|
Long |
%ld |
long |
8byte |
-2,147,483,648
to 2,147,483,647 |
|
double |
%lf |
double |
8byte |
1.7E-308
to 1.7E+308 |
Data type क्या है ?
कोई variable किस Type की value stor कर सकता है। यह Data type बताता है अर्थात यह किसी Variable की विशेषता बताता है की यह किस प्रकार की वैल्यू मेमोरी में स्टोर कर सकता है।Data type तीन प्रकार के होते हैं -
(1.) Basic or primary or primitive data type(3.) Derrived Data type
(1.) primary data type :-
ये स्वतन्त्र डेटा टाइप होते हैं जिनका सामान्यतः किसी वेरिएबल को डिक्लेअर करने के लिए किया जाता है। इसे Basic simple या primitive data type भी कहते हैं।C Language में निम्न प्रकार के प्राइमरी डेटा टाइप होते हैं।
(2) int
(3) float
(4) void
उदाहरण - char a; इस उदाहरण में char एक डेटा का प्रकार है और a एक वैरिएबल है।
इसका प्रयोग किसी Integer variable value अर्थात पूर्णाक value को स्टोर करने के लिए किया जाता है। या यूं कहें की इसका प्रयोग नम्बर को स्टोर करने के लिए किया जाता है। ये value साइनेड अथवा अन्साइनेड हो सकते हैं।
उदाहरण :- int n; n=5; इस उदाहरण में int डेटा का प्रकार है और n वैरिएबल है।
किसी Variadble में integer type के बड़े value को स्टोर करने के लिए इसका उपयोग किया जाता है। इन्हें long भी कहते हैं।
उदाहरण :- long int n; ( n=50,000 )
इस डेटा टाइप का उपयोग किसी Variable में floating point value अर्थात दशमलव वाले अपूर्णान्स वैल्यू को स्टोर या Define करने के लिए किया जाता है।
ये वैल्यू positive (+) या Nagative हो सकते हैं।
उदाहरण :- float p ; ( p=22.14; )
इस डाटा टाइप का उपयोग किसी Variable में floating point value को more Accurate के साथ स्टोर करने के लिए किया जाता है, इसे Double डाटा type भी कहते हैं।
उदाहरण :- long float a ; a=1.173456
उदाहरण :- Void ()
main function
{...........
.............
.............}
primary data type के द्वारा Declare variable के Value को प्रिंट करने के लिए special symbol का प्रयोग किया जाता है जिन्हें print control या print formate इसका प्रयोग printf() तथा scanf() function में किया जाता है।
इसके बाद मैं आपको Data type print control / print format के बारे में बता देता हूँ ये क्या है ?
ये एक प्रकार का Formula कह सकते हैं क्योकि ये किसी Data type के variable के लिए लिखा जाता है इसे ही print format कहते हैं जैसे-
char - %c
int - %d
long int - %ld
float - %f
long float - %lf
long double - %Lf
(2.) User Define Data type :-
किसी programer के द्वारा बनाये गए डेटा को ' यूजर डिफाइन डाटा टाइप ' कहा जाता है। कम्प्यूटर प्रोग्राम में इसका उपयोग किया जाता है जो की निम्न है-
(ii) Union
(iii) Enumeration
(Iv) typedt
(3.) Derrived data type :-
(ii) pointer


Welcome to OnlineGuru2020.blogspot.com, your number one source for all things related to Online Education. We're dedicated to providing you the very best of Digital Education, with an emphasis on E-notes,Download Links in PDF and youtube videos etc
OnlineGuru2020 Founded in [2020] by Sapan Kumar Das (Asst. Proff Ramchandi College Saraipali), OnlineGuru2020.blogspot.com has come a way from its beginnings .When I first started, my passion inspired me to start my own blog, seeing the need for students in lockdown2020
We hope you enjoy our products as much as we enjoy offering them to you. If you have any questions or comments, please don't hesitate to contact us.
Contact Datails:-
Mobile Number:-9826026747
Email:-sapam.online@gmail.com
Sincerely,
Sapan Kumar Das
.
No comments:
Post a Comment