This section contains 544 words (approx. 2 pages at 300 words per page) |
A variable in a computer program is a symbol that identifies an area of the computer's memory where the program stores data it can modify. That is, a variable is a symbol that represents a value.
For example, in the expression "x + y" x and y are both variables. In computer programming, an expression is any valid combination of language symbols that represents a value. Each computer programming language has its own set of rules for what is and is not allowed in writing an expression. These rules are called the "syntax rules" of the language. For example, in C, C++, and Java "y = x + 6" is an expression, and so is the literal character string "this is an expression." Variables can represent numeric values, characters, character strings, or memory addresses.
Variables play an vital role in computer programming because they allow programmers to write programs in symbolic form...
This section contains 544 words (approx. 2 pages at 300 words per page) |