I am new to C and want to know why this program adds garbage at the end of the string.
#include <stdio.h>
#include <stdlib.h>
char* cpy(char*);
int main() {
char *old = "Hello All Now i thought this would work apparently";
char *newer = cpy(old);
printf("%s",newer)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.