The AVR microcontrollers generally have a lot more FLASH memory for storing programs than they have RAM for storing data when the programs are running. Strings can quickly use up a lot of memory, therefore if you are using a lot of strings that do not need to change during the course of program execution, it makes sense to store them in program memory, and not in RAM. Several functions are available for this. One of the simplest to use is rprintfProgStrM():
rprintfProgStrM("Hello!"); // print a string that is automatically stored in program memory
static char PROGMEM str1[] = "This is a test."; ... rprintfProgStr(str1);The static declaration is necessary when a string is to be stored in program memory. PROGMEM is a macro inserted between the variable type and name that defines the variable in program memory. This way of defining a string in program memory would be useful when the same string is used in several places in the program. If the string is only used once, rprintfProgStrM() would probably be easier.