C - String Manipulation Functions, toupper
Tutorials Point


  Learning C
  C Function References
  C Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     About TP     Advertising  

C - toupper function

previous

Synopsis:

#include <stdio.h>

int toupper(int c); 

Description:

The function returns the corresponding uppercase letter if one exists and if islower(c); otherwise, it returns c.

Return Value

The function returns the corresponding uppercase letter if one exists and if islower(c); otherwise, it returns c.

Example

#include <stdio.h>
int main() {

  printf( "Upper case of a is %c\n", toupper('a'));
  printf( "Upper case of 9 is %c\n", toupper('9'));
  printf( "Upper case of g is %c\n", toupper('g'));
  return 0;
}

It will proiduce following result:

Upper case of a is A
Upper case of 9 is 9
Upper case of g is G


previous Printer Friendly

Advertisements


  

Advertisements



Advertisements