PAPER 1(QUESTIONS AND ANSWERS
100% CORRECT.
Algorithm - ANSWERSset of rules or sequence of steps stating how to solve a problem.
All have input, processing and output.
Trunc Function - ANSWERSrounds a real number down to the nearest whole number
data structure - ANSWERScollection of elementary data types such as integer, real,
boolean and built in methods to facilitate processing in some way
structured data type - ANSWERSstring, array/list, record
array - ANSWERSfinite, ordered set of elements of the same type
subroutine - ANSWERSnamed block of code that performs a specific task within a
program
how does it work when parameters are passed by reference - ANSWERSlike having a
global variable as the value can be affected anywhere in the program
local variables - ANSWERSonly used in subroutine, can be tested independtly and
subroutine can be easily used many times
modular programming - ANSWERSwhen the program is broken into subroutines
what is a record? (in terms of files) - ANSWERSa file consists of a number of records
a record contains a number of fields
In what mode can you open a file? - ANSWERSread, write and append
what is append mode? (in terms of opening a file) - ANSWERScreate a file if one does
not already exist
How can you overwrite data? (records) - ANSWERSyou can open the record for both
reading and writing.
how to read a binary file? - ANSWERSis language specific and involves knowing
exactly what each field type in the record is and how many bytes it occupies. and it
needs to be opened in a mode that specifies that it is binary file
, hierachy chart - ANSWERSrepresents the structure of a program , it doesnt show a
great level of detail
"divide and conquer" algorithm - ANSWERShalves the search area every time a guess
is made. e.g. binary search
what is the purpose of testing - ANSWERSTo try and uncover undetected errors
what is normal data - ANSWERSin the expected range, and is the correct data type
what is boundary data - ANSWERSdata on the boundry of the valid range
What is erroneous data? - ANSWERSInputs that the program should not accept.
(outside the range/ wrong data typ)
what is abstraction - ANSWERSRemoving unnecessary detail from a problem
what is abstraction by generalisation? - ANSWERSA grouping by common
characteristics to arrive at a hierarchical relationship of the 'is a kind of' type.
what is procedural abstraction - ANSWERSUsing a procedure to carry out a sequence
of steps for achieving some task for example drawing a triangle. (hiding the method
from the rest of the solution)
what is procedure interface - ANSWERSthe programmer only needs to know how the
procedure is called and what arguments are required to do the task. it is not
nesscessary to know how to procedure works
what is functional abstraction? - ANSWERSsame as procedural but returns a value
What is data abstraction? - ANSWERSsimilar to procedural abstraction but with like
data types, for example queues and stacks or how integers and real numbers are
represented in a computer
what is information hiding - ANSWERSwhere data is not directly accessible and can
only be accessed through defined procedures and functions. for example oop
what is automation - ANSWERSusing a model or models to solve the problem
what is finite state automation - ANSWERSa finite state machine with no output
what is deterministic finite state machine - ANSWERSif when in a particular state the
next state is uniquely determined by the input