iswcntrl() in C++

iswcntrl(): This function is available in the file ctype.h. This function checks whether a wide character is a control character or not. A control character is a character that does not occupy a printing position on the display.

Parameters: One parameter is required for this function.

arg: Character to be checked, cast into wint_t.

Syntax:

int iswcntrl(wint_t _C)

iswcntrl(arg)

For Example:

iswcntrl(L'\n') = > It returns true (any non-zero value).

Approach

C++

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

int main()
{
    wint_t C = L'\n';

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

    return 0;
}


No comments:

Post a Comment