Introduction to Computer Science 2 (CSCS2202)
Mathematics and Computer Science - MCS
Semester: Second Semester
Level: 200
Year: 2016
REPUBLIQUE DU CAMEROUN
Paix — Travail — Patrie
MINISTRE DE L'ENSEIGNEMT
SUPERIEURE
UNIVERSITE DE BANIENDA
P7Obity
FACULTE DES SCIENCES
REPUBLIC OF CAMEROON
P ea c e
-
W or k
-
Fa t h e r la n d
MINISTRY OF HIGHER EDUCATION
THE UNIVERSITY OF BAMENDA
FACULTY OF SCIENCE
P.O Box 39 BAMBILI
TEL: (+237) 22 81 63 50
DEPARTMENT OF MATHEMATICS AND COMPUTER SCIENCE
Introduction Computer Science II — Tutorial Questions
1) An iterative approach to system development whereby a partially or fully functional
system is developed as soon as possible is referred to as: I mark
(a) Spiral Development
(b) Waterfall Model
(c) Protot ypin g
(d) Rapid Application Development
2) The well-defined set of building blocks from which algorithm representations can be
created are referred to as: 1 mark
(a) The Programming Language
(b) The Pseudocodes
(c) The Primitives
(d) The Assignment Statements
3) One software design that has proven to be most productive is referred to as: 1 mark
(a) Top-down design
(b) Bottom-up design
(c) Bottom-top up design
(d) Structured-wise design
4) What is meant by the "scope" of a variable? 1 mark
5) What is the difference between a procedure and a function? 1 mark
6) What is the difference between a formal parameter and an actual parameter? 2 mark
7) Please state three reasons as to why a structured approach to system development may
not be very appropriate in developing systems today as opposed to the 1960s and
1970s. 3 marks
8) Explain what to understand by the term algorithm and state why it is very crucial in
computer science? 5 marks
9) Please briefly explain the concept of abstraction in the context of computer science
and design of computer systems plus state its implication on system designs. 6 marks
10) In what sense is the construction of procedures the construction of primitives? 2
marks
11) What is the difference between syntax and semantics? 2 marks
12) Describe how the use of primitives helps remove ambiguities in an algorithm's
representation. 5 marks
Page 1 of 2
www.schoolfaqs.net
Page 2
of
2
13) Please give a brief explanation of the concept of user-defined data types and
provide an example to support your explanation. 8 marks
14) Please convert the pseudoccde routine to an equivalent routine using a repeat
statement 7 marks
Z <
7
0; X <-
7
-1;
while (X < 6) do
(Z, <-
7
-Z + X;
X ÷
7
X ± 1)
15) Why is passing parameters by value inefficient? Please provide a more efficient
way of dealing with this plus give an explanation to your chosen technique. 8 marks
16) Please identify the error(s) found within this simple program plus correct them. 5
marks #include <sdio.h>
main()
*/This is my first program i*
/This program is going to demonstrate how to use the printf and scanf functions
int pin;
printf("Please type in your PIN\n");
scanf("%d",&pin);
printf("Your access code is %d\n",pin)
}
17) Please write a simple C Adder program that can be used to output the following
information on separate lines: 10 marks
This Adder program is written as a part of my CSCS2202 course.
It is going to output the sum of two operands
Please enter first operand:
Please enter second operand:
The result is:
18) Explain the concept of prototyping and state a situation in which it is most 'helpful. 8
marks
www.schoolfaqs.net