wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CC104- PRELIM LAB EXAM

Total questions: 100

Worksheet time: 3hrs 20mins

Name
Class
Date
1.

Local variables are typically declared and initialized within which specific programming constructs?

a)

Inside methods, constructors, or defined within specific blocks of code.

b)

Outside any methods, constructors, or blocks, at the class level.

c)

With a special 'static' keyword, existing as a single copy per class.

d)

As primitive data types that store the actual values directly in memory.

2.

When are instance variables initialized, holding values specific to an object's individual state?

a)

When the program begins execution, before any objects are ever created.

b)

Only once, when their containing class is first loaded into memory.

c)

Upon the creation of an object using the 'new' keyword.

d)

Immediately before any method within the class begins its execution.

3.

What keyword is required when declaring a variable within a class to make it a class variable?

a)

private

b)

public

c)

final

d)

static

4.

Which primitive data type in Java is specifically designed for tracking simple true or false conditions?

a)

char, capable of storing a single 16-bit Unicode character eRiciently.

b)

byte, used to save space in large arrays, four times smaller than int.

c)

boolean, representing a single bit of information for logical states.

d)

short, another memory-saving type, two times smaller than an integer.

5.

Which primitive data type consumes the smallest amount of memory, representing a single bit?

a)

byte, typically using 1 byte to store integral values in an array.

b)

boolean, which tracks true/false conditions and represents only one bit.

c)

short, utilized for memory savings, being two times smaller than an int.

d)

char, storing a single 16-bit Unicode character, taking 2 bytes.

6.

Which of the following options represents a reference type, storing memory addresses for data locations?

a)

A variable declared as 'int' holding an integer numerical value.

b)

A 'boolean' variable representing a simple true or false logical state.

c)

An 'array' of integers, pointing to a memory location containing elements.

d)

A 'char' variable containing a single 16-bit Unicode character value.

7.

Which control structure allows testing a new condition when the preceding 'if' condition evaluates as false?

a)

The 'switch' statement, which evaluates an expression against multiple cases.

b)

The 'else if' statement, providing an alternative conditional block to execute.

c)

A 'default' case, which executes if no other conditions are met previously.

d)

The 'ternary operator', oRering a concise way to evaluate true/false outcomes.

8.

What keyword within a Java 'switch' statement immediately terminates execution after a case match occurs?

a)

The 'continue' keyword, which skips the current iteration and proceeds.

b)

The 'return' keyword, which exits the method containing the switch block.

c)

The 'break' keyword, stopping further execution within the switch block.

d)

The 'default' keyword, specifying code to run if no case matches are found.

9.

What is a key characteristic that distinguishes a 'do-while' loop from a standard 'while' loop?

a)

The 'do-while' loop ensures its statements execute at least once before checking the condition.

b)

A 'while' loop always executes its body at least once, regardless of the condition.

c)

The 'do-while' loop checks its condition at the beginning, making it entry-controlled.

d)

A 'while' loop is primarily used for iterating through elements in an array collection.

10.

Which part of a Java 'for' loop is responsible for modifying the control variable's value each iteration?

a)

The initializing statement, setting up the loop's starting control variable value.

b)

The expression, which defines the condition for the loop's continued execution.

c)

The increment/decrement part, altering the control variable's value over iterations.

d)

The loop body, containing the statements that are repeatedly executed during the process.

11.

Which statement regarding local variables is NOT true?

a)

Declared within methods, constructors, or specific blocks of code.

b)

Created upon entering the method or block, destroyed upon exiting it.

c)

Access modifiers like public or private can be applied to them.

d)

They do not have a default value, requiring explicit initialization before use.

12.

Which statement about instance variables is INCORRECT?

a)

They are declared within a class, but outside any method or constructor.

b)

Space for them is allocated on the heap when an object is created.

c)

They never have default values, always requiring explicit developer assignment.

d)

Access modifiers can be applied to control their visibility within classes.

13.

Which characteristic is NOT associated with class (static) variables?

a)

They are declared using the 'static' keyword within the class scope.

b)

Only one single copy exists per class, independent of object count.

c)

Stored on the heap and destroyed when an object instance is removed.

d)

Default values like 0 for numbers or false for Booleans are provided.

14.

All of the following are primitive datatypes, EXCEPT?

a)

`boolean` stores simple true/false conditions, occupying one bit of information.

b)

`String` is considered a primitive datatype, storing actual character values.

c)

`char` is used to store any single 16-bit Unicode character eRiciently.

d)

`double` is the default datatype for decimal values, oRering higher precision.

15.

Which statement about reference types is NOT accurate?

a)

They store memory addresses pointing to where the actual data resides.

b)

Examples include `String`, `Scanner`, and various array declarations like `int[]`.

c)

They directly store the actual data values instead of memory locations.

d)

