solution - STET Computer Science : Test 1

Question : The process of mapping of logical addresses to real physical addresses is known as:

Solution : address binding

Description - When a program runs, it uses logical addresses (also called virtual addresses) to reference memory. But the actual memory location (called the physical address) where data resides in RAM may be different. Address binding is what connects these two.

STET Computer Science : Test 1

Question : Which of the following CANNOT be called a software life cycle model?

Solution : Capability Maturity Model

Description -

Major Software Life Cycle Models:

Model Description Best Use Case
Waterfall Model Sequential; each phase must be completed before the next begins. Small projects with clear, unchanging requirements.
V-Model (Validation & Verification) Extension of Waterfall with test planning in parallel. Projects where high reliability is needed (e.g., medical).
Incremental Model Software is built in increments with each release adding functionality. Projects that require quick delivery of partial systems.
Iterative Model Cycles through development repeatedly, refining each time. Large systems with evolving requirements.
Spiral Model Combines iterative development with risk analysis. Complex and high-risk projects.
Agile Model Iterative and incremental; emphasizes flexibility and customer feedback. Projects needing rapid delivery and frequent changes.
DevOps Model Integrates development and operations for continuous delivery. Projects requiring frequent releases and automation.

STET Computer Science : Test 1

Question : Which command out of the following is NOT a part of a data manipulation language?

Solution : Create

Description -

Main DML Commands:

Command Description
SELECT Retrieves data from a table
INSERT Adds new rows to a table
UPDATE Modifies existing rows in a table
DELETE Removes rows from a table

STET Computer Science : Test 1

Question : Which system call is used by the operating system to create a new process?

Solution : Fork()

Description -

The system call used by the operating system to create a new process is typically:

fork() (in Unix/Linux systems)

Explanation:

  • The fork() system call is used to create a new process by duplicating the calling (parent) process.

  • After a successful fork(), two processes exist: the parent and the child.

  • The child process gets a unique process ID and has a copy of the parent’s memory space.

In Windows:

  • Windows uses a different system call: CreateProcess().

  • It is more complex than fork() and requires specifying the executable file and process attributes.

STET Computer Science : Test 1

Question : Which bus is used to specify memory locations for the data being transferred?

Solution : Address bus

Description -

Control Bus

  • Purpose: Sends control signals.

  • Explanation: The control bus carries signals such as read/write, interrupt, and clock signals, helping coordinate activities.

Data Bus

  • Purpose: Transfers actual data.

  • Explanation: After the address bus specifies the location, the data bus is used to transfer data to/from that location.

  • Bidirectional: Data can flow both to and from the CPU.

Address Bus

  • Purpose: Specifies memory locations.

  • Explanation: The address bus carries the address from the CPU to memory or other devices, telling the system where data should be read from or written to.

  • Unidirectional: It only goes from the CPU to memory or devices.

I/O Bus :

  • Transfers data, addresses, and control signals between:

    • I/O devices and

    • The CPU/memory system.

  • Helps the system communicate with external peripherals.

  • Enables expansion by allowing devices to be plugged into the system (e.g., via USB, PCI, or older standards like ISA).

STET Computer Science : Test 1

Question : Which of the following is NOT a valid protocol in a URL?

Solution : HTLS

Description - HTTPS - HyperText Transfer Protocol Secure HTTP - HyperText Transfer Protocol FTP - File Transfer Protocol

STET Computer Science : Test 1

Question : What is the full form of DDL?

Solution : Data Definition Language

Description - "DDL" stands for Data Definition Language in the context of databases. It refers to the SQL commands used to define and manage database structures, such as schemas, tables, indexes, and constraints.

STET Computer Science : Test 1

Question : A measure of the amount of memory needed for an algorithm to execute is called:

Solution : space efficiency

Description - Space efficiency refers to how effectively a system, algorithm, or process uses memory or physical space to achieve its goal. The term is common in computer science, engineering, architecture, and logistics.

STET Computer Science : Test 1

Question : What does CMOS stand for?

Solution : Complementary Metal Oxide Semiconductor

Description - CMOS stands for Complementary Metal-Oxide-Semiconductor. It is a technology used for constructing integrated circuits (ICs), including microprocessors, microcontrollers, memory chips, and other digital logic circuits.

STET Computer Science : Test 1

Question : All Oracle transactions obey the basic properties of a database transaction. What is the name of the following property? ‘All tasks of a transaction are performed or none of them are. There are no partial transactions.’

Solution : Atomicity

Description -

In DBMS (Database Management Systems), ACID stands for Atomicity, Consistency, Isolation, and Durability. These are the key properties that guarantee that database transactions are processed reliably.

Here's what each property means:


1. Atomicity

  • Definition: A transaction must be all or nothing. Either all the operations within the transaction are completed, or none are.

  • Example: In a money transfer between two accounts, both the debit from one account and the credit to another must occur. If one fails, neither should happen.


2. Consistency

  • Definition: A transaction must take the database from one valid state to another valid state, maintaining all predefined rules like constraints, cascades, and triggers.

  • Example: If a database has a constraint that account balances cannot go negative, a transaction that violates this should not be allowed.


3. Isolation

  • Definition: Transactions should be independent. One transaction's intermediate state should not be visible to others.

  • Example: If two people are booking the last seat on a flight simultaneously, isolation ensures only one booking is confirmed and the other is rejected.


