top of page
#include<stdio.h>
#include<string.h>
void myCopy( char *str,char *copy);
int main(void){
printf("enter a string\n");
char str[50];
char copy[50];
scanf("%s",str);
char *strP,*copyP;
strP=str;
copyP=copy;
printf("uz:%d\n",strlen(strP));
myCopy(strP,copyP);
printf("string :%s",copyP);
return 0;
}
void myCopy( char *str ,char *copy){
while(*str!='\0'){
*copy=*str;
copy++;
str++;
}
}
bottom of page