Chapter - 10: Strings

Can an array of pointers to strings be used to collect strings from the keyboard? If not, why not?


E
Sections
2
Exercises

An array of strings can never collect string from keyboard directly, it can only be initialized at the time of declaration. But still, we can store strings from the keyboard in the array of characters indirectly, by storing the string in the simple string variable and then allocate memory to the pointer of appropriate size and then copy the string from that simple string variable to the array of the pointer.


© 2021 Garbage Valuegarbage value logo