Answers for "concatinating and removing char from char array in c"

C
1

remove first character from string c

if (contents[0] == 'n') 
    memmove(contents, contents+1, strlen(contents));
Posted by: Guest on November-18-2020
0

accessing the elements of a char* in c

#include <stdio.h>

int main()
{
    char *p="abcd";
    printf("%cn", p[0]);
    printf("%cn", p[1]);
    printf("%cn", p[2]);
    printf("%cn", p[3]);
    return 0;
}
Posted by: Guest on November-08-2020

Code answers related to "C"

Browse Popular Code Answers by Language