हिंदी माध्यम नोट्स
C99 – Header Files in c language in hindi , assert.h , complex.h , ctype.h , errno.h , float.h
- assert.h
c statnard library के द्वारा provide assert.h header file का use macro को define करने के लिए किया जाता है |इस header file से macro को define किया जाता है जो प्रोग्राम के assumption को check करता है|
और एक message print करता है जो की assumption के false होने पर ही print होता है|
macro assert को define करने के लिए दुसरे macro NDEBUG को define करना होता है | NDEBUG assert.h का पार्ट नहीं होता है |बल्कि NDEBUG source file को define करता है |
ये एक मात्र header file जो किसी function को hold नहीं करता है बल्कि एक macro को define करता है |
इसका syntax है :-
void assert (int expression );
यहा पर
int expression : ये expression है जिसके false होने पर aessertion message print होता है | और true होने पर प्रोग्राम पर कोई भी effect नहीं पड़ता है |
उदाहरण के लिए :
#include<conio.h>
#include<stdio.h>
#include<assert.h>
#define NDEBUG
Void main()
{
Int a,b,c;
Printf(“Enter data ”);
Scanf(“%d %d ”,&a &b);
Assert((c=a+b)> 50)
Printf(“addition is small than 50”);
Getch();
}
इस उदाहरण मे asssert statement नहीं लिखा गया है क्योकि assert statement optional होता है |अगर addition की value 50 से large होती है जिससे assert statement print होगा और program terminate हो जाती है |
2. complex.h
complex.h header file सभी complex number releted function store होते है |इसमें complex number के real पार्ट और imaginary पार्ट releated function को include करता है |जब इस header file को include किया जाता है तब तीन complex numbers को access कर सकते है |
- double complex
2. float complex
3. long double complex
इसके अलावा basic airthmatic operation (addition ,multiplication,division और sunbtraction) complex number पर पेर्फ्रोम होता है |
इस header file को सार मे हम बाद मे पढ़े |
3. ctype.h
इस हेडर file मे , charecter को test और convert करने के लिए function को include किया गया है |सभी function integer को function के argumnet मे लेते है |सभी function ‘1’ देता है अगर condition satisfied होता है |इसमें function होते है :-
1.isalnum(): check whether the passed character is alphanumerical
2.isalpha () : check whether the passed character is alphabetic
3.iscnhtr () : check whether the passed character is control character
4.isdigit() : check whether the passed character is integer
5.islower() : check whether the passed character is in lower case
6.isupper() : check whether the passed character is in upper case
7.isprint() : check whether the passed character is printable
8.isspace() : check whether the passed character contain space
9.tolower() : convert string into lower case
10.toupper(): convert strint into upper case
4. errno.h
इस header file का use integer variable errno को define करने के लिए किया जाता है |ये macro सिस्टम cal / function को call करता है जो की error को handel करता है |इस macro का use modifiable value को expand करता है | जिसे read और modified कर सकते है |
जब किसी प्रोग्राम को start किया जाता है errno के value को ‘0’ से set करते है इस header file मे तीन functions होते है :-
1.extern int errno : इस macro से उन सिस्टम call/ function को बुलाया जाता है जिससे पता चलता है की प्रोग्राम मे खा error हो रही है |
2.EDOM डोमेन error : इस macro से डोमेन error जब input argument डोमेन ( जहा पर function को declare किया जाता है ) से बहार होता है |
3.Erange range error :
इस macro से range error को declare करते है |अगर input argument की value range से बहार होती है तब इस प्रकार की error message आता है |
4.fenv.h
इस हेडर file मे store macro को floating point environment के error को declare करने के लिए किया जाता है |airthmatic और लॉजिकल operation का use किया जाता है |
printf(“Enter ‘1’ or ‘0’ :”);
printf(“Both input are ‘1’ . “);
Recent Posts
Question Tag Definition in english with examples upsc ssc ias state pcs exames important topic
Question Tag Definition • A question tag is a small question at the end of a…
Translation in english grammer in hindi examples Step of Translation (अनुवाद के चरण)
Translation 1. Step of Translation (अनुवाद के चरण) • मूल वाक्य का पता करना और उसकी…
Report Writing examples in english grammer How to Write Reports explain Exercise
Report Writing • How to Write Reports • Just as no definite rules can be laid down…
Letter writing ,types and their examples in english grammer upsc state pcs class 12 10th
Letter writing • Introduction • Letter writing is an intricate task as it demands meticulous attention, still…
विश्व के महाद्वीप की भौगोलिक विशेषताएँ continents of the world and their countries in hindi features
continents of the world and their countries in hindi features विश्व के महाद्वीप की भौगोलिक…
भारत के वन्य जीव राष्ट्रीय उद्यान list in hin hindi IAS UPSC
भारत के वन्य जीव भारत में जलवायु की दृष्टि से काफी विविधता पाई जाती है,…