| strings/string-array.c - Hele programmet. | Lektion 10 - slide 47 : 51 Program 1 |
#include <stdio.h>
int main(void) {
char *numbers[] = {"one", "two", "three"};
char ch1, ch2, ch3, ch4;
ch1 = **numbers; // 'o'
ch2 = numbers[0][0]; // 'o'
ch3 = *(*(numbers+1) + 1); // 'w'
ch4 = numbers[2][3]; // 'e'
printf("ch1 = %c, ch2 = %c, ch3 = %c, ch4 = %c\n", ch1, ch2, ch3, ch4);
return 0;
}