CSC201 - Week7
CSC201 - Week7
Course Lecturer:
Haruna Musa
([email protected])
does not reserve any space for the array called people.
Because you did not assign a value to the array when you
declared it, C++ assumes this array contains zero elements.
char cara1[10]={‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘j’};
char cara2[10]=”Excellent”;
If you want to put only individual characters in an
array, you must enclose the list of characters in
braces, as shown.