answersLogoWhite

0


Best Answer

Typically as null-terminated character arrays. However, some languages use the first element of the array to store the length of the string rather than a null-terminator to mark the end of the string.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

String variables are - generally - used to hold and manipulate text, as opposed to performing calculations with numbers.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How are string variables stored?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is string variables?

A string variable is a programming language construct that holds text. For example, the text "The sky is blue" could be stored to a string variable, then later in the program, that text could be displayed.


Where auto variables are stored?

Auto variables are stored on the stack alongside all other local variables.


Where dynamic variables are stored?

Dynamic variables are stored in a memory heap allocated to them at run time.


Where does Local Variables get stored in?

Stack.


Is global variables are stored in registers?

They is not.


Local Variables will get stored in?

Stack.


Variables declared using the string data type usually are initialized to the empty string?

Yes.


Where the static variables are stored?

initialize static variables are stored in data segment where uninitialized static variables are stored in BSS(block storing for Symbol) it also a part of data segment exp static int i=10;//stored in data segment static int i;//stored in BSS (uninitialized data segment) Thanks NAvin


Where local variables are stored in c?

On the stack.


How is a string stored in array?

The characters are stored in successive elements of the array with a nul (0) in the element after the last character of the string. Remember the array storing a string in C must be at least one element longer than the longest string to be stored in it to allow space for this nul (0) character.


What energy is stored in a stretched string?

Elastic potential energy is stored in a stretched string, which is the energy stored in an object when it is deformed (such as being stretched) and can be released when the object returns to its original shape.


Where string is stored on Heap or Stack in java?

A String is treated as an object, meaning there is an object on the heap. Of course, the variable you define is a pointer to the object, and it is stored on the stack.A String is treated as an object, meaning there is an object on the heap. Of course, the variable you define is a pointer to the object, and it is stored on the stack.A String is treated as an object, meaning there is an object on the heap. Of course, the variable you define is a pointer to the object, and it is stored on the stack.A String is treated as an object, meaning there is an object on the heap. Of course, the variable you define is a pointer to the object, and it is stored on the stack.