What is the difference between Strings vs. Char arrays?

Technology CommunityCategory: Data StructuresWhat is the difference between Strings vs. Char arrays?
VietMX Staff asked 3 years ago

Char arrays:

  • Static-sized
  • Fast access
  • Few built-in methods to manipulate strings
  • A char array doesn’t define a data type

Strings:

  • Slower access
  • Define a data type
  • Dynamic allocation
  • More built-in functions to support string manipulations