/dev/ttyACM0 in bash

If I am right to expect uninitialised variables to remain unchanged in memory during reset

No, uninitialized variables are not in a defined state and at every reset they may have another state. Don't expect anything in the RAM to be the same after the reset as it was before the reset and if it is, you cannot rely on it.