Persisting state

Thanks for the outstanding explanation.

I guess the answer means that you will always have 50 spaces reserved in memory for the chars… If you would use the string it will be variable in size… And 50 means 50 chars are reserved for the string?

Am I close? :blush:

1 Like

Yep, you got it. with char[50] you allocate 50 bytes. With char* you allocate just the size for a pointer. But storing a pointer in flash doesn’t make much sense, since the area it points to will likely have different contents next time the system starts up.

1 Like