JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now

हिंदी माध्यम नोट्स

Class 6

Hindi social science science maths English

Class 7

Hindi social science science maths English

Class 8

Hindi social science science maths English

Class 9

Hindi social science science Maths English

Class 10

Hindi Social science science Maths English

Class 11

Hindi sociology physics physical education maths english economics geography History

chemistry business studies biology accountancy political science

Class 12

Hindi physics physical education maths english economics

chemistry business studies biology accountancy Political science History sociology

Home science Geography

English medium Notes

Class 6

Hindi social science science maths English

Class 7

Hindi social science science maths English

Class 8

Hindi social science science maths English

Class 9

Hindi social science science Maths English

Class 10

Hindi Social science science Maths English

Class 11

Hindi physics physical education maths entrepreneurship english economics

chemistry business studies biology accountancy

Class 12

Hindi physics physical education maths entrepreneurship english economics

chemistry business studies biology accountancy

Categories: C Language in hindi

DATA TYPES PART -2 in c computer language in hindi डाटा टाइप्स इन c कंप्यूटर भाषा

डाटा टाइप्स इन c कंप्यूटर भाषा DATA TYPES PART -2 in c computer language in hindi :-

DATA TYPE article मे हमने C LANGUAGE के 4 BASIC data TYPE को पढ़ा|और इसके अलावा हमने ये भी देखा की प्रोग्रामर खुद भी अपना DATATYPE बना सकता है |आज इस article मे हम data type के बारे मे कुछ एडवांस TOPIC पड़ेगे |

ENUMERATION : TYPEDEF से प्रोग्रामर अपना data type खुद बनाता है|ठीक उसी प्रकार ENUM KEYWORD से PROGRAMMER अपना data type खुद बनाता है|लेकिन उस data type की SELECTED ENTRY होती जो प्रोग्रामर उसके DECLARTION मे SEPECIFIC कर देता है| इसका syntax है =: enum indentifier (value1,value2,……..valuen); इसमें indentifier user define data type जिन्हें बाद मे प्रोग्राम मे use किया जा सकता है|

उदहारण : #include enum day (Monday,Thursday,Wednesday,Friday,Saturday,Sunday); // Enum declaration void main () { enum day d1,d2; // Enum data type variable declaration d1=Monday; // Assign Monday into d1 d2=Friday; // Assign Friday into d2 if (d1==Monday) // Check condition { printf(“d1 is Ok .\n “); // Printing Command } If (d2==Wednesday) { printf(“d2 is not ok .”); } }

इस प्रोग्राम का आउटपुट : d1 is ok . d2 is not ok . C compiler enum के value को integer start begin from 0 assign करता है |जैसे उदहारण मे Monday को 0 ,Thursday को 1 ,Wednesday को 2 ………………. assign करता है |

Storage Class : C language केवल data type नहीं storage class की फैसिलिटी भी देती है |storage class data की location और visibility को define करता है|storage class की पहचान variable के declartion की position पर निर्भर करता है|

उदहारण के लिए: int a; main() { int b; float decimal; decimal=function(); } function() { int f=56; float f2=23.56; float sum ; sum=f+f2; return sum; }

इस प्रोग्राम मे variable a जो की main function से बहार declare है,उसे global variable कहते है |इस variable को पुरे programe मे किसी function मे use कर सकते है | variable b , decimal को local variable कहते है|इसे केवेल main function मै use कर सकते है| C language variable के life टाइम के अनुसार भी class को define कर सकता है|lifetime के अनुसार,class चार प्रकार की होती है |

1.Auto : सभी local variable का default class ऑटो होते है |इसकी life time केवल प्रोग्राम के execution period के समय तक होती है |

2.Static : local variable की lifetime प्रोग्राम के execution time के बाद tab तक होती है जब तक दूसरा function को call नहीं होता है |

3.Extern : Global variable इस class मे आते है,जिनकी life time प्रोग्राम के सभी functions के execution तक रहती है |

4.Register : local variable जो Register मे store होते है उसे Register variableकहते है | Variable As Constant : C language मे खुद के constant के आलावा user define constant की सुविधा भी देता है |

इन constant की value पुरे प्रोग्राम के execution मे same रहती है|प्रोग्रामर यूजर define constant को declare करने के लिए const identifier का यूज़ करता है |इसका syntax है | const int size = 58 ; इस उदहारण मे size एक constant है जिसके datatype integer है |इसके value पूरे प्रोग्राम मे 58 रहेगी |

Varibale As Volatile : जब प्रोग्रामर किसी variable को volatile declare करता है तो उसका मतलब होता है की उस variable की value किसी भी समय बदल सकती है |इसका syntax है | volatile int date ; यह पर date की value किसी बाहरी source से बदलती रहेगी |जब तक कोई fixed value इसमें assign नहीं कर दी जाती है|जब जब कोई value किसी variable मे assign होती है tab tab complier इस variable की value चेक करता है|

Sbistudy

Recent Posts

four potential in hindi 4-potential electrodynamics चतुर्विम विभव किसे कहते हैं

चतुर्विम विभव (Four-Potential) हम जानते हैं कि एक निर्देश तंत्र में विद्युत क्षेत्र इसके सापेक्ष…

3 days ago

Relativistic Electrodynamics in hindi आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा

आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा Relativistic Electrodynamics in hindi ? अध्याय : आपेक्षिकीय विद्युतगतिकी…

4 days ago

pair production in hindi formula definition युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए

युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए pair production in hindi formula…

7 days ago

THRESHOLD REACTION ENERGY in hindi देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा

देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा THRESHOLD REACTION ENERGY in hindi…

7 days ago

elastic collision of two particles in hindi definition formula दो कणों की अप्रत्यास्थ टक्कर क्या है

दो कणों की अप्रत्यास्थ टक्कर क्या है elastic collision of two particles in hindi definition…

7 days ago
All Rights ReservedView Non-AMP Version
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings
JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now