If we give two names then this displays the connection
between the two people. It is nothing but flames game
Answer Posted / 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 |
Post New Answer View All Answers
what are the 10 different models of writing an addition program in C language?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
What are the types of type specifiers?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What is uint8 in c?
What is a MAC Address?
What is the purpose of macro in C language?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
What are operators in c?
What is typedef struct in c?
Where register variables are stored in c?
Write a program to check prime number in c programming?
What is a pointer and how it is initialized?
How are strings stored in c?