If we give two names then this displays the connection
between the two people. It is nothing but flames game
Answer / gita
main()
{
char name1[20],name2[20];
int a,b,i,j,c;
clrscr();
printf("Enter the first name:\t");
gets(name1);
printf("Enter the second name:\t");
gets(name2);
a=strlen(name1);
b=strlen(name2);
for(i=0;i<=a;i++)
{
for(j=0;j<=b;j++)
{
if(name1[i]==name2[j])
{
a--;
b--;
}
}
}
c=a+b;
i=c%6;
switch(i)
{
case 0:printf("Friends");
break;
case 1:printf("lovers");
break;
case 2:printf("Ansisters");
break;
case 3:printf("marriage");
break;
case 4:printf("enemies");
break;
case5:printf("sisters");
break;
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
What is the equivalent code of the following statement in WHILE LOOP format?
What are qualifiers in c?
What does malloc () calloc () realloc () free () do?
Explain what is a pragma?
How old is c programming language?
program for swapping two strings by using pointers in c language
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
How many levels of pointers can you have?
hi, which software companys will take,if d candidate's % is jst 55%?
wat is the output int main() { char s1[]="Hello"; char s2[]="Hello"; if(s1==s2) printf("Same"); else printf("Diff"); }
What character terminates all strings composed of character arrays? 1) 0 2) . 3) END
What is the size of empty structure in c?