/*write a c program to copy the one string into another string
without using standard function */
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char str1[30],str2[30];
clrscr();
printf("\nenter the string:\n");
gets(str1);
strcpy(str2,str1);
printf("the copied string is :\n%s",str2);
getch();
}
/*
enter the string:
peersaan nadaf
the copied string is :
peersaan nadaf
*/
No comments:
Post a Comment