Non-primitive types like Classes, Interfaces, and Arrays fall under this category.

16.

Regarding `byte` and `short` data types, which statement is INCORRECT?

a)

Both `byte` and `short` are primarily used for saving memory in large arrays.

b)

A `byte` is four times smaller than an `int` in terms of memory usage.

c)

A `short` occupies twice the memory space of a standard `int`.

d)

They are useful when memory optimization for integral values is critical.

17.

What is NOT a correct use or characteristic of `float` or `double`?

a)

`float` is eRicient for large arrays of floating-point numbers to save space.

b)

`double` is typically the default choice for representing general decimal values.

c)

Both `float` and `double` are suitable for precise financial currency calculations.

d)

`float` occupies 4 bytes of memory, while `double` utilizes 8 bytes for storage.

18.

Which of the following is NOT a valid observation about the `if` statement?

a)

An `if` statement specifies a code block to execute when its condition is true.

b)

The keyword `if` must always be written in lowercase to avoid syntax errors.

c)

The enclosing curly braces `{}` are optional for a single statement.

d)

It allows programs to perform diRerent actions based on evaluated conditions.

19.

Regarding the `switch` statement, which assertion is INCORRECT?

a)

The expression within the switch statement is evaluated only a single time.

b)

The `break` keyword stops further execution and case testing inside the block.

c)

The `default` keyword is mandatory and must always be present.

d)

If a case match occurs, its corresponding block of code is then executed.

20.

Which characteristic does NOT apply to the `do-while` loop?

a)

It guarantees that its code block will execute at least one time.

b)

The loop condition is checked after the statements inside the loop body execute.

c)

It is an entry-controlled loop, checking its condition before execution.

d)

The loop's statements will execute even if the initial boolean condition is false.

21.

What is the primary purpose of using arrays in programming?

a)

To create distinct variables for every single data value that a program needs to process.

b)

To store multiple related values of the same data type within a single, organized variable name.

c)

To enable complex mathematical computations across various disparate data structures eRiciently.

d)

To facilitate dynamic memory allocation for objects with frequently changing and undefined sizes.

22.

Which term describes the process of assigning initial values to an array's declared elements?

a)

Declaration, which establishes the variable name and its fundamental data type for future use.

b)

Instantiation, involving the 'new' keyword to allocate specific memory space for the array.

c)

Initialization, where specific data values are intentionally provided for the array's elements.

d)

Accessing, which involves retrieving individual data elements by referencing their positional index.

23.

An array element's unique position is identified by a number that always starts from zero. What is this number called?

a)

The data type, which specifies the kind of values stored within each individual array cell.

b)

The size or length, representing the total capacity of elements that the array can hold at once.

c)

The index, providing a sequential reference for locating and accessing specific elements in memory.

d)

The variable name, serving as the common identifier for the array.

24.

In the context of array handling, what does 'Instantiation' primarily achieve?

a)

It creates the array variable with its data type but without defining its capacity.

b)

It assigns an initial set of values directly into the array elements during creation.

c)

It allocates a specific amount of memory for the array by defining its fixed length.

d)

It allows elements to be retrieved or modified based on their sequential position.

25.

A developer needs an array where each row can contain a different number of columns. Which type of array is best suited for this requirement?

a)

A one-dimensional array, as it simplifies data storage with a single sequence of elements.

b)

A two-dimensional array, providing a fixed grid structure for consistent row and column sizes.

c)

A ragged array, enabling flexible sizing for individual member arrays within its overall structure.

d)

A standard multidimensional array, designed for uniform dimensions across all its hierarchical levels.

26.

What is a fundamental characteristic of arrays regarding their memory storage location?

a)

Array elements are stored randomly across available memory spaces for optimized access.

b)

Elements of the same data type are stored in consecutive memory locations under a common name.

c)

Each element is allocated memory independently, allowing for varied data types within the same array.

d)

Memory for arrays is dynamically resized during runtime, based on fluctuating data storage needs.

27.

When attempting to remove an element directly from a Java array, what inherent limitation is encountered?

a)

Arrays require elements to be sorted first before any deletion operation can be successfully performed.

b)

Java arrays have a static size, meaning their capacity cannot be changed after initial instantiation.

c)

Direct removal methods are only available for primitive data type arrays, not for object arrays.

d)

Elements can only be removed from the array's beginning or end, not from arbitrary middle positions.

28.

What is NOT a direct function or typical characteristic associated with the 'length()' method when applied to an array?

a)

It provides the total count of elements presently stored or allocated within the specific array structure.

b)

It is frequently used to establish the upper limit for iteration loops traversing through array contents.

c)

It can be used to dynamically alter the total capacity or allocated size of an array.

d)

It helps programmers understand the instantiated size, which remains fixed for Java arrays.

29.

Which statement does NOT accurately distinguish a Multidimensional Array from a simple One-dimensional Array?

