Open swethareddy18 opened 2 years ago
char copyString(char s[]) { char s2; s2 = (char*)malloc(20);
strcpy(s2, s); return (char*)s2;
} int main() { char s1[20] = "GeeksforGeeks"; char* s2; s2 = copyString(s1); printf("%s", s2); return 0; }
include
include
include
char copyString(char s[]) { char s2; s2 = (char*)malloc(20);
} int main() { char s1[20] = "GeeksforGeeks"; char* s2; s2 = copyString(s1); printf("%s", s2); return 0; }