Friday, February 26, 2021

, , ,

Example program for isupper() function in c

As it's name says isupper() function in c programming checks whether given character is an uppercase alphabet (A-Z) or not.

C isupper() syntax : - 

int isupper(int argument);
  • isupper() function takes a single argument in the form of int.
  • Given argument converted into to its ASCII for the check.
  •  isupper() define in <ctype.h> header file.

 C isupper() Function Return Value

 

isupper in c
isupper in c

Example program for C isupper() function


#include <stdio.h>
#include <ctype.h>
int main()
{
    char c;

    c = 'C';
    printf("Return value when uppercase character %c is passed to isupper(): %d", c, isupper(c));

    c = '+';
    printf("\nReturn value when another character %c is passed to is isupper(): %d", c, isupper(c));

   return 0;
}


0 comments:

Post a Comment