assigning chars to numbers array
This commit is contained in:
parent
c23968939a
commit
3be4117ef1
13
ex9.c
13
ex9.c
@ -15,10 +15,15 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
printf("name: %s\n", name);
|
printf("name: %s\n", name);
|
||||||
|
|
||||||
numbers[0] = 1;
|
numbers[0] = 'Z';
|
||||||
numbers[1] = 2;
|
numbers[1] = 'e';
|
||||||
numbers[2] = 3;
|
numbers[2] = 'd';
|
||||||
numbers[3] = 4;
|
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[0] = 'Z';
|
||||||
name[1] = 'e';
|
name[1] = 'e';
|
||||||
|
Loading…
Reference in New Issue
Block a user