Explain the disadvantages and advantages of having strings b
Explain the disadvantages and advantages of having strings be primitive types versus array types.
Solution
Simplest possible storage, conserves space
| Dynamic memory allocation. User need not to define the size of the string. | Static memory allocation. User need not to define the size of the string at comlile time. |
|---|---|
| boundary issues are handled by itself | boundary need to handled. |
| less faster and efficient at runtime | more faster and efficient at runtime. |
| may lead to heap issue at a particular time | it will be detected by compiler at compile time about the heap space. |
| not as simple | Simplest possible storage, conserves space |