a)

Multidimensional arrays are exclusively characterized by having a single index for element referencing.

b)

One-dimensional arrays are explicitly defined by possessing only a solitary index or bracket set.

c)

Both array forms are capable of storing elements, but they must consistently be of the same data type.

d)

Multidimensional arrays utilize multiple indices to structure data in complex, grid-like arrangements.

30.

When describing the nature of a Ragged Array, which statement is NOT a defining attribute or property?

a)

Each constituent member array within a ragged array must always maintain a consistent, uniform size.

b)

It is conceptualized as an array where the internal arrays can possess varying and distinct lengths.

c)

This array type offers flexibility by allowing different rows to accommodate diverse numbers of columns.

d)

Ragged arrays are commonly known and sometimes referred to by the equivalent term 'jagged arrays.'

31.

Which specific action is NOT inherently part of the 'Instantiation' process when creating a new array object?

a)

Allocating a dedicated block of memory for the array to hold its future elements.

b)

Specifying the exact length or capacity the array will possess upon its creation.

c)

Utilizing the 'new' keyword, which signals the creation of a new object instance in memory.

d)

Assigning initial default or specific values to the array elements immediately after declaration.

32.

Which statement is NOT a correct fact regarding the direct removal of elements from a Java array?

a)

Java arrays do not intrinsically offer a straightforward, direct method for element deletion.

b)

The size of a Java array becomes unchangeable once it has been successfully instantiated.

c)

It is possible to directly delete an element, thereby automatically reducing the array's total size.

d)

Workarounds or alternative methods are often required to simulate the effect of removing an element.

33.

Given standard Java array syntax, which of the following code snippets is NOT a valid way to declare and instantiate an integer array named `numbers` with a size of 5?

a)

`int[] numbers = new int[5];`

b)

`int numbers[] = new int[5];`

c)

`int numbers; numbers = new int[5];`

d)

`int[] numbers; numbers = new int[5];`

34.

Which statement does NOT correctly differentiate arrays from simple normal variables regarding how they store data?

a)

Arrays are specifically designed to store collections of elements in a contiguous memory block.

b)

A normal variable can efficiently retain multiple distinct values simultaneously, unlike an array.

c)

Arrays enable the retrieval of any specific stored record because they maintain all entered elements.

d)

Normal variables primarily hold only the most recent or the very last assigned single value.

35.

A junior developer is designing a function to sort a list of numbers. Which characteristic is essential for their algorithm to be considered valid and effective?

a)

It must be written in a specific programming language like Java or Python for universal execution across platforms.

b)

It should always have a single input and produce exactly one distinct output to maintain simplicity.

c)

Every instruction within the sequence must be clear, well-defined, and complete in a finite number of steps.

d)

The logic must be complex enough to handle every possible edge case, even if it adds significant processing time.

36.

When evaluating the memory footprint of an algorithm during its execution, which component primarily accounts for the storage of constants and variables?

a)

Instruction space, which holds the compiled executable code of the program, is usually fixed in size.

b)

Data space, encompassing all static constants and dynamic variables utilized throughout the algorithm's lifecycle.

c)

Environment space, which temporarily saves information required for resuming suspended functions or processes.

d)

Auxiliary space, representing the additional temporary storage solely for intermediate calculations, not core data.

37.

What fundamental aspect does time complexity primarily measure to help in their decision?

a)

The total amount of physical memory an algorithm consumes throughout its complete execution lifecycle.

b)

The number of lines of code an algorithm contains, indicating its overall conciseness and readability.

c)

The amount of time an algorithm requires to run from its initiation to its successful completion.

d)

The average power consumption of the CPU while the algorithm is actively processing the given inputs.

38.

When analyzing algorithm performance, an engineer uses asymptotic notations. What is the primary reason for employing these notations instead of exact execution times?

a)

To provide an exact numerical measure of an algorithm's running time across various hardware configurations.

b)

To simplify the comparison of algorithm growth rates by ignoring constant factors and less significant terms.

c)

To predict the algorithm's performance solely on small input sizes, where constant factors are highly influential.

d)

To represent the precise memory footprint an algorithm occupies, including all temporary and permanent storage.

39.

During the analysis of a new search algorithm, a developer determines its time complexity to be O(n). What does this notation specifically convey about the algorithm's performance?

a)

The algorithm's execution time will precisely equal 'n' steps for any given input size.

b)

The algorithm will perform at its fastest when processing 'n' elements, achieving optimal eRiciency.

c)

The execution time of the algorithm will not exceed a rate proportional to 'n' for any input.

d)

The algorithm will always require a minimum of 'n' operations to complete its task, representing its best-case scenario.

40.

An algorithm is described with a time complexity of Ω(log n). What does this Big Omega notation imply regarding the algorithm's operational efficiency?

a)

