For example, if I have code in C or C++ where I use typedef to create different kinds of strings like this:
typedef char shortString[20];
typedef char longString[50];
typedef char veryLongString[100];
Does doing so actually use up less memory than if I were to have just one typedef string for all my string variables like this?
typedef char string[100];
Yes. A typedef is just an alias for a type. So it's equivalent to "Does using an array of 50 characters for a variable use less memory than an array of 100 characters?"
Note that if you're using multiple array lengths for strings, it can be complicated to avoid buffer overruns by ensuring you always use the correct length when working with them.