C language Isupper () function: To determine whether the character is uppercase English letters
header file:
To define a function:
Function Description: Check whether the parameter C is an uppercase English letter.
Return value: If parameter C is an uppercase English letter, returns a non 0, otherwise returns 0.
Additional description: This is a macro definition, not a true function.
Example: Find characters in the string str that are uppercase English letters.
#include <ctype.h>
Main () {
char str[] = "123c@ #FDsP [E?";
int i;
for (i = 0; Str[i]!= 0; i++)
if (Isupper (str[i)))
printf ("%c be an uppercase character\n", str[i));
Execution results:
F is a uppercase character
D is a uppercase character
P is a uppercase character
C language Islower () function: To determine whether a character is a lowercase letter
header file:
Islower () is used to determine whether a character is a lowercase letter, and its prototype is:
"Parameter" C is the character you want to detect.
return value if parameter C is a lowercase English letter, returns a value other than 0, otherwise returns 0.
Note that this is a macro definition, not a true function.
"Instance" determines which of the STR strings are lowercase letters.
#include <ctype.h>
Main () {
char str[] = "123@ #FDsP [E?";
int i;
for (i = 0; Str[i]!= 0; i++)
if (Islower (str[i)))
printf ("%c be a lower-case character\n", Str[i]);
Output results:
C is a lower-case character
S. A lower-case character
E is a lower-case character