Questão | Responda |
What is a constant ( Definition ) | A name that represents a fixed value, This must be set and defined at the start of the code and does not change throughout |
What is a variable ( Definition ) | A name that is identified and relates to a specific memory location that is used to store data. The value of the data is able to be changed while the program is running |
What is a global variable | Its a variable declared at the begging of the code and can be used throughout. It can be used in all subroutines in the program |
what is a local variable | can only be used the subroutine that it is declared in |
what is an identifier ( definition ) | The name that is given to a variable , constant or subroutine is an identifier |
what is reserved keywork | words that have specific use in the code with one purpose in the program. these cannot be used as identifiers |
Differences between constants and variables | there are two main differences, One , When a constant is declared it must be given an actual value. Variables can be left empty. Two , A constant must remain the same throughout the code. A variable can change |
Initializing variables ( meaning ) | Initializing means a variable is giving a value at the starting value, This makes the code easier to follow |
How do constants maintain the program | Using clear and descriptive identifiers makes the code easy to follow. Easier to remember and find when searching though code. It can however be changed |
when naming constants and variables what should you do | The name should identify and describe the item they should be commented to ensure identifying them and understanding them and their process is easy underscores |
lay out of code | Organize code into modulus use indentation ( both show the individual areas and processes in code and identify areas that need to be described ) comments ( to explain ) |
Did you like the flash cards |
Quer criar seus próprios Flashcards gratuitos com GoConqr? Saiba mais.