Posts by user3855164 • 43 points
1 post
-
4
votes1
answer442
viewsQ: Copying string stored in pointer
What is wrong? #include <stdio.h> #include <string.h> int main(void) { char *str= " teste"; int j = 0; while(str[j] == ' ') j++; memcpy(str, &str[j], strlen(&str[j])+1);…