Anonymous

Value stored in the memory are referred through variables in programming languages. What are various common types of variables that can be used for referring to the appropriate values in programming languages?

1

1 Answers

Ray Dart Profile
Ray Dart answered

It is important to remember, that ultimately, modern computers only ever store, and work with binary values, so at a machine level this is all that exists. To answer your question more helpfully, though. Most languages understand "integers" (whole, non-fractional numbers). These usually have a maximum value, depending upon operating system and CPU architecture. There are "long integers" (the same only with higher limits). "Short integers", typically much smaller. "Characters" are usually one byte in length.  "Floating point" or "real" numbers contain exactly what they describe. "Strings" are one-dimensional arrays of "chars". "Booleans" are "true/false" values.  

Apart from these, there are contrived storage elements, like pointers and user-defined types. Most languages use the above, plus language-specific "extras". Did that help?

Answer Question

Anonymous