Tag Archives: C Program Compare String using strcmp

C Program Compare String using strcmp

C Program Compare String using strcmp /* C program to input two strings and check whether both strings are the same (equal) or not using strcmp() predefined function. strcmp() gives a case sensitive comparison. www.easycodebook.com */ #include <stdio.h> #include <string.h> int main() { char str1[100], str2[100]; printf(“Enter first string\n”); gets(str1); printf(“Enter second string\n”); gets(str2); if… Read More »

Loading