The algorithm’s execution time will always be precisely logarithmic, never varying from this specific rate.

b)

It indicates the maximum possible time the algorithm might ever require to complete its processing task.

c)

The algorithm will take at least a logarithmic amount of time to execute, representing its best-case performance.

d)

The algorithm’s performance will consistently average out to a logarithmic growth rate across all inputs.

41.

If an algorithm's time complexity is represented as Θ(n²), what specific insight does this provide about its performance characteristics?

a)

The algorithm's execution time will only ever grow quadratically in the worst-case scenario.

b)

The algorithm's running time is tightly bound, meaning it grows proportionally to n² for both upper and lower limits.

c)

The algorithm will always execute faster than a quadratic function for all possible input sizes.

d)

This notation strictly defines the fastest possible execution time for the algorithm in ideal conditions.

42.

Consider a function `int sum(int a[], int n)` that calculates the sum of elements in an array. Given integer variables and array elements each take 4 bytes, what is its space complexity?

a)

The space complexity is constant, as the number of variables remains fixed regardless of array size 'n'.

b)

The space complexity is O(12) bytes because only a few fixed-size integer variables are declared and used.

c)

The space complexity is O(4n + 12) bytes, accounting for the array and other fixed integer variables.

d)

The space complexity is quadratic, growing significantly with increasing input 'n' due to nested loops within the function.

43.

A programmer writes a function with a nested loop structure: `for(i=0; i < N; i++) { for(j=0; j < N;j++) { statement; } }`. How would the time complexity of this code be characterized?

a)

Linear, because the inner loop's operations are completed before the outer loop iterates again.

b)

Constant, as the 'statement' itself takes a fixed amount of time to execute once.

c)

Quadratic, due to the total number of operations growing in proportion to N multiplied by N.

d)

Logarithmic, since the problem space is eRectively halved with each successive iteration.

44.

A software development team is tasked with creating a highly eRicient program. Which combination of factors indicates an algorithm is performing optimally?

a)

It achieves correctness by being robust and consistently producing the intended outputs, regardless of eRiciency.

b)

The algorithm takes minimal time to execute and simultaneously consumes the least amount of memory space.

c)

Its design is notably complex, utilizing advanced data structures and intricate logic for thoroughness.

d)

It is easily readable and maintainable by other developers, prioritizing clarity over raw performance metrics.

45.

An aspiring programmer learns about the fundamental characteristics that define a robust algorithm. Which of the following is NOT considered an essential property for every algorithm?

a)

It must always receive at least one external input to begin its operation eRectively.

b)

The algorithm should always produce at least one discernible output after its execution completes.

c)

Each individual step within the algorithm must be explicitly clear and unambiguously defined.

d)

The algorithm is required to terminate after a finite and predictable number of steps.

46.

When evaluating the space complexity of an algorithm, a developer analyzes various memory requirements. Which component is generally NOT a primary focus when calculating an algorithm's overall space complexity?

a)

The data space necessary for storing all constant and variable values during execution.

b)

The instruction space dedicated to holding the program's compiled executable version.

c)

The auxiliary space temporarily utilized by the algorithm during its operational execution.

d)

The input space consumed by the initial values provided to the algorithm for processing.

47.

Asymptotic notations are crucial tools for analyzing algorithm performance. Which statement INCORRECTLY describes a primary purpose or characteristic of using asymptotic notations for complexity analysis?

a)

They help in providing an exact numerical value for the time an algorithm takes to run.

b)

They are used to express the algorithm's complexity in terms of time and space requirements.

c)

They allow comparison of diRerent algorithms by focusing on their growth behavior.

d)

They simplify complexity expressions by ignoring constant factors and insignificant terms.

48.

A software engineer is analyzing a sorting algorithm that, in its worst case, takes O(n^2) time but typically operates around Θ(n log n) on average. Which statement about these notations is NOT accurate?

a)

O(n^2) indicates the upper bound, meaning the algorithm will never exceed quadratic time.

b)

Θ(n log n) provides a tight bound, representing the algorithm's average execution time.

c)

Big-O notation is typically preferred for defining the average time complexity of algorithms.

d)

Big-Theta implies the algorithm's performance is bounded both above and below by n log n.

49.

It is a way to represent the amount of time required by the program to run till its completion.

(a)  

50.

A junior developer is trying to grasp the core concept of an algorithm in programming. Which of the following descriptions INCORRECTLY defines what an algorithm truly represents?

a)

An algorithm is the complete, compiled executable program ready for direct deployment.

b)

It is a finite sequence of logical instructions designed to achieve a specific task.

c)

An algorithm serves as the underlying core logic or solution to a given problem.

d)

It can be expressed informally through pseudocode or visually using a flowchart.

51.

When evaluating the overall efficiency and practicality of an algorithm for a specific application, several factors are critically considered. Which aspect is generally LEAST significant when determining an algorithm's performance for large inputs?

