C – Strupr

C – Strupr 2017-06-12T11:10:59+00:00

string function : 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.


here we declares the string str like this str[30]=”www.learnermode.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”

Example :

Output :

str = www.LearnerMode.com


Prev Next