The function prototype of ispunct() is:
int ispunct(int argument);
If a character passed to the ispunct() function is a punctuation, it returns a non-zero integer. If not, it returns 0.
In C programming, characters are treated as integers internally. That's why ispunct() takes an integer argument.
The ispunct() function is defined in the ctype.h header file.
Example 1: Program to check punctuation
Output
: is a punctuation
Example 2: Print all Punctuations
Output
All punctuations in C:
! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~