Coding Blocks IDE , strcmp issue with strings c++
@sameershar98 hey shubham the reason of this issue is
The strcmp() compares two strings character by character. If the first character of two strings are equal, next character of two strings are compared. This continues until the corresponding characters of two strings are different or a null character ‘\0’ is reached.
strcmp() function will work fine for this scenario like if you pass arguments directly like
strcmp(“abcd”,“abc”);
but if you want to work you function for other input you should choose char array
char str1[] = “abcd”, str2[] = “abCd”