ispunct() ফাংশন চেক করতে ব্যবহৃত হয় যে পাস করা ক্যারেক্টার পাঙ্কচুয়েশন কিনা। এটি শূন্য রিটার্ন করে যদি পাঙ্কচুয়েশন না হয়, অন্যথায় নন-জিরো ভ্যালু।
সি ভাষায় ispunct()-এর সিনট্যাক্স:
int ispunct(int character);
সি ভাষায় 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.