concatinating and removing char from char array in c code example
Example 1: remove first character from string c
if (contents[0] == '\n')
memmove(contents, contents+1, strlen(contents));
Example 2: accessing the elements of a char* in c
#include
int main()
{
char *p="abcd";
printf("%c\n", p[0]);
printf("%c\n", p[1]);
printf("%c\n", p[2]);
printf("%c\n", p[3]);
return 0;
}