a)

The dominant term in its time complexity expression (e.g., n^2 for a quadratic algorithm).

b)

The auxiliary memory space consumed during the algorithm's execution.

c)

The constant coeRicients attached to the highest order terms in its complexity.

d)

The increase in running time as the input size 'n' approaches infinity.

52.

A programmer is distinguishing between different aspects of memory usage in an algorithm. Which statement regarding auxiliary space and total space complexity is INCORRECT?

a)

Auxiliary Space refers to the additional or temporary memory an algorithm utilizes.

b)

Space Complexity precisely equals the sum of Auxiliary Space and Input Space.

c)

Input Space accounts for the memory taken by the variables directly passed into the algorithm.

d)

Space Complexity typically considers instruction space and environmental stack for its calculation.

53.

Asymptotic notations are crucial tools for analyzing algorithm performance. Which statement INCORRECTLY describes a primary purpose or characteristic of using asymptotic notations for complexity analysis?

a)

    A. They help in providing an exact numerical value for the time an algorithm takes to run.

b)

    B. They are used to express the algorithm's complexity in terms of time and space requirements.

c)

C. They allow comparison of different algorithms by focusing on their growth behavior.

d)

D. They simplify complexity expressions by ignoring constant factors and insignificant terms.

54.

A software engineer is analyzing a sorting algorithm that, in its worst case, takes O(n^2) time but typically operates around Θ(n log n) on average. Which statement about these notations is NOT accurate?

a)

    A. O(n^2) indicates the upper bound, meaning the algorithm will never exceed quadratic time.

b)

    B. Θ(n log n) provides a tight bound, representing the algorithm's average execution time.

c)

C. Big-O notation is typically preferred for defining the average time complexity of algorithms.

d)

    D. Big-Theta implies the algorithm's performance is bounded both above and below by n log n.

55.

It is a way to represent the amount of time required by the program to run till its completion.

(a)  

56.

A junior developer is trying to grasp the core concept of an algorithm in programming. Which of the following descriptions INCORRECTLY defines what an algorithm truly represents?

a)

A. An algorithm is the complete, compiled executable program ready for direct deployment.

b)

    B. It is a finite sequence of logical instructions designed to achieve a specific task.

c)

    C. An algorithm serves as the underlying core logic or solution to a given problem.

d)

D. It can be expressed informally through pseudocode or visually using a flowchart.

57.

When evaluating the overall efficiency and practicality of an algorithm for a specific application, several factors are critically considered. Which aspect is generally LEAST significant when determining an algorithm's performance for large inputs?

a)

A. The dominant term in its time complexity expression (e.g., n^2 for a quadratic algorithm).

b)

    B. The auxiliary memory space consumed during the algorithm's execution.

c)

    C. The constant coefficients attached to the highest order terms in its complexity.

d)

    D. The increase in running time as the input size 'n' approaches infinity.

58.

A programmer is distinguishing between different aspects of memory usage in an algorithm. Which statement regarding auxiliary space and total space complexity is INCORRECT?

a)

A. Auxiliary Space refers to the additional or temporary memory an algorithm utilizes.

b)

    B. Space Complexity precisely equals the sum of Auxiliary Space and Input Space

c)

    C. Input Space accounts for the memory taken by the variables directly passed into the algorithm.

d)

    D. Space Complexity typically considers instruction space and environmental stack for its calculation.

59.

Consider a linear search algorithm, where you iterate through an array to find an element. Which statement about its performance measured by asymptotic notations is INCORRECT?

a)

A. Its worst-case time complexity is O(n), occurring when the element is last or not present.

b)

B. Its best-case time complexity is Ω(1), happening when the element is found at the first position.

c)

    C. The average-case time complexity, represented by Big-Theta, is typically Θ(n).

d)

D. The Big-O notation for linear search always represents the absolute fastest possible execution time.

60.

An algorithm's time complexity is expressed as T(n) = 20n^2 + 3n - 4. When applying asymptotic analysis for la

a)

    A. The term 20n^2 will dominate the expression as 'n' grows very large.

b)

    B. The constant factor '20' associated with n^2 is ignored in asymptotic behavior.

c)

    C. The insignificant terms '3n - 4' are retained in the final Big-O notation.

d)

    D. The algorithm's growth rate is best represented by considering only the highest power of 'n'.

61.

What primarily defines an Abstract Data Type, separating its essence from implementation specifics?

a)

    A. The specific memory allocation strategy used for its elements.

b)

    B. A set of values and the defined operations that manipulate those values.

c)

    C. The programming language constructs utilized to create the data type.

d)

    D. Its efficiency in terms of execution time and required storage space.

62.

In programming, what constitutes a data type beyond just a set of values?

a)

    A. It includes the specific physical memory layout for storing information.

b)

    B. It encompasses a set of values along with operations that manipulate them.

c)

    C. It defines the object's lifetime and its scope within the program.

d)

    D. It represents an abstract concept without any concrete implementation details.

63.

What is the primary objective of encapsulation in object-oriented programming design principles?

a)

A. To allow unrestricted access to all internal data fields for flexibility.

b)

    B. To merge the interface and implementation details for simpler methods.

c)

C. To hide the internal implementation details from external components.

d)

    D. To ensure all class variables are accessible from any method within the program.

64.

A software architect wants to prevent any other classes from inheriting functionality. Which class modifier would achieve this?

a)

A. Utilizing the `public` keyword to make the class broadly available.

b)

    B. Declaring the class as `abstract` to prevent direct instantiation.

c)

    C. Applying the `final` keyword, disallowing the creation of subclasses.

d)

    D. Omitting any modifier, thereby restricting usage to the same package.

65.

What is the fundamental role of a constructor within a class definition in object-oriented programming?

a)

    A. To declare abstract methods that must be implemented by subclasses.

b)

    B. To initialize newly created objects of that class type with legal values.

c)

C. To define class-level variables accessible from any method in the application.

d)

D. To re-define superclass methods, exhibiting polymorphic behavior in instances.

66.

Which keyword designates a variable as being associated with the class itself, not individual object instances?

a)

    A. `public`, allowing broad access across the application's structure.

b)

B. `final`, preventing any changes to its initial assigned value.

c)

C. `static`, making it a shared class-level attribute for all instances.

d)

    D. `protected`, limiting its visibility to within the package or subclasses.

67.

What best describes the relationship between an Abstract Data Type (ADT) and a data structure?

a)

    A. A data structure defines the logical form, while ADT defines the physical implementation.

b)

B. ADT is the theoretical definition, and the data structure is its concrete implementation.

c)

    C. They are synonymous terms, often used interchangeably in programming contexts.

d)

D. ADT specifies memory allocation, whereas data structure determines operation efficiency.

68.

Which two specific kinds of polymorphism does Java provide to enhance programming flexibility?

a)

    A. Method hiding and attribute shadowing, ensuring data integrity.

b)

    B. Operator overloading and type casting, for flexible data manipulation.

c)

    C. Method overriding and method overloading, facilitating behavioral variations.

d)

    D. Interface implementation and abstract class extension, for structural design.

69.

When selecting the most suitable data structure for a given task, what is a crucial consideration for a developer?

a)

A. Always choosing the most complex structure to ensure maximum functionality

b)

    B. Ignoring memory constraints to prioritize the fastest possible execution time.

c)

C. Performing a careful analysis of the problem's characteristics and requirements.

d)

    D. Relying solely on the programming language's built-in default data types.

70.

What is the scope of a method declared with the `private` modifier in a Java class?

a)

A. It can be invoked by any method within the same software package

b)

    B. Only methods belonging to the same class can successfully call it.

c)

C. Subclasses within different packages have direct access to this method.

d)

    D. It is accessible globally, regardless of package or inheritance hierarchy.

71.

Which statement about class modifiers in Java is not accurate based on typical definitions?

a)

A. An 'abstract' class implies it contains methods without concrete implementations.

b)

B. A 'final' class permits extension by other classes through inheritance.

c)

C. A 'public' class can be instantiated or extended by any other class.

d)

D. Without 'public', a class is usable only by classes within the same package.

72.

Which of the following is not explicitly listed as one of the four operations of an Abstract Data Type (ADT)?

a)

    A. A Creator is used to initialize objects of a specific class.

b)

B. A Transformer is designed to modify the state of an object.

c)

    C. An Observer is employed to display the current state of an object.

d)

    D. A Destroyer is responsible for deallocating an object's memory.

73.

Which statement does not accurately reflect the philosophy concerning data structure selection?

a)

    A. One data structure is rarely universally superior to all others.

b)

    B. Data structures require both execution time and memory space resources.

c)

C. Programming effort is irrelevant when evaluating data structure efficiency.

d)

    D. Analyzing problem constraints guides the choice of the best data structure.

74.

Which statement does not accurately reflect the philosophy concerning data structure selection?

a)

    A. One data structure is rarely universally superior to all others.

b)

    B. Data structures require both execution time and memory space resources.

c)

C. Programming effort is irrelevant when evaluating data structure efficiency.

d)

    D. Analyzing problem constraints guides the choice of the best data structure.

75.

Which statement about the general characteristics of a constructor is not correct?

a)

    A. A constructor is a member function sharing the class's exact name.

b)

B. Its primary role is to initialize new objects with valid initial values.

c)

C. Constructors must be explicitly called by the programmer to execute.

d)

    D. Object creation automatically triggers the invocation of its constructor.

76.

Which description of method access modifiers is not correctly defined?

a)

    A. A 'public' method can be invoked by any class without restriction.

