Lecturer in Computer Science (B-17) — 2023 · Solved Past Paper
Question 1 Computer Science
Informal language description of steps in an algorithm called?
- A. Algorithm
- B. Pseudocode ✓ Correct answer
- C. Flow Chart
- D. Program
Why each option?
A. Wrong: an algorithm is the sequence of steps itself, not its informal-language description.
B. Correct: pseudocode is an informal, plain-language description of the steps in an algorithm.
C. Wrong: a flowchart is a diagram of the steps, not an informal language description.
D. Wrong: a program is the algorithm written in a programming language, not its informal description.
Question 2 Computer Science
The protocol used for transmission of data / information across the internet?
- A. ICMP
- B. SNMMP
- C. HTTP ✓ Correct answer
- D. SFTP
Why each option?
A. Wrong: ICMP is a control-message protocol (error reporting), not the data-transmission protocol of the internet.
B. Wrong: SNMP is a network-management protocol (the option prints "SNMMP").
C. Correct: HTTP is the protocol used for transmitting data/information across the internet between web servers and browsers.
D. Wrong: SFTP is a file-transfer protocol, not the general data-transmission protocol.
Question 3 Computer Science
The implication p → q is equivalent to its
- A. q → p
- B. ~q → ~p ✓ Correct answer
- C. p=q
- D. ~p → ~q
Why each option?
A. Wrong: q → p is the converse of p → q, not equivalent to it.
B. Correct: the contrapositive of p → q is ~q → ~p, and the two are logically equivalent.
C. Wrong: p = q is not a logical equivalence of the implication.
D. Wrong: ~p → ~q is the inverse of p → q, not equivalent to it.
Question 4 Computer Science
The pointer points to a variable goes out of scope
- A. Empty Pointer
- B. Null Pointer
- C. Wild Pointer
- D. Dangling Pointer ✓ Correct answer
Why each option?
A. Wrong: there is no standard "empty pointer" concept for this situation.
B. Wrong: a null pointer points to nothing (value NULL), not to freed memory.
C. Wrong: a wild pointer is an uninitialised pointer pointing to an unknown location.
D. Correct: a dangling pointer points to a variable that has gone out of scope or whose memory has been deallocated.
Question 5 Computer Science
Which of the following is used as a database management system?
- A. MySQL ✓ Correct answer
- B. Java
- C. Perl
- D. Visual Basic
Why each option?
A. Correct: MySQL is a database management system.
B. Wrong: Java is a programming language, not a DBMS.
C. Wrong: Perl is a programming language, not a DBMS.
D. Wrong: Visual Basic is a programming language, not a DBMS.
Question 6 Computer Science
Which of the following is the technique used in the cryptography to convert plain text into coded message?
- A. Algorithem
- B. Encryption ✓ Correct answer
- C. Decryption
- D. Authorization
Why each option?
A. Wrong: "algorithm" is a step-by-step procedure, not the conversion of plain text to code (the option prints "Algorithem").
B. Correct: encryption converts plain text into a coded (cipher) message.
C. Wrong: decryption converts a coded message back to plain text — the reverse process.
D. Wrong: authorisation grants access rights; it does not convert plain text to code.
Question 7 Computer Science
Function in programming
- A. Set of instructions that can call repeatedly ✓ Correct answer
- B. Variable that can store multiple values
- C. Command that prints output
- D. Loop that executes a set of number of items
Why each option?
A. Correct: a function is a chunk of code that can be called over and over again.
B. Wrong: that describes an array, not a function.
C. Wrong: printing is one thing a function may do, not what a function is.
D. Wrong: that describes a loop, not a function.
Question 8 Computer Science
Type of variable that can be used where the scope and extent of the variable is within the method or statement block in which it is declared
- A. Constant
- B. Local Variable ✓ Correct answer
- C. Global Variable
- D. Static Variable
Why each option?
A. Wrong: a constant is a value that cannot change; scope is not its defining feature.
B. Correct: a local variable is declared within a method or statement block, and its scope and extent are within that block.
C. Wrong: a global variable is accessible throughout the program, not only within one block.
D. Wrong: a static variable keeps its value between calls; it is not defined by block scope.
Question 9 Computer Science
The smallest unit of storing data is?
- A. Byte
- B. Bit ✓ Correct answer
- C. Word
- D. KB
Why each option?
A. Wrong: a byte (8 bits) is not the smallest unit of data — a bit is smaller. The source site keys A, which is a common textbook error.
B. Correct: a bit (0 or 1) is the smallest unit of storing data.
C. Wrong: a word is a group of bytes (typically 2, 4 or 8), larger than a byte.
D. Wrong: a kilobyte is 1024 bytes, far larger than a bit.
Question 10 Computer Science
The design approach that focuses on the needs and preference of the end-user?
- A. Information Architecture
- B. Information Design
- C. User Centered Design ✓ Correct answer
- D. User Research
Why each option?
A. Wrong: information architecture organises the structure of information, not the end-user's needs and preferences.
B. Wrong: information design presents information clearly; it is not the user-focused design approach.
C. Correct: user-centred design is the approach that focuses on the needs and preferences of the end-user in each phase of design.
D. Wrong: user research is a method for learning about users, not the design approach itself.
Question 11 Computer Science
The component of the computer that holds data, programs and instruction that are currently in use is?
- A. Random Access Memory (RAM) ✓ Correct answer
- B. Read on Memory (ROM)
- C. Hard Disk
- D. Extended Memory
Why each option?
A. Correct: RAM holds the data, programs and instructions currently in use.
B. Wrong: ROM holds firmware that is read, not the programs and data currently in use (the option prints "Read on Memory" for Read Only Memory).
C. Wrong: the hard disk stores data permanently, not the data currently in use.
D. Wrong: extended memory is memory above the 1 MB limit in old DOS systems, not the component holding current data.
Question 12 Computer Science
How long is an IPV6 address?
- A. 16 bits
- B. 32 bits
- C. 64 bits
- D. 128 bits ✓ Correct answer
Why each option?
A. Wrong: 16 bits is the length of one IPv6 field, not the whole address.
B. Wrong: 32 bits is the length of an IPv4 address.
C. Wrong: 64 bits is half an IPv6 address.
D. Correct: an IPv6 address is 128 bits long (eight 16-bit fields separated by colons).
Question 13 Computer Science
Which of them is not suitable as a Cache Replacement Algorithm?
- A. Most Frequently Used ✓ Correct answer
- B. First In First Out
- C. Least Frequently Used
- D. Last In First Out
Why each option?
A. Correct: evicting the most frequently used entry defeats the purpose of a cache, so "most frequently used" is not a suitable cache replacement policy. The source site keys C, which is wrong — LFU is a standard, widely used cache replacement policy (for example Redis allkeys-lfu, and standard textbooks list LFU alongside LRU and FIFO).
B. Wrong: FIFO is a standard cache replacement algorithm.
C. Wrong: LFU is a standard cache replacement algorithm (evict the least frequently accessed entry).
D. Wrong: LIFO is a standard cache replacement algorithm.
Question 14 Computer Science
Computer Memory addresses are represented using?
- A. Hexadecimal Numbers
- B. Decimal Numbers
- C. Binary Numbers ✓ Correct answer
- D. Octal Numbers
Why each option?
A. Wrong: hexadecimal is the human-readable notation for addresses, not the machine representation.
B. Wrong: decimal is not how memory addresses are represented at machine level.
C. Correct: instructions and memory addresses are represented by binary codes at machine level.
D. Wrong: octal is not how memory addresses are represented.
Question 15 Computer Science
UNICODE is an example of?
- A. Character encoding set ✓ Correct answer
- B. Driver
- C. Software
- D. Database
Why each option?
A. Correct: Unicode is a universal character encoding standard.
B. Wrong: a driver is software that controls hardware, not a character encoding.
C. Wrong: Unicode is a standard, not a piece of software.
D. Wrong: Unicode is not a database.
Question 16 Computer Science
Default IP address of a Computer is?
- A. 1.1.1.1
- B. 127.0.0.1 ✓ Correct answer
- C. 192.168.0.1
- D. 0.0.0.0
Why each option?
A. Wrong: 1.1.1.1 is a public DNS resolver address, not a computer's default IP.
B. Correct: 127.0.0.1 (localhost, the loopback address) is the default IP address of a computer itself. The source site keys C, which is the default gateway address of most home routers, not the computer's own default IP.
C. Wrong: 192.168.0.1 is the default address of the router/gateway, not of the computer.
D. Wrong: 0.0.0.0 means "no specific address" / all interfaces, not the computer's default IP.
Question 17 Computer Science
Which of the following is a type of software that is designed to prevent un-authorized access to the computer or network?
- A. Backup Software
- B. Firewall ✓ Correct answer
- C. Anti Virus
- D. Phishing Software
Why each option?
A. Wrong: backup software copies data for recovery; it does not block unauthorised access.
B. Correct: a firewall is designed to prevent unauthorised access to a computer or network by inspecting incoming and outgoing traffic.
C. Wrong: antivirus detects and removes malware; preventing unauthorised network access is the firewall's job.
D. Wrong: phishing is an attack technique, not a protective software type.
Question 18 Computer Science
A _____ present a choice of operations or services that can be performed by a system at a given time.
- A. Icons
- B. Menus ✓ Correct answer
- C. Pointers
- D. Windows
Why each option?
A. Wrong: icons are small pictures representing objects, not a choice of operations.
B. Correct: a menu presents a choice of operations or services that a system can perform at a given time.
C. Wrong: a pointer indicates a position on screen, it does not present choices.
D. Wrong: a window is a display area, not a choice of operations.
Question 19 Computer Science
Which of the following is a type of software that is used to create and edit spreadsheets?
- A. Google Docs
- B. Google Sheets ✓ Correct answer
- C. Google Colab
- D. Adobe Photoshop
Why each option?
A. Wrong: Google Docs is a word processor, not a spreadsheet application.
B. Correct: Google Sheets is the spreadsheet application in the Google Docs Editors suite.
C. Wrong: Google Colab is a notebook environment for Python, not a spreadsheet application.
D. Wrong: Photoshop is an image editor, not a spreadsheet application.
Question 20 Computer Science
The ability of the user / system to modify the user interface is?
- A. Recoverability
- B. Observability
- C. Customizability ✓ Correct answer
- D. Responsiveness
Why each option?
A. Wrong: recoverability is the ability to recover from errors, not to modify the interface.
B. Wrong: observability is the ability to see the system's state, not to modify the interface.
C. Correct: customizability is the ability of the user/system to modify the user interface to suit preferred ways of use.
D. Wrong: responsiveness is how quickly the system reacts, not the ability to modify the interface.
Question 21 Computer Science
The sorting algorithm which repeatedly swaps the adjacent elements if they are in the wrong order is?
- A. Bubble Sort ✓ Correct answer
- B. Insertion Sort
- C. Adjacent Sort
- D. Quick Sort
Why each option?
A. Correct: bubble sort repeatedly compares adjacent elements and swaps them if they are in the wrong order.
B. Wrong: insertion sort inserts each element into its correct position in a sorted part, it does not repeatedly swap adjacent elements.
C. Wrong: there is no standard sorting algorithm called "adjacent sort".
D. Wrong: quick sort partitions around a pivot; it does not repeatedly swap adjacent elements.
Question 22 Computer Science
In context of database systems, a candidate key that consist of two or more attributes that together uniquely identify an entity occurrence is called?
- A. Compound Key
- B. Composite Key ✓ Correct answer
- C. Primary Key
- D. Foreign Key
Why each option?
A. Defensible but not picked: "compound key" is used in some texts as a synonym for a key made of multiple attributes.
B. Picked: a composite key is the standard term for a candidate key consisting of two or more attributes that together uniquely identify an entity occurrence.
C. Wrong: a primary key is the chosen identifier; it may be single-attribute.
D. Wrong: a foreign key references another table's key, it does not identify an entity occurrence in its own table. Picked by assistant under owner's 8 Nov delegation.
Question 23 Computer Science
Any programming language must have the constructs to support
- A. Selection
- B. Sequence
- C. Iteration
- D. All of these ✓ Correct answer
Why each option?
A. True in isolation: selection (if/else) is one of the three basic constructs.
B. True in isolation: sequence is one of the three basic constructs.
C. True in isolation: iteration (loops) is one of the three basic constructs.
D. Correct: any programming language must support selection, sequence and iteration.
Question 24 Computer Science
ASCII stand for?
- A. American Security Code for Information Interchange
- B. All-purpose Scientific Code for Information Exchange
- C. American Standard Code for Information Interchange ✓ Correct answer
- D. American Scientific Code for Information Exchange
Why each option?
A. Wrong: the word is "Standard", not "Security".
B. Wrong: this expansion is invented.
C. Correct: ASCII stands for American Standard Code for Information Interchange.
D. Wrong: the words are "Standard" and "Interchange", not "Scientific" and "Exchange".
Question 25 Computer Science
______ expresses how many pixels are present in a display or entire screen.
- A. Pixel count
- B. Resolution ✓ Correct answer
- C. OpenGL
- D. Screen pixle
Why each option?
A. Wrong: pixel count is not the standard term for this.
B. Correct: resolution expresses how many pixels are present in a display or entire screen.
C. Wrong: OpenGL is a graphics API, not a measure of pixels.
D. Wrong: this is a misspelling, not the term (the option prints "pixle").
Question 26 Computer Science
For larger inputs, Merge Sort is faster then Insertion Sort.
- A. True ✓ Correct answer
- B. False
- C. Cannot be determined
- D. Sometimes
Why each option?
A. Correct: merge sort (divide and conquer, O(n log n)) is faster than insertion sort (O(n²)) for larger inputs.
B. Wrong: merge sort is faster for larger inputs.
C. Wrong: the comparison is well established.
D. Wrong: for larger inputs merge sort is consistently faster.
Question 27 Computer Science
Worst case space complexity of Queue is?
- A. O(n2)
- B. O(n) ✓ Correct answer
- C. O(logn)
- D. O(nlogn)
Why each option?
A. Wrong: a queue stores each element once, so its space is linear, not quadratic.
B. Correct: all elements must be stored, so the worst-case space complexity of a queue is O(n).
C. Wrong: O(log n) space would mean only a fraction of elements are stored.
D. Wrong: O(n log n) is larger than the actual linear space.
Question 28 Computer Science
Which of the following is not a programming language?
- A. Pyrhon
- B. HTML ✓ Correct answer
- C. Java
- D. Ruby
Why each option?
A. Wrong: Python (the option prints "Pyrhon") IS a programming language.
B. Correct: HTML is a markup language, not a programming language.
C. Wrong: Java IS a programming language.
D. Wrong: Ruby IS a programming language.
Question 29 Computer Science
Which of the following is not a web browser?
- A. Chrome
- B. Apache ✓ Correct answer
- C. Firefox
- D. Safari
Why each option?
A. Wrong: Chrome is a web browser.
B. Correct: Apache is a web server, not a web browser.
C. Wrong: Firefox is a web browser.
D. Wrong: Safari is a web browser.
Question 30 Computer Science
What is the output of the code: int num1 = 5; int num2 = 7; cout
- A. 5
- B. 7
- C. 12
- D. None of these
Why each option fails
A. Cannot be determined: the code is cut off after "cout" with no output expression shown.
B. Cannot be determined: the code is cut off after "cout" with no output expression shown.
C. The site's explanation says the output is 12 (which would follow from "cout << num1 + num2"), but that expression does not appear in the printed stem.
D. Cannot be determined: the code is cut off after "cout" with no output expression shown. The printed stem is incomplete, so the question has no determinable answer and is excluded as DEFECTIVE (decided by assistant under owner's 8 Nov delegation).
Question 31 Computer Science
Which of the following is known as the language made up of binary coded instructions.?
- A. High Level
- B. BASIC
- C. C
- D. Machine ✓ Correct answer
Why each option?
A. Wrong: high-level languages are written in words, not binary-coded instructions.
B. Wrong: BASIC is a high-level language.
C. Wrong: C is a high-level (compiled) language.
D. Correct: machine language is made up of binary-coded instructions used directly by the computer's hardware.
Question 32 Computer Science
_____ is used to provide the specific implementation of a method which is already provided by its superclass.
- A. Operator Overload
- B. Method Overload
- C. Method Overriding ✓ Correct answer
- D. Operator Overloading
Why each option?
A. Wrong: operator overloading gives new meaning to operators, not a new implementation of an inherited method.
B. Wrong: method overloading is multiple methods with the same name but different parameters in the same class.
C. Correct: method overriding lets a subclass provide a specific implementation of a method already provided by its superclass.
D. Wrong: operator overloading is about operators, not about re-implementing an inherited method.
Question 33 Computer Science
Source program is compiled to an intermediate form called?
- A. Byte Code ✓ Correct answer
- B. Smart Code
- C. Executable Code
- D. Pseudo Code
Why each option?
A. Correct: a source program is compiled to an intermediate form called byte code, which an interpreter converts to machine code.
B. Wrong: there is no standard intermediate form called "smart code".
C. Wrong: executable code is the final machine code, not the intermediate form.
D. Wrong: pseudocode is an informal description, not a compiled intermediate form.
Question 34 Computer Science
Colour Printers uses the ink cartridges of?
- A. Cyan Magenta Yellow Black (CMYK) ✓ Correct answer
- B. Cyan Magenta Yellow (CMY)
- C. Red Green Blue (RGB)
- D. Red Green Blue Black (RGBK)
Why each option?
A. Correct: colour printers use CMYK ink cartridges (cyan, magenta, yellow, black).
B. Wrong: CMY omits black, which colour printers also use.
C. Wrong: RGB is the colour model for screens, not printer ink.
D. Wrong: printers do not use an RGBK ink set.
Question 35 Computer Science
Which of the following language does computer understand?
- A. Computer understand only C language
- B. Computer understand only Assembly language
- C. Computer understand only Binary language ✓ Correct answer
- D. Computer understand only BASIC
Why each option?
A. Wrong: the computer does not understand C directly — C is compiled to machine code.
B. Wrong: assembly is also translated (assembled) to machine code.
C. Correct: the computer understands only binary (machine) language — instructions as 0s and 1s.
D. Wrong: BASIC is a high-level language, compiled or interpreted.
Question 36 Computer Science
Which of the following is not a common used computer topology?
- A. Bus
- B. Star
- C. Ring
- D. Hexagon ✓ Correct answer
Why each option?
A. Wrong: bus is one of the standard computer topologies.
B. Wrong: star is one of the standard computer topologies.
C. Wrong: ring is one of the standard computer topologies (bus, star and ring are the classic three) — the source site keys C on the grounds that ring is "rarely used today", but that does not make it "not a topology".
D. Correct: a hexagon is a shape, not a computer network topology at all.
Question 37 Computer Science
Which of the following is the correct way to get the length of string variable in C++?
- A. Name.length() ✓ Correct answer
- B. Length(name)
- C. Name.size()
- D. Size(name)
Why each option?
A. Picked: length() is the conventional way to get the length of a C++ std::string.
B. Wrong: there is no standalone Length() function for std::string in C++.
C. Also correct in substance: size() returns the same value as length() for std::string (the site's own explanation says both methods work) — A is picked as the conventional answer.
D. Wrong: there is no standalone Size() function for std::string in C++. Picked by assistant under owner's 8 Nov delegation.
Question 38 Computer Science
Which of the following is the correct way to declare and initialize a string variable in C++?
- A. string name = "John" ✓ Correct answer
- B. char name = "John"
- C. string name; name = "John"
- D. char name[5] = {'J','o','h','n'}
Why each option?
A. Correct: this declares and initialises a C++ string variable in one statement.
B. Wrong: a char holds a single character, not the string "John".
C. Wrong as "declare and initialise": this declares the variable and then assigns to it in a separate statement — it works, but it is declaration followed by assignment, not declaration with initialisation.
D. Wrong: this declares a character array, not a string variable (and it lacks the null terminator).
Question 39 Computer Science
_____ describe the bundling of data and methods operating on this data into one unit?
- A. Abstraction
- B. Polymorphism
- C. Encapsulation ✓ Correct answer
- D. Aggregation
Why each option?
A. Wrong: abstraction hides complexity and shows only essential features; it is not the bundling of data and methods.
B. Wrong: polymorphism is one interface with many forms, not bundling.
C. Correct: encapsulation is the bundling of data and the methods operating on that data into one unit (a class).
D. Wrong: aggregation is a has-a relationship between objects, not bundling of data and methods.
Question 40 Computer Science
Which of the following is not a characteristic of High Level Language?
- A. Machine Code ✓ Correct answer
- B. Platform Independent
- C. Interactive execution
- D. User Friendly
Why each option?
A. Correct: machine code is the language of the hardware, not a characteristic of high-level languages (which are platform independent, interactive and user friendly).
B. Wrong: platform independence IS a characteristic of high-level languages.
C. Wrong: interactive execution IS a characteristic of high-level languages.
D. Wrong: being user friendly IS a characteristic of high-level languages.
Question 41 Computer Science
When algorithm is written in the form of programming language, it becomes a ?
- A. Flowchart
- B. Pseudocode
- C. Program ✓ Correct answer
- D. Syntax
Why each option?
A. Wrong: a flowchart is a diagram of an algorithm, not an algorithm written as code.
B. Wrong: pseudocode is the informal description, not the algorithm in a programming language.
C. Correct: when an algorithm is written in the form of a programming language, it becomes a program.
D. Wrong: syntax is the set of rules of a language, not the algorithm written in it.
Question 42 Computer Science
What is the correct way to declare a constant in C++?
- A. int constant x = 5;
- B. const int x = 5; ✓ Correct answer
- C. int x = 5;
- D. None of these
Why each option?
A. Wrong: the const qualifier must come before the type (or after it, as "int const x"), not as "int constant".
B. Correct: this is the standard way to declare a constant in C++.
C. Wrong: this declares an ordinary (changeable) variable, not a constant.
D. Wrong: option B is correct.
Question 43 Computer Science
Which of the following is designed to control the operation of a computer?
- A. User
- B. Application Software
- C. System Software ✓ Correct answer
- D. Utility Software
Why each option?
A. Wrong: the user operates the computer; software controls it.
B. Wrong: application software performs user tasks (word processing, browsing); it does not control the computer's operation.
C. Correct: system software (operating system and utilities) is designed to control the operation of a computer.
D. Wrong: utility software is a part of system software for maintenance tasks, not the software that controls the computer's operation in general.
Question 44 Computer Science
The condition "Every non prime attribute has a full functional dependency on a candidate key attribute depends on the complete primary key is satisfied in?
- A. First Normal Form
- B. Second Normal Form ✓ Correct answer
- C. Extensive Normal Form
- D. Un normalized Form
Why each option?
A. Wrong: 1NF requires atomic values only; it does not require full functional dependency.
B. Correct: a relation is in 2NF when it is in 1NF and every non-prime attribute is fully functionally dependent on the (whole) primary key.
C. Wrong: there is no normal form called "extensive normal form".
D. Wrong: unnormalised form has repeating groups and no dependency requirements.
Question 45 Computer Science
Software process model that incorporates risk management during every iteration is called?
- A. Waterfall Process Model
- B. Prototype Process Model
- C. Spiral Process Model ✓ Correct answer
- D. Rapid Application Development Process Model
Why each option?
A. Wrong: the waterfall model is sequential with no iteration or risk management at every step.
B. Wrong: the prototype model builds mock-ups for feedback; risk management at every iteration is not its defining feature.
C. Correct: the spiral model incorporates risk management during every iteration.
D. Wrong: RAD emphasises rapid prototyping and user feedback, not risk management at every iteration.
