কম্পিউটার টিউটোরিয়াল

সি/সি++-এ 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. C/C++-তে mbrtoc16() ফাংশন উদাহরণসহ

  3. C/C++-তে mbsrtowcs() ফাংশন

  4. C/C++-তে system() ফাংশন: কম্যান্ড এক্সিকিউশন