Data types | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Data types

what is the difference between String type and array of char.

24th Feb 2017, 11:38 PM
El.hachem BENSAID
El.hachem BENSAID - avatar
1 Answer
+ 2
the way that they are stored in memory is different. A string will be stored as a long stream of ascii code and individual elements can not be accessed. Char however are each stored as individual memory locations and can be accessed individually
25th Feb 2017, 12:19 AM
Jason Hoffman
Jason Hoffman - avatar