C PROGRAM C program to copy string using strcpy() |
#include <stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char s1[30]="mani";
char s2[30]="gandan";
clrscr();
strcpy(s1,s2);
printf("%s",s1);
return 0;
}
OUTPUT :
gandan
Process finished.
C PROGRAM C program to copy string using strcpy() |
#include <stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char s1[30]="mani";
char s2[30]="gandan";
clrscr();
strcpy(s1,s2);
printf("%s",s1);
return 0;
}
No comments:
Post a Comment