This strupr() string function converts all given string characters into uppercase.
Syntax for strupr()
1 |
strupr(String_name); |
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
/* -------------------------------- Works only on Visual C compiler --------------------------------*/ #include<stdio.h> #include<string.h> int main() { char s1[]="Hello"; printf ( "s1 = %s\n", s1 ) ; printf ( "s2 = %s", strupr(s1)) ; } |
Output:
1 2 |
s1 = Hello s2 = HELLO |