Answer to Question #256261 in C++ for ALI

Question #256261

Q: Many languages internally treat strings as character arrays, but somehow conceal this fact from the programmer. Character arrays or strings are used by programming languages to manipulate text such as words and sentences. Explain this statement with the help of a program.



1
Expert's answer
2021-10-26T17:29:35-0400

character arrays are more efficient than string for some reasons:

1: To refer the whole string single pointer is enough and that is efficient with memory

2: You don't need to declare the size of string bedorehand.


        char* foo = "Hakuna Matata"

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS