10 Questions
The algorithm is constructed to reverse the contents of the array ______.
NAMES
The variable K is initialized to ______ as the first index in the array.
0
The loop continues to execute while K is less than ______ – 1.
N
The algorithm uses a temporary variable ______ to swap the elements of the array.
TEMP
The geography teacher wants to print out the names of the cities beginning with ______.
D
The function ______ returns the first letter of the word 'CITY'.
FirstLetter
The array CITYNAMES contains ______ names of cities.
100
The loop iterates from ______ to 99 to search the entire array.
0
The geography teacher is searching the collection of city names called ______.
CITIES
The output statement prints the city names stored in the array ______.
CITYNAMES
Study Notes
Databases and Modelling
- Databases involve tables and queries
- Modelling and simulation involve abstraction of reality
- OOP involves classes and sub-classes
- Web science involves distributed applications
Computational Thinking and Program Design
- Abstraction involves successive decomposition (e.g., school -> faculties -> departments)
- Real-world entities can be distinguished from their abstractions (e.g., map vs. territory)
Standard Algorithms
- Characteristics of standard algorithms on linear arrays include:
- Sequential search
- Binary search
- Bubble sort
- Selection sort
- Standard operations of collections include:
- Addition
- Retrieval of data
Algorithms and Problem-Solving
- Algorithms can be used to solve specific problems
- Differences between algorithms include:
- Advantages and disadvantages of using binary search vs. sequential search
- Examples of algorithms include:
- Reversing the contents of an array (e.g., NAMES)
- Searching an array (e.g., CITYNAMES) for specific elements (e.g., cities starting with "D")
This quiz covers the basics of computer science, including databases, object-oriented programming, and web science. Test your understanding of tables, queries, classes, and more!
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free