Tag Archives: pointer to array

Arduino and memory pointers

Arduino and memory pointers

I needed to use pointers in my Arduino code. The pointer was for a string. So it was a pointer to an array or pointer to a pointer. I had last worked with pointers many decades back, so it needed a bit of remembering and experimenting to get it right. The problem was a little more compounded as it was a  pointer to an array. On the internet there are many documents but none of them actually helped. Finally I had to refer to old textbooks and college materials. Here is a brief for quick reference and recalling pointers.

In classic C strings are arrays. It can be also understood from the declaration of strings in C  – char str[] = “Hello World”;
Continue reading Arduino and memory pointers