C – Strupr

C – Strupr 2017-08-06T08:57:30+00:00

Strupr() :

strupr(str) coverts str to all uppercase. It returns a pointer to the original input string str. This function will convert all the lowercase characters in the string, which is provided as parameter, into uppercase. It will convert every lowercase to uppercase.

Syntax :
char * strupr(char *str);

C – STRING EXAMPLE PROGRAM :

here we declares the string str like this str[30]=”www.cprogrammingexpert.com”; The string string str is a character array of size 30.The character is stored like this

when we use this function it will convert all characters stored in the character array str to uppercase.Then stored like this

so after using this function  the value of string str is”WWW.LEARNERMODE.COM”

C – STRING EXAMPLE PROGRAM ;

Output :

str = www.LearnerMode.com

strlwr(str)=WWW.LEARNERMODE.COM

Prev Next