JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now

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

Categories: C Language in hindi

ANSI C library Function : Ctype.h header file in c language in hindi , अनसी c लाइब्रेरी फंक्शन हैडर फाइल हिंदी में

अनसी c लाइब्रेरी फंक्शन हैडर फाइल हिंदी में , ANSI C library Function : Ctype.h header file in c language in hindi :-
अब तक के सभी उदहारण मे हमने देखा की C languge मे pre define function होते है जिन्हें c प्रोग्राम मे एक specific location पर store होती है जिन्हें header file कहते है |C languge मे , छ header file होती है :-
1.<ctype.h>
इस header file मे , वे function store होते है जो charecter testing और conversion के लिए किया जाता है |
2.<math.h>
इस header file मे , वे function store होते है जो mathmatic function store होते है |
3.<stdio.h>
इस header file मे standard input output function store होते है |
4.<stdlib.h>
इस header file मे ,utility function जैसे string conversion routines, memory allocation routines और random number generator store होते है |
5.<string.h>
इस header file मे , string function store होते है |
6.<time.h>
इस function मे , time manipulation function store होता है |
इस article मे , निन्म abbreviation का use किया जाता है|
c-character
i-integer
f-file
l-long integer
p-pointer variable
s-string argument
u-unsigned integer
<ctype.h>
इस header file मे , character  releted function store होते है |इस header file मे, निन्म functions होते है :-
1. isalnum ()
इस function का use , किसी argument के alphanumerical होने की condition को check किया जाता है |function ‘1’ return होगा अगर argument के alphanumerical है अन्यथा ‘0’ return होगा |
उदाहरण के लिए :
#include<stdio.h>
#include<conio.h>
void mian()
{
char character ;
printf(”Enter a character “);
scanf(“%c”,&character );
if (isalnum(character )==1)
{
printf(“Thank you for enter character “);
}
else
{
printf(“Please Enter character “);
}
getch();
}
आउटपुट होगा :
Enter a character w
Thank you for enter character
2. isalpha ()
इस function का use , किसी argument के alphabetic होने की condition को check किया जाता है |function ‘1’ return होगा अगर argument मे सभी elements alphabets होते है अन्यथा ‘0’ return होगा |
3. isdigit ()
इस function का use , किसी argument के integer होने की condition को check किया जाता है |function ‘1’ return होगा अगर argument मे सभी elements integer होते है अन्यथा ‘0’ return होगा |
इस उदहारण मे , isdigit () और isalpha ()  का combine उदहारण है |
उदाहरण के लिए :
#include<stdio.h>
#include<conio.h>
void mian()
{
char name[15];
int i=0;
int alpha=0 , num=0;
printf(”Enter name “);
scanf(“%s”,&name );
for(i=0;i<15;i++)
{
if (isalnum(name[i] )==1)
{
alpha++;
}
elseif(isdigit(name[i])==1)
{
num++;
}
printf(“Alphabets in String = %d”,alpha);
printf(“Integer in String = %d”,num);
getch();
}
आउटपुट होगा :
Enter name parth0049
Alphabets in String = 5
Integer in String = 4
4. isascii ()
इस function का use , किसी argument के Ascii character  होने की condition को check किया जाता है |function ‘1’ return होगा अगर argument मे सभी elements Ascii character  होते है अन्यथा ‘0’ return होगा |
Ascii character  का मतलब है की character  की value ,7 बिट US ASCII tabel के character  set होनी चाहिए |
#include<stdio.h>
#include<conio.h>
void mian()
{
char num [5] ;
printf(”Enter a set of five integer that you want to ASCII value “);
for(i=0;i<5;i++)
{
scanf(“%d”,&num[i]);
}
for(i=0;i<5;i++)
{
if (isascii (num[i]) ==1)
{
printf(” ASCII value of %d = %c\n”,a[i],a[i]);
}
else
{
printf(“%d did not have ASCII value\n”,a[i]);
}
getch();
}
आउटपुट होगा :
‘Enter a set of five integer that you want to ASCII value 65 93 128 121 43
ASCII value of 65 = A
ASCII value of 93 = ]
128 did not have ASCII value
ASCII value of 121 = y
ASCII value of 43 = +
5. iscntrl ()
इस function का use , किसी argument के control character होने की condition को check किया जाता है |function ‘1’ return होगा अगर argument के character  , control character  होते है अन्यथा ‘0’ return होगा |
control character वे character होते है जिन्हें console screen पर print नहीं कर सकते है |इससे control argumnet की तरह use कर सकते है |जब किसी character  को इस function मे pass किया जाता है tab ये function आटोमेटिक एक integer value दे देता है |
#include<stdio.h>
#include<conio.h>
void main()
{
char c ;
printf(”Enter a character “);
scanf(“%c”,&c);
int control;
if((control=iscntrl (c))==1 )
{
printf(“function return value = %d”,control);
}
else
{
printf(“function return value = %d”,control);
}
getch();
}
आउटपुट होगा :
Enter a character e
function return value = 1
or
Enter a character \n
function return value = 0
6.isspace()
इस function का use , किसी argument के white space होने की condition को check किया जाता है | function ‘1’ return होगा अगर argument मे white space है अन्यथा ‘0’ return होगा |
उदाहरण के लिए :
#include<stdio.h>
#include<conio.h>
int count( char name[ ] );
void main()
{
char name[15];
int i=0;
int  num=0;
printf(”Enter name “);
scanf(“%s”,&name );
size =count(name);
printf(“size of string = %d”,size);
for(i=0;i<size;i++)
{
if (isspace(name[i])==1)
{
alpha++;
}
printf(“White Space in Name = %d”,num);
getch();
}
int count( char n[ ] )
{
int count=0;
for(i=0;i<15;i++)
{
if(n[i]==’\0′)
{
break;
}
else
{
count++;
}
return(count );
}
आउटपुट होगा :
Enter name Mr parth jain
size of string = 12
White Space in Name = 3
7.toupper() और tolower()
toupper(): इस function का use , character को upper case मे convert किया जाता है |
tolower(): इस function का use ,character को lower case मे convert किया जाता है |
उदाहरण के लिए :
#include<stdio.h>
#include<conio.h>
int count( char name[ ] );
void main()
{
char name[15];
int i=0;
char upper[15];
char lower[15];
printf(”Enter name “);
scanf(“%s”,&name );
size =count(name);
printf(“size of string = %d”,size);
for(i=0;i<size;i++)
{
upper[i]=toupper(name[i]);
lower[i]=tolower(name[i]);
}
printf(“Name in Lower Case = %s”, lower);
printf(“Name in upper Case = %s”, upper);
getch();
}
int count( char n[ ] )
{
int count=0;
for(i=0;i<15;i++)
{
if(n[i]==’\0′)
{
break;
}
else
{
count++;
}
return(count );
}
आउटपुट होगा :
Enter name ParthPatel
Name in Lower Case = parthpatel
Name in upper Case = PARTHPATEL
इसके अलावा कई important function होते है लेकिन in function को बहुत कम use किया जाट है इसकी table है :-
s.no
function
Use
1
isgraph()
isgraph() का use किसी charecter की graphical printing
को check किया जता है | ‘1’ return होगा अगर graphical property है अन्यथा ‘0’
return होगा |
2.
islower()
islower() का use किसी charecter की lower case
होने की condition को  check किया जता है
| ‘1’ return होगा अगर lower case है अन्यथा ‘0’ return होगा |
3.
isodigit()
isodigit() का use किसी argumnet का  octal number  होने की condition को  check किया जता है | ‘1’ return होगा अगर octal
number है अन्यथा ‘0’ return होगा |
4.
ispunct()
ispunct()का use किसी argumnet मे punctuation
character  होने की condition को  check किया जता है | ‘1’ return होगा अगर punctuation
character है अन्यथा ‘0’ return होगा |
5.
isupper()
isupper() का use किसी charecter की upper case
होने की condition को  check किया जता है
| ‘1’ return होगा अगर upper case है अन्यथा ‘0’ return होगा |
6.
isxdigit ()
isodigit() का use किसी argumnet का hexadecimal
number  होने की condition को  check किया जता है | ‘1’ return होगा अगर hexadecimal
number है अन्यथा ‘0’ return होगा |
7.
toascii()
toascii() का use ,किसी argumnet को ASCII
value मे convert करने के लिए किया जाता है |
Sbistudy

Recent Posts

सती रासो किसकी रचना है , sati raso ke rachnakar kaun hai in hindi , सती रासो के लेखक कौन है

सती रासो के लेखक कौन है सती रासो किसकी रचना है , sati raso ke…

23 hours ago

मारवाड़ रा परगना री विगत किसकी रचना है , marwar ra pargana ri vigat ke lekhak kaun the

marwar ra pargana ri vigat ke lekhak kaun the मारवाड़ रा परगना री विगत किसकी…

24 hours ago

राजस्थान के इतिहास के पुरातात्विक स्रोतों की विवेचना कीजिए sources of rajasthan history in hindi

sources of rajasthan history in hindi राजस्थान के इतिहास के पुरातात्विक स्रोतों की विवेचना कीजिए…

3 days ago

गुर्जरात्रा प्रदेश राजस्थान कौनसा है , किसे कहते है ? gurjaratra pradesh in rajasthan in hindi

gurjaratra pradesh in rajasthan in hindi गुर्जरात्रा प्रदेश राजस्थान कौनसा है , किसे कहते है…

3 days ago

Weston Standard Cell in hindi वेस्टन मानक सेल क्या है इससे सेल विभव (वि.वा.बल) का मापन

वेस्टन मानक सेल क्या है इससे सेल विभव (वि.वा.बल) का मापन Weston Standard Cell in…

3 months ago

polity notes pdf in hindi for upsc prelims and mains exam , SSC , RAS political science hindi medium handwritten

get all types and chapters polity notes pdf in hindi for upsc , SSC ,…

3 months 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