strupr() function in C
The strupr(string) function returns string characters in uppercase. Let's see a simple example of strupr() function.c#include <stdio.h> #include <string.h> int main() { char str[] = "Hello World"; printf("Original string: %s\n", str);// Using strupr() to convert to uppercase strupr(str); printf("String in uppercase: %s\n", str);return 0; }
As with strlwr(), keep in mind that using non-standard functions like strupr() may not be portable across different compilers.
0 Comments