isgraph(): This function is available in the file ctype.h. This function checks whether a character has a graphical representation. This function return value different from zero (i.e. true) if indeed c has a graphical representation as a character. Zero (i.e. false) otherwise.
Parameters: One parameters are required for this function.
arg: A character to be checked.
Syntax:
isgraph(arg)
Note:
1. All digits [0,9] has graphical representations.
2. Punctuation characters (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) has graphical representations.
3. All English alphabets [a-z], [A-Z] has graphical representations.
For Example:
isgraph('8') = > It retuns true or any non zero value.
Approach
C++
#include <bits/stdc++.h>using namespace std;int main(){char C = '8';cout << isgraph(C) << "\n";return 0;}
No comments:
Post a Comment