String Program7

#include<stdio.h>

#include<conio.h>


void main()

{

int len;

char st[97], st2[97];

clrscr();


printf("Enter string: ");

scanf("%s", st);


printf("Enter string2: ");

scanf("%s", st2);


if(strcmp(st, st2) == 0)

{

printf("\n\nBoth strings are equal");

}

else

{

printf("\n\nBoth strings are different");

}


getch();

}

No comments:

Post a Comment