When strings are declared as character arrays, they are stored like other types of arrays in C . For example, if str[] is an auto variable then string is stored in stack segment, if it’s a global or static variable then stored in data segment, etc.
How do you store a string in a structure?
When strings are declared as character arrays, they are stored like other types of arrays in C . For example, if str[] is an auto variable then string is stored in stack segment, if it’s a global or static variable then stored in data segment, etc.