Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


If we give two names then this displays the connection
between the two people. It is nothing but flames game



If we give two names then this displays the connection between the two people. It is nothing but f..

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

Post New Answer

More C Interview Questions

What is a structure member in c?

0 Answers  


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

0 Answers  


WHAT IS MEANT BY LIFE?

2 Answers  


write a program to convert a expression in polish notation (postfix) to inline (normal)

0 Answers   Siemens,


What is the relation between # and include<stdio.h>

5 Answers   HCL,






What are actual arguments?

0 Answers  


What is modeling?

0 Answers  


Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: “ We Are Student “ Output: "We Are Student"

1 Answers  


What is ## preprocessor operator in c?

0 Answers  


read a number & print all its devisors using c-program?

3 Answers  


What is the use of the function in c?

0 Answers  


Write a program for finding factorial of a number.

0 Answers   Tech Mahindra,






Categories