फ़ंक्शन ispunct() का उपयोग यह जांचने के लिए किया जाता है कि पासिंग कैरेक्टर विराम चिह्न है या नहीं। यदि यह विराम चिह्न नहीं है, तो यह शून्य लौटाता है, अन्यथा यह एक गैर-शून्य मान देता है।
यहाँ C भाषा में ispunct() का सिंटैक्स दिया गया है,
int ispunct(int character);
यहाँ C भाषा में ispunct() का एक उदाहरण दिया गया है,
उदाहरण
#include <stdio.h>
#include<ctype.h>
int main() {
int a = '!';
int b = 'a';
if(ispunct(a))
printf("The character is a punctuation.");
else
printf("\nThe character is not a punctuation.");
if(ispunct(b))
printf("\nThe character is a punctuation.");
else
printf("\nThe character is not a punctuation.");
return 0;
} आउटपुट
The character is a punctuation. The character is not a punctuation.