answersLogoWhite

0

How are string variables stored?

Updated: 8/11/2023
User Avatar

Wiki User

8y ago

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.


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


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

Yes.


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.


Global variables are stored in?

Main memory (RAM).


Where do register variables get stored?

Either in registers or on the stack.