Write a Program to take 2 strings from the user %26amp; find out the number of dissimilar characters %26amp; display them in C programming language
WAP to take 2 strings from the user %26amp; find out the number of dissimilar characters in C programming language?
#include%26lt;string.h%26gt;
void main()
{
char a[10],b[10];
int i,y;
printf("enter your ist string");
scanf("%s",a);
printf("enter 2nd string");
scanf("%s",b);
y=strcmp(a,b)
printf("%d",y);
}
strcmp function tells that how many diferrent character the strings have
it will be in numeric
eg if output is 2
then there will be 2 different characters in strings
mint
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment