Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

accessing the elements of a char* in c

#include <stdio.h>

int main()
{
    char *p="abcd";
    printf("%c
", p[0]);
    printf("%c
", p[1]);
    printf("%c
", p[2]);
    printf("%c
", p[3]);
    return 0;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #accessing #elements
ADD COMMENT
Topic
Name
1+1 =