+ 2
What does an array of string means ??
I think array only consist of numbers but string contains some alphabets. can an array contain alphabets ??
3 Answers
+ 11
Array is a collection of similar data types. You can have int arrays, char arrays, float arrays, even string arrays.
In C++, strings are char arrays.
+ 6
@Faisal Reza
chars in C++ are nothing but integers represented as symbols using ASCII or Unicode Conventions...
Thus, on seeing a char array in memory...
//After all, arrays are contiguous memory locations storing different variables of a data type...
the array "HELLO" would have - :
Memory -:
72 | 69 | 76 | 76 | 79
//ASCII representation of HELLO...
As you can see, there are nothing but integers...
The only difference arise in floats, doubles or long doubles, where there are two integers, one representing mantissa and the other representing exponents ( power of the mantissa to place the decimal point... ) ...
0
thank you so much hatsy rei for your answer.