3.2.5 Computing - Writing Maintainable Programs 0.0 / 5 ? ComputingProgram techniquesASOCR Created by: osamamughalCreated on: 27-03-15 14:50 Define: Variable Variable: Named location in memory, given a data type and initial value. Can change during run time. 1 of 12 Define: Constant Constant: Like a variable, but the value cannot change. 2 of 12 What is an 'Identifier'? An identifier is the name given to variables, constants and sub-procedures. 3 of 12 What is a 'Reserved Keyword'? A Reserved Keyword is a word reserved for use by the programming language (e.g. int and while). 4 of 12 What is the need for good program writing techniques? So another person can upgrade, maintain or repair the code more efficiently and easily. 5 of 12 What is a 'Scope'? A scope refers to the visibility of a variable. It refers to whether the variable is a global or local variable. 6 of 12 What is a Global Variable? A global variable is a variable which can be used in any part of your program. 7 of 12 What is a Local Variable? A local variable is a variable which can only be used in a function. 8 of 12 Why should you initialise variables appropriately before using them? This is so the previous values of the variable cannot affect the operation of the program. 9 of 12 Why should you annotate the code with comments? This is so the logic of the code can be followed by other people. 10 of 12 What are the two types of comments? Single line and Multi-line comments. 11 of 12 Why should you use indentation? Indents show code-blocks nested within selection and iteration statements. 12 of 12
Comments
No comments have yet been made