CSE Practice 1

Software testing involves the execution of a software component or system component to evaluate one or more properties of interest.
True
False
The MAIN method tells the program where to begin running code as it is the entry or starting point for the program.
True
False
Output is process of reading information from user, usually via keyboard or mouse.
True
False
A flowchart is a type of diagram that represents an algorithm, workflow or process.
True
False
Programming starts with
Looking online for the answers.
Developing an algorithm.
Writing code until it works.
Debugging is the process of
Solving errors in the source code.
Compiling the source code.
Publishing the source code to the client.
Writing source code.
Pseudocode is
An informal high-level description of the operating principle of a computer program or algorithm.
A formal programming language.
A machine.
Program design consists of
writing the code for a program.
steps a programmer should do before they start coding a program in a specific language.
Writing the documentation for a program.
The ability to solve problems.
Input is sending messages to the console/user.
True
False
IDE stands for
Integrated Development Environment
Intramural Department Executive
Initial Degree Expectations
4
16
6
10
-5, 18
3, 5
-5,-3
5, 3
A String (or string) object is a primitive data type.
True
False
If the expression xyz % 3 == 0 is true and xyz is a positive integer, then the value stored in the variable xyz is evenly divisible by 3.
True
False
800.0
Error message
333.33333333333
333.0
What would be the best datatype to represent product? A variable that stores information about the number of items currently in stock in a grocery store.
Float
Double
Int
String
Consider the expression: value >= 30 Which of the following is equivalent to this expression?
Value > 30 AND value == 30
NOT(value > 31)
Value > 30 OR value == 30
NOT(value < 29)
Nothing will be printed/displayed
Mr. Spock
Star Trek it is!
Captain Kirk
TRUE
Neither condition is satisfied
FALSE
Unable to determine
An if statement does not need to have an else clause.
True
False
If the variable isTested is a Boolean, then the statement below is a valid control expression: IF(isTested)
True
False
In programming && is considered an arithmetic operator.
True
False
If x = 3, y = 1, and z = 5 then the following Boolean expression evaluates to true: ( x > 0) && (y == 0) || (z < 5)
True
False
The Boolean expression ((A AND B) AND (NOT(A AND B)) evaluates to:
True whenever both A is true and B is true.
True whenever only A is true or only B is true.
True in all cases.
False in all cases.
X == 2
X == 98
X == 0
The loop won't terminate. It's an infinite loop.
0
1
2
Unknown
A relational operator used when comparing primitive data types is !=.
True
False
A switch statement is similar to an if statement in that both are used to alter the flow of a program.
True
False
Pseudocode form of writing should be used only when the logic of the program is complex.
True
False
True
False
Select the correct declaration for a 2D array of 5 rows and 10 columns:
CREATE myArray(5,10) OR CREATE myArray(5)(10)
CREATE myArray[10,5] OR CREATE myArray[10][5]
CREATE myArray[5,10] OR CREATE myArray[5][10]
An array index cannot be of the double, float or String data types.
True
False
It stores 6 elements with legal indices from 0 to 5.
It stores 4 elements with legal indices from 1 to 4.
It stores 5 elements with legal indices from 1 to 5.
It stores 5 elements with legal indices from 0 to 4.
2D Arrays are still homogeneous.
True
False
True
False
You can only nest FOR loops.
True
False
It would print nothing as there is no index 7.
It would print 7.
It would print -1.
2D arrays are declared in row, column order, meaning first value is number of rows, second value is number of columns.
True
False
Once an array is created, it cannot be resized during program execution.
True
False
Which of the following correctly refers to the last element in the array of integers called numbers?
Numbers[size]
Numbers[last numbers]
Numbers[length of numbers-1]
Numbers[length of numbers]
In general, the advantage of using a binary search over a linear search increases when searching larger sorted arrays.
True
False
Which of these sorts was not covered in the lecture slides?
Bubble
Insertion
Selection
Merge
An array must be sorted for a Binary search to work properly.
True
False
FOREACH loops cannot be used for which of the the following tasks?
Searching
Printing
Summing
Assignment
When a variable is declared within a method and its scope is within the method it is known as a(n)
Local variable.
Public instance data.
Global variable.
Actual parameter.
The parameters in the method call (actual parameters) and the method header (formal parameters) must be the same in
Sequence.
All of the other choices
Quantity.
Data type.
A distinguishing feature of methods that have the reserved word void in the method header is that they have
Multiple return statements.
None of the other answers
A single return statement.
No return statements.
Methods can return only primitive data types.
True
False
Formal parameters in method headers require including the data type for each parameter in source code.
True
False
All method (function) headers must include parameters.
True
False
The body of a method can be empty.
True
False
All methods must have a return statement.
True
False
Strings are immutable which means once a String object is created its contents cannot be changed.
True
False
Strings are a primitive data type which support the '+' operation.
True
False
New is the reserved word used to create an object.
True
False
An object is a primitive data type.
True
False
Object Oriented Programming is categorized by use of
Graphical User Interfaces.
Classes and objects.
Modules to combine program statements used for a common purpose.
The goto statement
Which of the following programming terms is enforced by declaring class attributes as private?
None of these answers
Escape Sequences
Encapsulation
Escalation
An object's method is called by
Using the object's name, followed by a period and the method name.
Using the object name only.
Using the method name only.
Using the class name, followed by a period and the method name.
{"name":"CSE Practice 1", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Software testing involves the execution of a software component or system component to evaluate one or more properties of interest., The MAIN method tells the program where to begin running code as it is the entry or starting point for the program., Output is process of reading information from user, usually via keyboard or mouse.","img":"https://www.quiz-maker.com/3012/CDN/89-4308910/quiz-2-question-1.png?sz=1200"}
Powered by: Quiz Maker