

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Computer Programming Lecture - All about C++ Programming
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


NAVAL, JOANA JANE Q. 2 nd^ Semester COMPUTER PROGRAMMING BSCS – 1D MS. MEO LIM GABAS
NAVAL, JOANA JANE Q. 2 nd^ Semester COMPUTER PROGRAMMING BSCS – 1D MS. MEO LIM GABAS An assignment statement sets and/or re-sets the value stored in the storage location/s denoted by a variable name; in other words, it copies a value into the variable. The assignment operator allows us to change the value of a modifiable data object (for beginning programmers this typically means a variable). It is associated with the concept of moving a value into the storage location (again usually a variable). Within most programming languages the symbol used for assignment is the equal symbol. But bite your tongue, when you see the = symbol you need to start thinking: assignment. The assignment operator has two operands. The one to the left of the operator is usually an identifier name for a variable. The one to the right of the operator is a value. Simple Assignment
The value 21 is moved to the memory location for the variable named: age. Another way to say it: age is assigned the value 21.