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 significance of c program algorithms?
Explain the difference between null pointer and void pointer.
write a function to find whether a string is palindrome or not and how many palindrome this string contain?
What tq means in chat?
"I LOVE MY COUNTRY" write a c program to get "COUNTRY MY LOVE I" as the output. Use any other programming language. It is not mandatory to use C.
11 Answers ABC Infotech, ADP, College School Exams Tests, Kovair,
How can I get random integers in a certain range?
about c language
Can you pass an entire structure to functions?
What are the types of type qualifiers in c?
What is the output for the below program? void main() { float me=1.1; double you=1.1; if(me==you) printf("love c"); else printf("know c"); }
When should we use pointers in a c program?
Can you write the function prototype, definition and mention the other requirements.