strupr() function in c Last Updated : 23 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The strupr( ) function is used to converts a given string to uppercase. Syntax: char *strupr(char *str); Parameter: str: This represents the given string which we want to convert into uppercase. Returns: It returns the modified string obtained after converting the characters of the given string str to uppercase. Time Complexity: O(n) Auxiliary Space: O(1) Below programs illustrate the strupr() function in C: Example 1:- c // c program to demonstrate // example of strupr() function. #include<stdio.h> #include<string.h> int main() { char str[ ] = "geeksforgeeks is the best"; //converting the given string into uppercase. printf("%s\n", strupr (str)); return 0; } Output: GEEKSFORGEEKS IS THE BEST Example 2:- c // c program to demonstrate // example of strupr() function. #include<stdio.h> #include <string.h> int main() { char str[] = "CompuTer ScienCe PoRTAl fOr geeKS"; printf("Given string is: %s\n", str); printf("\nstring after converting to the uppercase is: %s", strupr(str)); return 0; } Output: Given string is: CompuTer ScienCe PoRTAl fOr geeKS string after converting to the uppercase is: COMPUTER SCIENCE PORTAL FOR GEEKS Note : This is a non-standard function that works only with older versions of Microsoft C. Comment More infoAdvertise with us Next Article strupr() function in c bansal_rtk_ Follow Improve Article Tags : Misc C Language C-String Practice Tags : Misc Similar Reads strrev() function in C The strrev() function is a built-in function in C and is defined in string.h header file. The strrev() function is used to reverse the given string. Syntax:char *strrev(char *str);Parameter:str: The given string which is needed to be reversed.Returns: This function doesn't return anything but the re 2 min read strlwr() function in C The strlwr( ) function is a built-in function in C and is used to convert a given string into lowercase. Syntax: char *strlwr(char *str); Parameter: str: This represents the given string which we want to convert into lowercase. Returns: It returns the modified string obtained after converting the ch 1 min read strspn() function in C The strspn() function returns the length of the initial substring of the string pointed to by str1 that is made up of only those character contained in the string pointed to by str2. Syntax : size_t strspn(const char *str1, const char *str2) str1 : string to be scanned. str2 : string containing the 1 min read strcmpi() function in C The strcmpi() function is a built-in function in C and is defined in the "string.h" header file. The strcmpi() function is same as that of the strcmp() function but the only difference is that strcmpi() function is not case sensitive and on the other hand strcmp() function is the case sensitive. Sy 2 min read toupper() function in C The toupper() function is used to convert lowercase alphabet to uppercase. i.e. If the character passed is a lowercase alphabet then the toupper() function converts a lowercase alphabet to an uppercase alphabet. It is defined in the ctype.h header file.Syntax: int toupper(int ch);Parameter: It accep 2 min read strol() function in C++ The strtol() function in C++ interprets the contents of a string as an integral number of the specified base and return its value as a long int.This function also sets an end pointer that points to the first character after the last valid numeric character of the string, if there is no such characte 3 min read strlen() function in c The strlen() function in C calculates the length of a given string. The strlen() function is defined in string.h header file. It doesn't count the null character '\0'. Syntax of C strlen() The syntax of strlen() function in C is as follows: size_t strlen(const char* str);Parameters The strlen() func 1 min read strtof function in C Parses the C-string str(assumed) interpreting its content as a floating-point number (according to the current locale ) and returns its value as a float. If endptr(end pointer) is not a null pointer, the function also sets the value of endptr to point to the first character after the number. Syntax: 2 min read strtoumax() function in C++ The strtoumax() function in C++ interprets the contents of a string as an integral number of the specified base and return its value as an uintmax_t(maximum width unsigned integer). This function also sets an end pointer that points to the first character after the last valid numeric character of th 4 min read strnset() function in C The strnset() function is a builtin function in C and it sets the first n characters of a string to a given character. If n is greater than the length of string, the length of string is used in place of n. Syntax: char *strnset(const char *str, char ch, int n); Parameters: str: This is the original 2 min read Like