strcmpi() function in C Last Updated : 02 Feb, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report 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. Syntax: int strcmpi (const char * str1, const char * str2 ); Parameters: str1: The first string.str2: The second string. Returns: This function returns 0 if the given two strings are same, a negative value if the length of str1 is less than the length of str2 and if the length of str1 is greater than str2 then this function returns a positive value. Note: This is a non-standard function that works only with older versions of Microsoft C. Below programs illustrate the strcmpi() function in C: Program 1: C // C program to demonstrate // example of strcmpi() function #include <stdio.h> #include <string.h> int main( ) { char str1[] = "geeks" ; char str2[] = "geeks" ; int j = strcmpi ( str1, str2 ) ; printf ( "The function returns = %d",j ) ; return 0; } Output: The function returns = 0 Program 2: C // C program to demonstrate // example of strcmpi() function #include <stdio.h> #include <string.h> int main( ) { char str1[ ] = "geeks" ; char str2[ ] = "ForGeeks" ; int i = strcmpi ( str1, str2 ) ; printf ( "The function returns = %d", i ) ; return 0; } Output: The function returns = 1 Comment More infoAdvertise with us Next Article strlen() function in c B bansal_rtk_ Follow Improve Article Tags : Misc C Language C-String C-Functions C-Library +1 More Practice Tags : Misc Similar Reads 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 tmpfile() function in C In C Programming Language, the tmpfile() function is used to produce/create a temporary file. tmpfile() function is defined in the "stdio.h" header file. The created temporary file will automatically be deleted after the termination of program. It opens file in binary update mode i.e., wb+ mode. The 1 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 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 strtoimax() function in C++ The strtoimax() function in C++ interprets the contents of a string as an integral number of the specified base and return its value as an intmax_t(maximum width integer). This function also sets an end pointer that points to the first character after the last valid numeric character of the string, 3 min read Like