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 |
#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.
main() {char a[10]={1,2,3,4,5,6};int x; for(x=0;x<4;x++){ b[x]=x+'a';} printf("%s",b);}
If the static variable is declared as global, will it be same as extern?
What is derived datatype in c?
int a=0,b=2; if (a=0) b=0; else b=*10; What is the value of b ?
what is the height of tree if leaf node is at level 3. please explain
#include<stdio.h> #include<conio.h> void main() { char ch='\356'; printf("%d",ch); } o/p=-18 why?plz.explain
Diff between for loop and while loop?
What are header files and explain what are its uses in c programming?
Explain built-in function?
c program to subtract between two numbers without using '-' sign and subtract function.
what will be the output for the following program? main() { char ch = 'k'; char c; printf("%c",c); }