C strupr() function

  • By using this predefined function we can convert a string into upper case.
  • Its is required one argument of type char* i.e. an address of a string.
  • When we are working with strupr(), from given address upto null all lower case characters will be converted to uppercase characters.

Syntax:

char* strupr(char* str);

Example:

#include
#include
#include
int main()
{
char str[10]=”K2schools”;
clrscr();
puts(str);
strupr(str);
printf(“\n Upper case string %s”,str);
getch();
return 0;
}

Powered by k2schools