CSC Exam Preparation with 100%
Correct Answers
Which gate produces a 1 as its output only if both of its inputs are 1? - ANSWER-AND
Algorithm - ANSWER-an ordered collection of unambiguous, executable steps that
defines a terminating process.
Pseudocode - ANSWER-an English-like language used for representing algorithms.
The main purpose of computer programming is to - ANSWER-solve problems
compiler - ANSWER-translates an entire computer program into machine language and
writes it to a file so it can later be executed.
One of the stages in developing software is - ANSWER-requirements analysis.
Java is considered a member of which of the following programming paradigms? -
ANSWER-object oriented
Sequence, selection and looping are - ANSWER-the categories for control structures
used in a programming language.
method or procedure - ANSWER-is a block of code that has been assigned a name.
A variable has - ANSWER-name, memory address, and contents
walk-throughs and boundary analysis - ANSWER-Techniques that are useful for testing
algorithms are
Boolean variables - ANSWER-can contain only the values true or false.
a parameter - ANSWER-a variable that is used to pass information to a function
decision - ANSWER-The code below is best described as an example of
if y is not equal to 0 then
z=x/y
else
z=0
end if
, The for statement is useful for - ANSWER-executing a block of code a predetermined
number of times.
9,7 - ANSWER-What would be printed if the following instructions were executed?
x=9
print the value of x
y=5
if (x < y) then
print the value 6
else
print the value 7
end if
nothing will come out - ANSWER-What would be printed if the following instructions
were executed?
x=3
while (x < 0)
print the value of x
x=x-1
end while
4 2 - ANSWER-What would be printed if the following pseudocode were executed?
x=4
while (x > 0)
if (x is even)
print the value of x
end if
x=x-1
end while
Which of the following concepts are associated with object-oriented programming? -
ANSWER-polymorphism, inheritance and encapsulation
What are the two primary attributes of objects in programming? - ANSWER-state and
behavior
Top down design with stepwise refinement - ANSWER-is a divide and conquer
approach to problem solving.
intent error - ANSWER-occurs whenever the program successfully terminates but does
not successfully complete the task.
Correct Answers
Which gate produces a 1 as its output only if both of its inputs are 1? - ANSWER-AND
Algorithm - ANSWER-an ordered collection of unambiguous, executable steps that
defines a terminating process.
Pseudocode - ANSWER-an English-like language used for representing algorithms.
The main purpose of computer programming is to - ANSWER-solve problems
compiler - ANSWER-translates an entire computer program into machine language and
writes it to a file so it can later be executed.
One of the stages in developing software is - ANSWER-requirements analysis.
Java is considered a member of which of the following programming paradigms? -
ANSWER-object oriented
Sequence, selection and looping are - ANSWER-the categories for control structures
used in a programming language.
method or procedure - ANSWER-is a block of code that has been assigned a name.
A variable has - ANSWER-name, memory address, and contents
walk-throughs and boundary analysis - ANSWER-Techniques that are useful for testing
algorithms are
Boolean variables - ANSWER-can contain only the values true or false.
a parameter - ANSWER-a variable that is used to pass information to a function
decision - ANSWER-The code below is best described as an example of
if y is not equal to 0 then
z=x/y
else
z=0
end if
, The for statement is useful for - ANSWER-executing a block of code a predetermined
number of times.
9,7 - ANSWER-What would be printed if the following instructions were executed?
x=9
print the value of x
y=5
if (x < y) then
print the value 6
else
print the value 7
end if
nothing will come out - ANSWER-What would be printed if the following instructions
were executed?
x=3
while (x < 0)
print the value of x
x=x-1
end while
4 2 - ANSWER-What would be printed if the following pseudocode were executed?
x=4
while (x > 0)
if (x is even)
print the value of x
end if
x=x-1
end while
Which of the following concepts are associated with object-oriented programming? -
ANSWER-polymorphism, inheritance and encapsulation
What are the two primary attributes of objects in programming? - ANSWER-state and
behavior
Top down design with stepwise refinement - ANSWER-is a divide and conquer
approach to problem solving.
intent error - ANSWER-occurs whenever the program successfully terminates but does
not successfully complete the task.