strupr(): Lowercase to Uppercase
#include <stdio.h>
#include <string.h>
int main(void){
char str[]="plus2net";
printf("%s\n",strupr (str));
return 0;
}
The output of above code is here
PLUS2NET
We can change lowercase letters to uppercase letters by using strupr()
string function.
strupr(input_string);
Example : using strupr() with user input string
#include <stdio.h>
#include <string.h>
int main(void){
char str[100];
printf("Enter any string");
scanf("%s",str);
printf("Output: %s",strupr(str));
return 0;
}
Output
plus2net
PLUS2NET
This article is written by plus2net.com team.
plus2net.com