Variables and Declarations in C++

Variables in C Plus Plus (C++): A variable can be defined as “a quantity that varies during program execution”. A variable is a symbol that represents a storage location in the computer’s memory. The information that is stored in that location is called the value of the variable. One common way for a variable to obtain a value is by an assignment. This has the syntax: variable = expression First, the expression is evaluated and then the resulting value is assigned to the variable. The equal sign “=” is the assignment operator in C++. Declarations in C++: A declaration associates a group of variables with a specific data-type. All variables must be declared before they can appear in executable statements. A declaration consists of a data-type, followed by one or more variable names, ending with a semicolon. Example: int a, b, c; float root1, root2; char flag; Here,a, b and c are...