Difference Between String And Character Array.
3 years ago
C Programming
|
String |
Character Array |
|
1). String is a collection of elements. |
1). The character array is a collection of variables stored in contiguous memory. |
|
2). The String always ended with Null Character ‘\0’. |
2). The Character array ended with the last variable of the array. |
|
3). Slow access compare to a character array. |
3). Fast access compare to string. |
|
4). The string used to static memory. |
4). The character array is used for static memory. |
Rusma Khadka
Dec 27, 2022