Pointers and Strings

Learn pointer to string with the help of an interactive example.

Pointer to string

So far, we have seen that we use a char array to store strings in memory. Each character in the character array, name[], takes one byte of memory. The memory layout of the string is given below:

Get hands-on with 1400+ tech skills courses.