#include<conio.h>
#include<stdio.h>
void main()
{
char s1[20],s2[20];
int i=0;
clrscr();
printf("enter the string\n");
gets(s2);
while(s2[i])
{
s1[i]=s2[i];
i++;
}
s1[i]='\0';
printf("\n%s",s1);
getch();
}
#include<stdio.h>
void main()
{
char s1[20],s2[20];
int i=0;
clrscr();
printf("enter the string\n");
gets(s2);
while(s2[i])
{
s1[i]=s2[i];
i++;
}
s1[i]='\0';
printf("\n%s",s1);
getch();
}
No comments:
Post a Comment