To make array of string in C, use double pointer: char **names
#include <stdio.h>
int main()
{
char *name = "Bill Clinton";
printf("Name: %s", name);
char **names = {"Lady Gaga", "Luna Maya", "Hillary Clinton"};
int i;
for( i=0; i<3; i++)
printf("%d. %s", i, names[i]);
return 0;
}
No comments:
Post a Comment