Integer type (typically 4 bytes, -2,147,483,648 to 2,147,483,647)
1st Parameter
The character to be tested, passed as an `unsigned char` cast to an `int`, or `EOF`
Read more about parameters of ispunct in parameters section
The ispunctfunction in C language Checks whether the character is a punctuation character.
The ispunct function tests whether c is a printing character for which isspace and isalnum return false. In the default C locale, it includes all printing characters that are not alphanumeric or space.
The ispunctfunction takes 1
parameter:
•
int `c`: The character to be tested, passed as an `unsigned char` cast to an `int`, or `EOF`
Checks if the given character `c` is a printable punctuation character. Returns a nonzero value if `c` is a punctuation character, and `0` otherwise.
The ispunct function return value :
Returns non-zero if the character is a punctuation character, 0 otherwise
Output
This example demonstrates basic usage of ispunct with various characters.