Generation

generate functionTue, 10 Jan 2023

create a list of strings using a character pointer array

void create_list(char** list, int num_elements) { list[0] = "hello"; list[1] = "world"; } int main(void) { char* list[4]; create_list(list, 4); printf("%s, %s", list[0], list[1]); }

Questions about programming?Chat with your personal AI assistant