+ 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 ??

8th Apr 2017, 3:48 AM
m8riix
m8riix - avatar
3 Respuestas
+ 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.
8th Apr 2017, 3:50 AM
Hatsy Rei
Hatsy Rei - avatar
+ 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... ) ...
8th Apr 2017, 5:11 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
0
thank you so much hatsy rei for your answer.
8th Apr 2017, 3:53 AM
m8riix
m8riix - avatar