iswalpha() in C++

iswalpha(): This function is available in the file ctype.h. This function checks whether character c is an alphabetic letter-wide character. This function returns any non-zero value (i.e true) if the given character is an alphabetic-wide character, Otherwise, it returns false.

Parameters: One parameter is required for this function.

c: The character to be checked, cast into wint_t.

Syntax:

int iswalpha(wint_t _C)

iswalpha(c)

For Example:

iswalpha('a') = > It returns true (any non-zero value).

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    wint_t C = 'a';

    cout << iswalpha(C<< "\n";

    return 0;
}

No comments:

Post a Comment