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 are the 5 data types?
What is nested structure in c?
What is volatile variable in c with example?
What is formal argument?
can i know the source code for reversing a linked list with out using a temporary variable?
what is the stackpointer
Describe for loop and write a c program to sum the series X + x2/2! + x3 /3! + …….. up to fifteen terms.
Can a program have two main functions?
Meaning of () in c
How the C program can be compiled?
what is the difference between structural,object based,object orientd programming languages?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.