C program to Compare Strings (Automatic)

#include <stdio.h>
#include <string.h>
int main()

 {
    char s1[50], s2[50];

    printf("Enter two strings :  ");
    scanf("%s %s", s1, s2);

    if(strcmp(s1, s2) == 0)
        printf("Equal");
    else
        printf("Not Equal");
}

Comments

Popular posts from this blog

Single Program Using All Automatic String Functions

C program for subtraction of two matrices (2D Arrays)

C program for Multiplication of Two matrices