Logic:-
In this problem, you can use two methods one is using library function secondly is without using a library function, but we use here without using a strcmp() function in this we first calculate the size of a both string and if the size of both strings is not equal then program print the message "Both strings are not equal" and if the size of both stings is equal then program compare both string character by character and return if both string is equal or not according to the string analysis. Below is both method for comparing a string using library function or without using library functions.
Using Library Function
strcmp(string1 ,string2)
Output:
=====================================
Visit - www.nerdutella.com
=====================================
Enter First String :
example
Enter Second String :
programming
Both Strings Are Not Equal
need an explanation for this answer? contact us directly to get an explanation for this answer