Can anyone please help me? I need to remove the first character from a char * in C.
char *
For example, char * contents contains a \'\\n\'
char * contents
\'\\n\'
Here is my code
char * bastakiniSil(char *contents){ char *p = malloc( sizeof(*p) * strlen(contents) ); int i; for(i=0; i<strlen(contents); i++) { p[i]=contents[i+1]; } return p;
}