4. Durability

  • Definition: Once a transaction is committed, its changes are permanent, even in the case of a system failure (e.g., power loss).

  • Example: After transferring money between accounts, even if the system crashes, the transfer should remain valid when it restarts.

STET Computer Science : Test 1

Question : What type of error is ‘use of undeclared variables’?

Solution : Compile-time

Description -

Run-time :-

Run-time (or runtime) refers to the period when a program is executing — that is, when the code is running on a computer or device. It starts when you launch the program and ends when the program finishes or is closed.

exception :-

An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions. It’s usually an error or an unexpected condition that the program doesn’t know how to handle immediately.

Logical :-

A logical error happens when your program runs without crashing, but it doesn't do what you intended. The code is syntactically correct (no syntax errors), but the logic—the sequence of instructions or conditions—is flawed, so the output or behavior is wrong.

Compile-time :-

Compile time is the phase in programming when your source code (the code you write) is translated by a compiler into machine code or an intermediate form before the program is run. At compile time compiler  

 

  • Syntax checking: The compiler checks your code for syntax errors (like missing semicolons, wrong keywords).

  • Type checking: It checks if data types are used correctly (like not assigning a string to an integer variable).

  • Code optimization: The compiler may optimize the code for better performance.

  • Code generation: It converts the source code into executable code or bytecode.

 

STET Computer Science : Test 1

Question : When a process is moved from main memory to the secondary storage, it is called:

Solution : swapping

Description -

Spooling :-

Spooling temporarily stores data in a buffer (usually on disk) so that it can be accessed and processed by slower peripheral devices at their own pace. It's like a queue system.

swapping :-

swapping is a memory management technique used to move processes between main memory (RAM) and secondary storage (usually a hard drive or SSD).

Scheduling :-

Scheduling in an Operating System (OS) is the method by which processes are selected to run on the CPU. It’s a key part of process management, aiming to maximize CPU usage, responsiveness, and system efficiency.

Caching :-

Caching is a technique used by operating systems to store frequently accessed data or instructions in a faster storage area (called a cache) so that future requests for that data can be served more quickly.

STET Computer Science : Test 1

Question : Which of the following semiconductor devices can act as a simple switch?

Solution : Transistor

Description -

Bipolar Junction Transistor (BJT)

  • ON state: Base-emitter junction is forward-biased → Current flows from collector to emitter (like closed switch).

  • OFF state: No base current → No collector-emitter current (like open switch).

Field Effect Transistor (FET or MOSFET)

  • ON state: Gate voltage controls a conducting channel → Current flows between drain and source.

  • OFF state: Gate voltage turns the channel off → No current flows.

Fast, efficient electronic switching used in computers, power supplies, and more.

STET Computer Science : Test 1

Question : The name given to variables, classes, methods, etc. is called:

Solution : identifier

Description - an identifier is the name used to identify a variable, function, class, array, object, or any user-defined element. It's the programmer-defined name for an entity in your code.

STET Computer Science : Test 1

Question : While scheduling processes, which of the following controls the degree of multiprogramming (the number of processes in memory)?

Solution : Long-term scheduler

Description -

The long-term scheduler is a component of the operating system responsible for controlling which jobs or processes are admitted into the system for execution. It plays a key role in managing system load and multiprogramming levels.

The long-term scheduler, also known as the job scheduler, decides which jobs are to be admitted into the system for processing. These jobs are moved from the job pool (on disk) to the ready queue (in main memory).

 

 

STET Computer Science : Test 1

Question : Optical fibre works on the principle of:

Solution : total internal reflection

Description - Optical fibre works on the principle of total internal reflection.

STET Computer Science : Test 1

Question : The layers of the TCP/IP protocol are:

Solution : Application Layer - Transport Layer(TCP/UDP) - Network/Internet Layer(IP) - Network Access Layer

Description -

Layer Key Protocols Role
Application HTTP, FTP, DNS, SMTP, etc. Interface for applications
Transport TCP, UDP Reliable/unreliable data delivery
Internet IP, ICMP, ARP Routing, addressing
Network Access Ethernet, Wi-Fi, etc. Hardware and physical transmission

STET Computer Science : Test 1

Question : Switching the CPU to another process requires performing a state save of the current process and a state restore of a different process. This task is known as:

Solution : context switch

Description -

A context switch in an operating system (OS) is the process of storing the state of a running process or thread so that it can be resumed later, and loading the state of another process or thread to run instead.

When a context switch occurs, the OS performs the following tasks:

  1. Saves the state of the currently running process (registers, program counter, stack pointer, etc.) into its process control block (PCB).

  2. Loads the state of the next process to run from its PCB.

  3. Updates memory management structures, if needed.

  4. Transfers control to the next process.

 

STET Computer Science : Test 1

Question : How can you write into HTML output using JavaScript?

Solution : document.write()

Description -

<!DOCTYPE html>
<html>
<head>
<title>Document Write Example</title>
</head>
<body>

<script>
document.write("<h1>Hello from JavaScript!</h1>");
</script>

</body>
</html>

STET Computer Science : Test 1

Question : Which of the following statements is true about "Race Condition"?

Solution : When multiple processes are accessing shared data without access control and the final result depends on the execution order

Description -

  • A race condition in an operating system (OS) is a situation where the output or behavior of a program depends on the sequence or timing of uncontrollable events, such as the execution order of threads or processes.
  • When two or more threads/processes access shared resources (like memory or files) at the same time without proper synchronization, the result can be unpredictable or incorrect — this is called a race condition.

STET Computer Science : Test 1