{"id":438,"date":"2023-02-10T04:58:12","date_gmt":"2023-02-10T04:58:12","guid":{"rendered":"https:\/\/aipsacademy.com\/blogs\/?p=438"},"modified":"2023-02-10T04:59:54","modified_gmt":"2023-02-10T04:59:54","slug":"character-handling-functions-in-c-with-example","status":"publish","type":"post","link":"https:\/\/aipsacademy.com\/blogs\/2023\/02\/10\/character-handling-functions-in-c-with-example\/","title":{"rendered":"Character Handling Functions in C++ with Example"},"content":{"rendered":"\n<p><strong>There are various character handling&nbsp;<\/strong><a href=\"https:\/\/www.nipsacademy.com\/blogs\/functions-in-c-language\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>functions&nbsp;<\/strong><\/a><strong>in C++ which provide facility to handle character in different ways.<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.nipsacademy.com\/blogs\/c-programming-language-tutorial\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>C++<\/strong><\/a><strong>&nbsp;provides #include&lt;ctype.h&gt; header file for character handling.<\/strong><\/p>\n\n\n\n<p><strong><ins>All character&nbsp;<a href=\"https:\/\/www.nipsacademy.com\/blogs\/functions-in-c-language\/\" target=\"_blank\" rel=\"noreferrer noopener\">functions<\/a>&nbsp;have defined in #include&lt;ctype.h&gt;&nbsp;<a href=\"https:\/\/www.learncpp.com\/cpp-tutorial\/header-files\/\" target=\"_blank\" rel=\"noreferrer noopener\">header file<\/a>&nbsp;. \u201cctype\u201d means charater type.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>Character Functions<\/ins><\/strong><strong><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><ins>isalnum() :- This function is used to check whether a character is a letter or a digit i.e alphanumeric or not.<\/ins><\/strong><ul><li><strong><ins>syntax isalnum(ch);<\/ins><\/strong><\/li><\/ul><\/li><li><strong><ins>isdigit():- This function is used to check whether a character is digit or not.<\/ins><\/strong><ul><li><strong><ins>syntax isdigit(ch);<\/ins><\/strong><\/li><\/ul><\/li><li><strong><ins>isalpha():- This function is used to check whether a character is alphabet or not.<\/ins><\/strong><ul><li><strong><ins>syntax isalpha(ch);<\/ins><\/strong><\/li><\/ul><\/li><li><strong><ins>islower():- This function is used to check whether a character is lowercase alphabet or not.<\/ins><\/strong><ul><li><strong><ins>syntax islower(ch);<\/ins><\/strong><\/li><\/ul><\/li><li><strong><ins>isupper():- This function is used to check whether a character is uppercase or not.<\/ins><\/strong><ul><li><strong><ins>syntax isupper(ch);<\/ins><\/strong><\/li><\/ul><\/li><li><strong><ins>tolower():- This function is used to convert uppercase character to lowercase character.<\/ins><\/strong><ul><li><strong><ins>syntax tolower(ch);<\/ins><\/strong><\/li><\/ul><\/li><li><strong><ins>toupper():- This function is used to convert lowercase character to uppercase character.<\/ins><\/strong><ul><li><strong><ins>syntax toupper(ch);<\/ins><\/strong><\/li><\/ul><\/li><li><strong><ins>isspace():- This function is used to check whether a character is white space (blank) or not.<\/ins><\/strong><ul><li><strong><ins>syntax ispace(ch);<\/ins><\/strong><\/li><\/ul><\/li><\/ul>\n\n\n\n<p><strong><em><ins>Where ch is a character variable.<\/ins><\/em><\/strong><strong><\/strong><\/p>\n\n\n\n<p><strong><ins>Note :<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>when a character function is used to check the condition then following cases may occur.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>case 1: If condition is true then returns nonzero value.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>case 2: If condition is false then returns zero.<\/ins><\/strong><\/p>\n\n\n\n<p><strong><ins>Q.Write a program to represent isalnum( ) OR Write a program to check input character is alphabet numeric or not.<\/ins><\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2022\/08\/07\/hello-world\/\">12th Computer Science Important Program<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">C++ Programming <\/h4>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/18\/c-programming-language-tutorial\/\">C++ Programming Language Tutorial<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/18\/translators-in-programming-languages\/\">Translators in Programming languages<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/18\/tokens-in-c-programming-language\/\">Tokens in C++ Programming Language<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/18\/operators-in-c-programming-language\/\">Operators in C++ Programming Language<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/18\/conditional-statements-in-c-language\/\">Conditional statements in C++ Language<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/18\/switch-statement-in-c-language\/\">Switch Statement in C++ Language<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/19\/loops-iteration-statement-in-c-language\/\">Loops \/ Iteration statement in C++ Language<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/19\/jump-statements-in-c-with-best-example\/\">Jump statements in C++ with best example<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/19\/arrays-in-c-programming-language\/\">Arrays in C++ Programming Language<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/19\/functions-in-c-programming-language-2\/\">Functions in C++ Programming Language<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/19\/passing-arguments-in-functions\/\">Passing Arguments in Functions<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/19\/method-function-overloading-in-c\/\">Method \/ Function overloading in C++<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/23\/string-functions-in-c-with-example\/\">String Functions in C++ with Example<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Boolean Algebra<\/h4>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/08\/introduction-to-boolean-algebra-best-concepts\/\">Introduction to Boolean Algebra- Best concepts<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/08\/important-law-of-boolean-algebra-with-best-concepts\/\">Important Law of Boolean algebra with Best concepts<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/08\/logic-gates-and-their-types-best-concept\/\">Logic Gates and their types -Best Concept<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/08\/de-morgrans-law-and-their-applications\/\">De Morgan\u2019s Law and their Applications<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/08\/applications-of-boolean-algebra-in-computer-science\/\">Applications of Boolean Algebra in Computer Science<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">DBMS<\/h4>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/08\/introduction-to-dbms-database-management-system\/\">Introduction to DBMS | Database Management System<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Communication and Network Concept<\/h4>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2023\/01\/08\/introduction-to-communication-and-networks\/\">Introduction to Communication and Networks<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">11th Computer Science<\/h4>\n\n\n\n<p><a href=\"https:\/\/aipsacademy.com\/blogs\/2022\/08\/21\/c-basic-program-for-11th-computer-science\/\">C++ Basic Program for 11th Computer Science<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are various character handling&nbsp;functions&nbsp;in C++ which provide facility to handle character in different ways. C++&nbsp;provides #include&lt;ctype.h&gt; header file for character handling. All character&nbsp;functions&nbsp;have defined in #include&lt;ctype.h&gt;&nbsp;header file&nbsp;. \u201cctype\u201d means charater type. Character Functions isalnum() :- This function is used to check whether a character is a letter or a digit i.e alphanumeric or not. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,9,7,6,8],"tags":[],"class_list":["post-438","post","type-post","status-publish","format-standard","hentry","category-11th-computer-science","category-12th-computer-science","category-cbse-12th-computer-science","category-cbse","category-jac","category-jac-12th-computer-science"],"_links":{"self":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/comments?post=438"}],"version-history":[{"count":2,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/438\/revisions"}],"predecessor-version":[{"id":441,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/posts\/438\/revisions\/441"}],"wp:attachment":[{"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/media?parent=438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/categories?post=438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aipsacademy.com\/blogs\/wp-json\/wp\/v2\/tags?post=438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}