Answers for "accessing the elements of a char* in c"

0

accessing the elements of a char* in c

#include <stdio.h>

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;
}
Posted by: Guest on November-08-2020

Code answers related to "accessing the elements of a char* in c"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language