b)

    B. A 'protected' method is accessible only within the same package or subclasses.

c)

    C. A 'private' method allows calls exclusively from methods within its own class

d)

    D. A 'default' method is accessible to any class outside its package.

77.

Which statement incorrectly differentiates between a 'type' and a 'data type'?

a)

    A. A 'type' fundamentally represents a collection of distinct values.

b)

    B. A 'data type' encompasses a 'type' along with specific operations.

c)

    C. Integer and Boolean are examples illustrating the concept of a 'type'.

d)

    D. Addition exemplifies a 'type' without necessarily including operations.

78.

Which aspect is not a primary design goal or benefit of object encapsulation?

a)

    A. Keeping the internal implementation details of two objects separate.

b)

B. Reducing the need for one class to know another's implementation specifics.

c)

    C. Promoting tight coupling between different classes for easier interaction.

d)

    D. Enhancing modularity by hiding how objects achieve their functionality.

79.

Which statement regarding the concept of inheritance in Java is not accurate?

a)

A. Inheritance allows subclasses to utilize members from a superclass.

b)

    B. The 'extends' keyword explicitly establishes a subclass-superclass relationship.

c)

    C. Subclasses cannot redefine methods inherited from their superclass.

d)

D. It is a mechanism for code reuse and establishing 'is-a' relationships.

80.

Which of the following is not typically considered a primary classification of data structures?

a)

    A. Linear structures, organizing data in a sequential manner.

b)

B. Hierarchical structures, arranging data in a tree-like fashion.

c)

C. Relational structures, focusing on tabular data organization.

d)

    D. Graph structures, representing data with nodes and edges.

81.

Which statement inaccurately describes the concept of abstraction in computer science?

a)

    A. Abstraction allows viewing high-level objects while ignoring underlying details.

b)

    B. It simplifies complex systems by presenting essential features only.

c)

    C. Abstraction mandates focusing on every minute implementation detail.

d)

D. A program or body organ can serve as an illustrative example of abstraction.

82.

A cybersecurity firm develops methods to safeguard private information and communications using codes. Which fundamental concept describes this practice?

a)

A. Cryptography, the science of securing communications so only intended recipients understand them.

b)

    B. Cryptanalysis, the art of discovering vulnerabilities and breaking codes and ciphers.

c)

C. Decryption, the process of converting coded data back into its original, understandable form.

d)

    D. Encryption, the activity of transforming plain text into an unreadable code.

83.

.A user wants to protect their online banking details from prying eyes during transmission. What process makes the data unreadable?

a)

A. Converting original readable text into unreadable, coded ciphertext.

b)

    B. Restoring coded information to its initial comprehensible state for authorized viewing.

c)

C. Developing sophisticated algorithms to safeguard data from malicious interception attempts.

d)

D. Confirming identities of sender and receiver for secure digital message exchange.

84.

An encrypted messaging application ensures that only the sender and intended receiver can read messages. Which security feature does this demonstrate?

a)

A. Guaranteeing the received message is identical to what was originally sent.

b)

    B. Preventing the sender from denying they sent a specific message later.

c)

    C. Ensuring unauthorized individuals cannot access or understand private information.

d)

    D. Verifying the true identity of the person who sent electronic communication.

85.

A digital document system incorporates checks to detect any unauthorized changes to stored files. What cryptography feature is being upheld?

a)

    A. Confirming user identity and the information's authentic origin.

b)

    B. Preventing senders from disclaiming their actions of sending specific data.

c)

    C. Restricting sensitive data access only to those explicitly authorized to view.

d)

    D. Ensuring information remains unaltered from creation to intended reception.

86.

Two secure servers need to establish a fast, efficient connection using a single, secret key for encryption and decryption. What type of cryptography is suitable?

a)

    A. Uses two different keys: one public for encrypting, one private for decrypting.

b)

    B. Employs a single, shared secret key for both encrypting and decrypting messages.

c)

C. Calculates a fixed-length output, making original text recovery impossible.

d)

    D. Generates unique keys using advanced mathematical concepts for secure communication.

87.

An e-commerce website encrypts customer credit card details using a public key, ensuring only they can decrypt it with their private key. What cryptographic system is employed?

a)

    A. Both parties use an identical, shared secret key for all communications.

b)

B. Generates a fixed-size output without needing any specific key for the process.

c)

    C. A unique pair of distinct keys, public and private, secures data transmission.

d)

D. Prevents repudiation by digitally signing all outgoing messages for verification.

88.

A message 'HELLO' is encrypted using a Caesar cipher with a shift of 3. What is the resulting ciphertext?

a)

A. KHLLO, due to an incorrect application of the shift value.

b)

    B. KHOOR, resulting from correctly shifting each letter by three positions.

c)

    C. JGLMN, indicating a different shift or an error in calculation.

