C – Strupr

C – Strupr 2017-07-19T23:16:31+00:00

Strupr()

Syntax :
char * strupr(char *str);

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.

C – STRUPR 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 the function strupr(str) it will convert all characters stored in the character array str to uppercase.Then stored like this

so after using the function strupr(str) the value of string str is”WWW.LEARNERMODE.COM”

C – STRUPR EXAMPLE PROGRAM ;

Output :

str = www.LearnerMode.com

strlwr(str)=WWW.LEARNERMODE.COM

Prev Next