C program to check whether a character is a printable character or not without using library function
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Here, we will create some character variables with initial values. Then we will check a specified character is printable or not without using any library function.
Program:
The source code to check a given character is a printable character or not without using the library function is given below. The given program is compiled and executed using GCC compile on UBUNTU 18.04 OS successfully.
Output:
Explanation:
Here, we created four functions isPunctuation(), isAlphanumeric(), isPrintable(), and main(). The isPrintable() function is used to check the given character is printable or not.
In the main() function, we created ch1, ch2, ch3 that is initialized with 'a', 'A', 95. Then we checked characters are printable or not using the isPrintable() function.
need an explanation for this answer? contact us directly to get an explanation for this answer