assigning chars to numbers array

This commit is contained in:
Dan Buch 2011-09-08 22:47:27 -04:00
parent c23968939a
commit 3be4117ef1

13
ex9.c
View File

@ -15,10 +15,15 @@ int main(int argc, char *argv[])
printf("name: %s\n", name);
numbers[0] = 1;
numbers[1] = 2;
numbers[2] = 3;
numbers[3] = 4;
numbers[0] = 'Z';
numbers[1] = 'e';
numbers[2] = 'd';
numbers[3] = '\0';
printf("%c\n", numbers[0]);
printf("%c\n", numbers[1]);
printf("%c\n", numbers[2]);
printf("%c\n", numbers[3]);
name[0] = 'Z';
name[1] = 'e';