d)

    D. EBIIL, showing a reverse shift, typical for decryption, not encryption.

89.

A Caesar cipher ciphertext letter 'C' was received, and the known shift key is 5. What was the original plaintext letter, considering cyclic property?

a)

    A. F, which incorrectly applies the shift in the forward direction.

b)

B. A, demonstrating a miscalculation of the letter's position.

c)

    C. X, correctly utilizing the cyclic property for backward shifting.

d)

    D. H, suggesting a fundamental misunderstanding of cipher decryption rules.

90.

An ancient document uses an encryption method where each letter is substituted based on a Vigenère square and a repeating keyword. What type of cipher is this?

a)

A. A simple shift cipher, moving each letter a fixed number of positions.

b)

    B. Generates a fixed-length hash value without requiring any specific key.

c)

    C. A polyalphabetic substitution cipher, using a Vigenère square and keyword.

d)

D. Sender and receiver share one common secret key for all communication.

91.

A government agency's intelligence unit is dedicated to analyzing enemy communications to find weaknesses and decipher their coded messages. What specialized field do they operate in?

a)

A. The science of securing information using complex mathematical algorithms.

b)

    B. The process of converting plain text into coded, unreadable ciphertext.

c)

C. The art and science dedicated to breaking codes and ciphers effectively.

d)

    D. The method of restoring encrypted data back to its original, understandable form.

92.

Which of the following is NOT considered a primary purpose of cryptography?

a)

A. Securing information and communications, ensuring only intended recipients understand messages.

b)

    B. Preventing unauthorized access to information and confidential transactions effectively.

c)

    C. Employing mathematical concepts and algorithms to convert messages securely.

d)

D. Primarily breaking existing codes and ciphers to reveal their hidden secrets.

93.

Which feature is NOT accurately described as a key aspect of cryptography?

a)

    A. Confidentiality ensures only authorized individuals can access the intended information.

b)

    B. Integrity guarantees data cannot be modified in storage or during transmission.

c)

    C. Non-repudiation confirms the sender cannot later deny sending information's intent.

d)

    D. Authentication verifies only the origin of information, not sender or receiver identities.

94.

Which statement regarding the processes of encryption and decryption is INCORRECT?

a)

A. Encryption transforms plain text into an unreadable, coded form called cipher text

b)

    B. Decryption converts encrypted data back into its original, understandable plain text.

c)

C. Plain text is the original form of a message before any coding is applied.

d)

    D. Cipher text is the final decoded message, identical to the initial plain text.

95.

Which activity is NOT typically associated with the field of cryptanalysis?

a)

A. Studying various methods to break codes and decipher hidden messages.

b)

B. Analyzing ciphers to discover their inherent weaknesses and vulnerabilities.

c)

    C. Converting readable plain text into an unreadable, coded cipher text message.

d)

    D. Discovering the original form of encrypted data without possessing the key.

96.

Which statement is NOT a characteristic of Symmetric Key Cryptography?

a)

A. Sender and receiver utilize a single common key for all encryption and decryption.

b)

    B. It is generally known for being faster and simpler to implement encryption systems.

c)

C. The shared key exchange between parties must occur through a secure channel.

d)

    D. A distinct public and private key pair is always employed for data security.

97.

Which of the following is NOT a defining characteristic of Asymmetric Key Cryptography?

a)

    A. It employs a pair of distinct keys, one for encryption and another for decryption.

b)

    B. A public key, known by many, is typically used for encrypting information.

c)

C. A private key is used for decryption, kept secret by the intended receiver.

d)

    D. Both sender and receiver must possess the exact same secret key for communication.

98.

Which statement INCORRECTLY describes the nature or function of Hash Functions?

a)

A. They do not utilize any cryptographic key in their primary algorithmic computation.

b)

B. A fixed-length hash value is meticulously calculated based on the original plain text.

c)

    C. It is generally impossible to recover the original plain text from its computed hash.

d)

D. Hash functions are designed for both encryption and subsequent reversal via decryption.

99.

When applying the Caesar ciphertext, what is NOT true about its cyclic property?

a)

A. It ensures that letter shifts beyond 'Z' wrap around to the beginning of the alphabet.

b)

    B. The modulus operator is utilized to handle shifts exceeding standard alphabet boundaries.

c)

    C. It prevents encrypted characters from unexpectedly becoming random special symbols.

d)

    D. The cyclic property applies only to encryption, not to the decryption process's shifts.

100.

Which statement INCORRECTLY describes a step in the Vigenère ciphertext encryption process using the tableau?

a)

    A. The first letter of the plaintext is paired with the first letter of the key.

b)

    B. The column of the plaintext letter and row of the key letter are used.

c)

C. The letter at their intersection in the Vigenère tableau becomes the ciphertext.

d)

    D. The key letter determines a fixed shift value for every single plaintext letter.