# Multiple C strings in PROGMEM defined in a big string

**URL:** <https://forum.arduino.cc/t/multiple-c-strings-in-progmem-defined-in-a-big-string/1459160>\
**Category:** Programming\
**Created:** [September 10, 2026, 2:39pm UTC](https://forum.arduino.cc/t/multiple-c-strings-in-progmem-defined-in-a-big-string/1459160 "2026-09-10T14:39:51Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [September 11, 2026, 2:28pm UTC](https://forum.arduino.cc/t/multiple-c-strings-in-progmem-defined-in-a-big-string/1459160/22 "2026-09-11T14:28:11Z")

</div>

> [@david\_2018](#):
>
> The whole point of the sizeof() was that the compiler calculates the offsets.

Which is great for fixed-size records. Yeah, file techniques apply where mixed size data is "an advanced topic" in the old programming manuals with pages out of the 60's and/or 70's.

---

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [September 11, 2026, 2:35pm UTC](https://forum.arduino.cc/t/multiple-c-strings-in-progmem-defined-in-a-big-string/1459160/23 "2026-09-11T14:35:29Z")

</div>

> [@david\_2018](#):
>
> As I said, I've used a single c-string for multiple strings in the past, but omitted the table of pointers because it was easy enough to go through the c-string and count the nulls to find a particular string, and the code did not require the speed of the pointer table.

That's quite a balance but when cramming the most data in and you don't mind losing some speed, it could make the day.

Other answer to loading PROGMEM is requiring that the bootloader allows writing flash at runtime and just pouring bytes in through a file or Serial Monitor (messier, more work) and take the data out of the compile.

---

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [September 11, 2026, 2:45pm UTC](https://forum.arduino.cc/t/multiple-c-strings-in-progmem-defined-in-a-big-string/1459160/24 "2026-09-11T14:45:04Z")

</div>

> [@J-M-L](#):
>
> notice there is no comma, it's not an array of cStrings. it's just taking advantage of the compiler concatenation feature.

I didn't see that, either lost it or never knew, can't tell now.

Trying to remember, there used to a line continuation character that I didn't make work last time I wanted.... \?

and now you show me I never needed that... DOH!

What I like about the way I did it is NOT having a scroll to see tall list in source. There's no way I know to arrange beaucoup data that takes the size away while keeping the details visible.

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [September 11, 2026, 4:02pm UTC](https://forum.arduino.cc/t/multiple-c-strings-in-progmem-defined-in-a-big-string/1459160/25 "2026-09-11T16:02:58Z")

</div>

> [@GoForSmoke](#):
>
> Trying to remember, there used to a line continuation character that I didn't make work last time I wanted.... \?

Line continuation with a backslash at end of line is a preprocessor trick that deletes the backslash and newline before compilation even starts, joining two lines into one, and it works anywhere in the code, not just in strings.

Adjacent string literal concatenation is a separate compiler rule where two string literals next to each other, with nothing but whitespace or a newline between them, get merged into one literal automatically, no backslash needed.

---

<div class="post-metadata">

**Author:** ![GoForSmoke](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/goforsmoke/32/1127097_2.png) [@GoForSmoke](https://forum.arduino.cc/u/GoForSmoke)\
**Post date:** [September 12, 2026, 12:38am UTC](https://forum.arduino.cc/t/multiple-c-strings-in-progmem-defined-in-a-big-string/1459160/26 "2026-09-12T00:38:16Z")

</div>

> [@J-M-L](#):
>
> not just in strings.

in string, \65 is an A and \0 is a NUL but I forgot or dinno \ alone.

[Previous page](https://forum.arduino.cc/t/multiple-c-strings-in-progmem-defined-in-a-big-string/1459160.md?page=1)
