Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination
My advice would be to use C style strings (zero terminated arrays of chars) rather than Strings (objects of the String library)
Then you can use the standard EEPROM library EEPROM.put() to save any of your data types with a single call and EEPROM.get() to retrieve any of them with a single call
If the data is in a struct then you load and save the whole struct with a single call to get() and put()
I applied discipline to the notion that OP is qualified to use String as a data type. Here, he is enjoying liberty. This does not beak the rules of the Programming Language.
An attempt by the OP to store 988899 in an int type variable is something like breaking the discipline (the rules of the Programming Language).
Does the above Room variable (the array) contain single character or two characters?
I can say with hand on heart that I have not broken the rules of the programming language and that the sketch that I posted was compiled using the Arduino IDE and that the output was copied from the IDE Serial monitor. Remember what I said
Can you guess what that detail might be ?
That is very true of a string but we are not talking about strings are we ? We are talking about using a String. How many bytes are used to store a single character String ?
Compiler is a Machine who is here to assist a Human Being to take sound decision based on the results delivered by the Compiler. It is the Human Being who is eventually accountable to the Society and not the Machine for the actions. So, there is no scope to tell the Boss that the Computer (the Machine/Compiler) has delivered me an error free result which I have applied in my project; but, it has proved fatal. I am sure that the Boss will say why have I not exercised my own judgement to see if the Computer has indeed provided the "just" result or not before applying it in an application?
By definition, I have learnt that a string (characters glued together one after another) contains a built-in null-character. Is it correct in saying that the said definition will appear invalid if the data type changes from char to String?
When I compile the code in reply #16 using the Arduino IDE and one of my test systems I get no warnings and certainly no errors, even when verbose errors for compiling and uploading are turned on, so the compiler gives the code a clean bill of health from the point of view of actually compiling the code.
However, the compiler cannot know what I am really doing so it is up to me to ensure that the result is reasonable and that I have stayed within the bounds of arrays and that appropriate data types have been used to hold the values used by and resulting from the sketch, which in this case I have
The definition and your understanding of the structure and contents of a C style string will remain valid if the variable is declared as a string. They will remain the same if you declare a variable as a String but, the structure and contents of a String are not the same as a string.
A String has an array of chars at its heart but the String object takes more bytes to hold the data (see reply #16) which is one reason to avoid using Strings and certainly a reason not to use single character Strings