| Current Path : /var/www/html/venkat/old/ |
| Current File : /var/www/html/venkat/old/lit2015026_2.c |
#include<stdio.h>
void main()
{
char str1[50];
char str2[50];
int i,j=0;
printf("Enter the 1st string \n");
scanf("%s",&str1);
printf("Enter the 2nd string \n");
scanf("%s",&str2);
for(i=0;str1[i]!='\0';i++)
{
for(j=0;str2[j]!='\0';j++)
{
if(str1[i]==str2[j])
printf("%c",str1[i]);
}
}
}