কম্পিউটার

C/C++ এ iswpunct() ফাংশন


ফাংশন iswpunct() পরীক্ষা করা হয় যে পাসিং ওয়াইড অক্ষরটি একটি বিরাম চিহ্ন কিনা। এটি শূন্য প্রদান করে, যদি এটি একটি বিরাম চিহ্ন না হয়, অন্যথায় এটি একটি অ-শূন্য মান প্রদান করে। এটি "cwctype" হেডার ফাইলে ঘোষণা করা হয়েছে।

এখানে iswpunct()

এর সিনট্যাক্স রয়েছে
int iswpunct(wint_t character);

এখানে iswpunct()

এর একটি উদাহরণ

উদাহরণ

#include<cwctype>
#include<stdio.h>
using namespace std;
int main() {
   wint_t a = '!';
   wint_t b = 'a';
   if(iswpunct(a))
   printf("The character is a punctuation.");
   else
   printf("\nThe character is not a punctuation.");
   if(iswpunct(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.

উপরের প্রোগ্রামে, দুটি প্রশস্ত অক্ষর a এবং b হিসাবে ঘোষণা করা হয়েছে। অক্ষরগুলি পরীক্ষা করা হয় যে পাস করা অক্ষরটি একটি বিরাম চিহ্ন কিনা।

wint_t a = '!';
wint_t b = 'a';
if(iswpunct(a))
printf("The character is a punctuation.");
else
printf("\nThe character is not a punctuation.");
if(iswpunct(b))
printf("\nThe character is a punctuation.");
else
printf("\nThe character is not a punctuation.");

  1. C/C++ এ putwchar() ফাংশন

  2. mbrtoc16() C/C++ এ উদাহরণ সহ

  3. mbsrtowcs() ফাংশন C/C++ এ

  4. C/C++ এ সিস্টেম() ফাংশন