Ask a new question or post a poll.
Answers. Every Question Deserves a Great Answer

News: Fix for answers that wouldn't save

by Answerbag Staff on November 10th, 2009

Answerbag Staff

Question

Help answer this question below.

What do variables mean?

Answers. 1 helpful answer below.

  • by Amber D. Walker on November 10th, 2009

    Answerbag Experts

    Great Answer

    Professionally Researched. (What's this?)

    Variables are one of the more fundamental concepts in computer science. Programmers speak of declaring and initializing variables and assigning values to them. Put simply, variables are references to information stored in memory.

    Variable vs. Constant

    The word variable means "able to be changed," and so variables are references to information in memory that a program can change over time. This is different than constants, which are required to remain the same.

    Common Types

    Though variables are stored in memory as a binary numerical value, most languages interpret the variables into a type. Common types include integers (for whole numbers), floats (for numbers with a decimal) and characters.

    Static vs. Dynamic Typing

    Languages use either static or dynamic typing. Static typing requires that a declared variable can have only one type within a scope, whereas dynamic typing stores the type with the variable in memory, allowing a given variable to change types as a program goes on.

    Pass-by Value

    A language uses pass-by value if, when it passes a variable into a function, the value contained by the variable is copied into a new memory location for use in the function.

    Pass-by Reference

    A language uses pass-by reference if, when it passes a variable into a function, the address of the location in memory is used by the function.

    Source:

    What Is a Variable?

    Variable Types

    Variable Typing

    No comments. Post one | Permalink

Did this answer your question? If not, then ask a new question or create a poll.

More Questions. Additional questions in this category.

You're reading What do variables mean?

Related Ads