[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
isupper() Test for Uppercase
#include <ctype.h>
int isupper;
int c; Integer value to be tested
isupper() tests if 'c' is uppercase ('A' = 'Z').
Returns: True (nonzero) if the integer satisfies the test
condition or false (zero) if it does not. The result is
undefined if 'c' is other than an ASCII character or EOF.
Notes: isupper() is a macro.
-------------------------------- Example ---------------------------------
The following statement tests whether the character read from a file
is uppercase.
#include <ctype.h>
#include <stdio.h>
int ch;
FILE *stream;
main()
{
if ((stream = fopen("input.dat","r+"))!= NULL) {
while (!feof(stream)) {
if (isupper(ch = getc(stream)))
;
/* process character */
}
}
}
See Also:
isalnum()
isalpha()
isascii()
islower()
isspace()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson