C stricmp() Function
C stricmp() Function
The stricmp()
function compares the characters of two strings.
The characters of the strings may be in lower case or upper case, this function doesn't discriminates between them, i.e, Both 'A' and 'a' are equal.
The stricmp()
function starts comparison character by character starting from the first character until the characters in both strings are equal or a NULL character is encountered.
Example
Output
Syntax
Parameter Values
Value | Type | Explanation |
---|---|---|
str1 | Required | Specifies the string 1 |
str2 | Required | Specifies the string 2 |
Return Value
Value | Explanation |
---|---|
-1 | If str1 is less than str2 |
0 | If str1 is equal to str2 |
1 | If str1 is greater than str2 |
Reminder
Hi Developers, we almost covered 98% of String functions and Interview Question on C with examples for quick and easy learning.
We are working to cover every Single Concept in C.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.