CCEA A-Level Digital Technology 2650
Systems Analysis and Development Approaches
Design, Development and Testing
Implementation and System Security
Programming
Data, Information and Data Representation
Computer Architecture and Processing Systems
System Software, Application Software and the User Interface
Web Technology and Multimedia
Networks
Databases
Artificial Intelligence, Expert Systems and Robotics
Mobile Technology, Data Mining and Cloud Computing
Individual, Social and Legal Considerations
The Development Project: Analysis and Design
The Development Project: Build, Testing and Evaluation
Programming
Variables, constants and data types
- 3 things to know
- AS Unit 1
Overview
Term variable, declaring a variable and variable and a constant.
What you need to know
Answer each one before you reveal it.
What is the danger of relying on global variables?
Define the term variable.
Questions from this subtopic
Each one with the model answer underneath.
- 1
Define the term variable.
Model answer
A variable is a named storage location in memory whose contents can be changed while a program is running.
- 2
What is meant by declaring a variable?
Model answer
Declaring a variable tells the translator its name and its data type, so that memory of the right size is reserved for it and every use of it can be checked.
- 3
What happens when a value is assigned to a variable?
Model answer
Assignment stores the given value in the variable's memory location, replacing whatever value was held there before.
- 4
Distinguish between a variable and a constant.
Model answer
A variable holds a value that the program is free to change as it runs, whereas a constant is given its value when the program is written and cannot be altered during execution.
- 5
Give one reason for defining a constant rather than typing the same number in several places.
Model answer
A constant such as a rate of tax is defined in one place only, so when the rate changes a single line is edited and there is no risk of an occurrence being missed.
- 6
Define the term data type.
Model answer
A data type states what kind of value a variable may hold, which operations may be carried out on it, and how much memory is reserved for it.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Programming, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.