isalpha() in C++

isalpha(): This function is available in the file ctype.h. This function checks if the character is an alphabetic character. All English letters are considered alphabets. This function returns the Non-zero value if the character is an alphabetic character, zero otherwise.

Parameters: One parameter is required for this function.

arg: The character to check for alphabets.

Syntax:

isalpha(arg)

For Example:

isalpha('a') = > It returns true.

Approach

C++

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

int main()
{
    char ch = 'a';

    cout << isalpha(ch<< "\n";

    return 0;
}


No comments:

Post a Comment