Computer ScienceSoftware PPSCID: LTP-7640
In software development, which phase of the SDLC is mainly concerned with gathering what the users need the system to do?
- ARequirement analysis ✓ Correct answer
- BSystem testing
- CCode maintenance
- DDeployment
✓ Correct answer: Requirement analysis
Full explanation
Requirement analysis is the SDLC phase in which the requirements of the users are gathered and documented before design begins.
Computer ScienceSoftware PPSCID: LTP-7641
In the waterfall model of software development, how do the phases proceed?
- AAll phases run at the same time
- BEach phase must be completed before the next begins ✓ Correct answer
- CPhases are repeated until the user is satisfied
- DTesting comes before requirement analysis
✓ Correct answer: Each phase must be completed before the next begins
Full explanation
In the waterfall model each phase must be completed before the next begins, so work flows downwards in a strict sequence.
Computer ScienceSoftware PPSCID: LTP-7642
According to the Agile Manifesto, which of the following is valued more than comprehensive documentation?
- ADetailed contracts
- BStrict plans
- CWorking software ✓ Correct answer
- DHeavy paperwork
✓ Correct answer: Working software
Full explanation
The Agile Manifesto values working software over comprehensive documentation, so a working product matters more than lengthy documents.
Computer ScienceSoftware PPSCID: LTP-7643
In black-box testing, what does the tester know about the internal code of the program?
- AEvery line of the source code
- BOnly the database design
- COnly the user manual
- DNothing about the internal code ✓ Correct answer
✓ Correct answer: Nothing about the internal code
Full explanation
In black-box testing the tester knows nothing about the internal code and checks only the inputs and the outputs.
Computer ScienceSoftware PPSCID: LTP-7644
White-box testing is mainly based on examining which of the following?
- AThe internal structure and code ✓ Correct answer
- BOnly the user interface
- COnly the user manual
- DThe marketing plan
✓ Correct answer: The internal structure and code
Full explanation
White-box testing is based on the internal structure and code, so the tester designs cases from the logic inside the program.
Computer ScienceSoftware PPSCID: LTP-7645
Unit testing is used to test which of the following?
- AThe whole system at once
- BAn individual module or function ✓ Correct answer
- CThe network connection
- DThe hardware only
✓ Correct answer: An individual module or function
Full explanation
Unit testing tests an individual module or function in isolation before it is combined with other parts.
Computer ScienceSoftware PPSCID: LTP-7646
What is the main purpose of a Software Requirements Specification (SRS) document?
- ATo list the salaries of developers
- BTo advertise the software
- CTo describe what the software must do ✓ Correct answer
- DTo install the operating system
✓ Correct answer: To describe what the software must do
Full explanation
An SRS document exists to describe what the software must do, recording the functional and non-functional requirements agreed with the users.
Computer ScienceSoftware PPSCID: LTP-7647
In software design, low coupling between modules is desirable because it means the modules are:
- ACompletely identical
- BWritten in the same file
- CTested only once
- DLargely independent of each other ✓ Correct answer
✓ Correct answer: Largely independent of each other
Full explanation
Low coupling means the modules are largely independent of each other, so a change in one module affects the others very little.
Computer ScienceSoftware PPSCID: LTP-7648
High cohesion in a module means that the parts of the module are:
- AClosely related and focused on one task ✓ Correct answer
- BSpread across many programs
- CWritten by different teams
- DStored in separate databases
✓ Correct answer: Closely related and focused on one task
Full explanation
High cohesion means the parts of a module are closely related and focused on one task, which makes the module easier to understand and maintain.
Computer ScienceSoftware PPSCID: LTP-7649
The spiral model of software development is best known for being driven by which factor?
- AFixed prices only
- BRisk analysis ✓ Correct answer
- CPaper documentation
- DHardware speed
✓ Correct answer: Risk analysis
Full explanation
The spiral model is driven by risk analysis, with each loop of the spiral identifying and reducing the biggest risks first.
Computer ScienceSoftware PPSCID: LTP-7650
A prototype model is used in software development mainly to:
- ASell the finished product
- BReplace the testing phase
- CClarify the requirements with a working model ✓ Correct answer
- DReduce the number of users
✓ Correct answer: Clarify the requirements with a working model
Full explanation
A prototype model is used to clarify the requirements with a working model, built early so users can see it before the full system is built.
Computer ScienceSoftware PPSCID: LTP-7651
Which phase of the software life cycle is usually the most expensive over the life of a system?
- ARequirement analysis
- BCoding
- CInstallation
- DMaintenance ✓ Correct answer
✓ Correct answer: Maintenance
Full explanation
Maintenance is usually the most expensive phase because fixing faults and adding changes continues for years after delivery.
Computer ScienceSoftware PPSCID: LTP-7652
In a data flow diagram (DFD), a circle (or bubble) represents which of the following?
- AA process ✓ Correct answer
- BA data store
- CAn external entity
- DA data flow arrow
✓ Correct answer: A process
Full explanation
In a data flow diagram a circle represents a process, which transforms incoming data into outgoing data.
Computer ScienceSoftware PPSCID: LTP-7653
A UML use case diagram mainly shows which of the following?
- AThe hardware of the system
- BActors and the use cases they perform ✓ Correct answer
- CThe speed of the processor
- DThe cost of the project
✓ Correct answer: Actors and the use cases they perform
Full explanation
A UML use case diagram shows actors and the use cases they perform, describing what the system offers to its users.
Computer ScienceSoftware PPSCID: LTP-7654
Which of the following is a widely used version control system for tracking changes in source code?
- AMS Paint
- BNotepad
- CGit ✓ Correct answer
- DMedia Player
✓ Correct answer: Git
Full explanation
Git is a widely used version control system that tracks changes in source code and lets developers work on the same project together.
Computer ScienceDatabases & DBMS PPSCID: LTP-7655
What is a Database Management System (DBMS)?
- AA computer printer
- BA web browser
- CA type of keyboard
- DSoftware that manages databases ✓ Correct answer
✓ Correct answer: Software that manages databases
Full explanation
A DBMS is software that manages databases, letting users store, retrieve, update and protect data in an organised way.
Computer ScienceDatabases & DBMS PPSCID: LTP-7656
Which property must a primary key always have?
- AUnique and not null ✓ Correct answer
- BIt may repeat in every row
- CIt must contain text only
- DIt must be a foreign key
✓ Correct answer: Unique and not null
Full explanation
A primary key must be unique and not null, so every row in the table can be identified by its key value.
Computer ScienceDatabases & DBMS PPSCID: LTP-7657
A foreign key in a table is used to refer to which of the following?
- AThe password of the user
- BThe primary key of another table ✓ Correct answer
- CThe name of the database server
- DA deleted record
✓ Correct answer: The primary key of another table
Full explanation
A foreign key refers to the primary key of another table, creating a link between the two tables.
Computer ScienceDatabases & DBMS PPSCID: LTP-7658
The main purpose of normalisation in database design is to:
- AIncrease data duplication
- BSlow down queries
- CReduce data redundancy ✓ Correct answer
- DDelete all indexes
✓ Correct answer: Reduce data redundancy
Full explanation
The main purpose of normalisation is to reduce data redundancy by organising tables so the same fact is not stored again and again.
Computer ScienceDatabases & DBMS PPSCID: LTP-7659
A table is in First Normal Form (1NF) when all of its values are:
- ARepeated in every row
- BStored as images
- CEncrypted
- DAtomic ✓ Correct answer
✓ Correct answer: Atomic
Full explanation
A table is in First Normal Form when all its values are atomic, meaning each cell holds a single indivisible value.
Computer ScienceDatabases & DBMS PPSCID: LTP-7660
In SQL, which constraint is used to specify that a column cannot contain a NULL value?
- ANOT NULL ✓ Correct answer
- BUNIQUE
- CPRIMARY KEY
- DCHECK
✓ Correct answer: NOT NULL
Full explanation
The NOT NULL constraint specifies that a column cannot contain a NULL value, so every row must have a value in that column.
Computer ScienceDatabases & DBMS PPSCID: LTP-7662
In the ACID properties of a database transaction, the letter A stands for:
- AAccuracy
- BAvailability
- CAtomicity ✓ Correct answer
- DAuthority
✓ Correct answer: Atomicity
Full explanation
In ACID, A stands for Atomicity, which means a transaction is treated as one indivisible unit that either completes fully or not at all.
Computer ScienceDatabases & DBMS PPSCID: LTP-7663
Which of the following is an advantage of a DBMS over a simple file system?
- AData can only be stored once
- BOnly one user can access data
- CNo backup is possible
- DData independence and less redundancy ✓ Correct answer
✓ Correct answer: Data independence and less redundancy
Full explanation
A DBMS gives data independence and less redundancy, so programs do not depend on the physical storage and the same data is not duplicated.
Computer ScienceDatabases & DBMS PPSCID: LTP-7664
In an Entity-Relationship (ER) model, an entity represents:
- AA real-world object or thing ✓ Correct answer
- BA computer virus
- CA network cable
- DA user password
✓ Correct answer: A real-world object or thing
Full explanation
In an ER model an entity represents a real-world object or thing, such as a student, an employee or a book, that is stored in the database.
Computer ScienceDatabases & DBMS PPSCID: LTP-7665
A candidate key is best described as a key that is:
- AAlways a foreign key
- BA minimal superkey ✓ Correct answer
- CNever unique
- DOnly used for sorting
✓ Correct answer: A minimal superkey
Full explanation
A candidate key is a minimal superkey, a set of columns that uniquely identifies a row with no unnecessary column.
Computer ScienceDatabases & DBMS PPSCID: LTP-7666
In a database, a transaction is best defined as:
- AA printed report
- BA backup file
- CA single unit of work ✓ Correct answer
- DA user login
✓ Correct answer: A single unit of work
Full explanation
A transaction is a single unit of work in a database, a group of operations that must all succeed or all be undone together.
Computer ScienceOperating Systems PPSCID: LTP-7668
The kernel is best described as the:
- ACore part of the operating system ✓ Correct answer
- BOuter cover of the monitor
- CName of a web browser
- DMain folder of a disk
✓ Correct answer: Core part of the operating system
Full explanation
The kernel is the core part of the operating system, running with full control over the hardware.
Computer ScienceOperating Systems PPSCID: LTP-7669
Multiprogramming means that the operating system keeps:
- AOnly one program in memory
- BSeveral programs in memory at the same time ✓ Correct answer
- CNo program in memory
- DPrograms only on paper
✓ Correct answer: Several programs in memory at the same time
Full explanation
Multiprogramming means several programs in memory at the same time, so the CPU can switch between them.
Computer ScienceOperating Systems PPSCID: LTP-7670
A deadlock in an operating system occurs when:
- AThe computer runs very fast
- BAll files are deleted
- CProcesses wait forever for resources held by each other ✓ Correct answer
- DThe printer runs out of paper
✓ Correct answer: Processes wait forever for resources held by each other
Full explanation
A deadlock occurs when processes wait forever for resources held by each other, so none of them can proceed.
Computer ScienceOperating Systems PPSCID: LTP-7671
In paging, the memory of a computer is divided into fixed-size blocks called:
- AFiles
- BFolders
- CPackets
- DPages ✓ Correct answer
✓ Correct answer: Pages
Full explanation
In paging the memory is divided into fixed-size blocks called pages, and the same-size blocks on disk are called frames.
Computer ScienceOperating Systems PPSCID: LTP-7672
First-Come, First-Served (FCFS) scheduling serves processes in which order?
- AIn the order they arrive ✓ Correct answer
- BIn reverse order of size
- CBy shortest job first
- DBy highest priority only
✓ Correct answer: In the order they arrive
Full explanation
First-Come, First-Served scheduling serves processes in the order they arrive, like a simple queue.
Computer ScienceOperating Systems PPSCID: LTP-7673
Virtual memory allows a computer to run large programs by using:
- AExtra monitors
- BDisk space as an extension of RAM ✓ Correct answer
- CA faster keyboard
- DMore printers
✓ Correct answer: Disk space as an extension of RAM
Full explanation
Virtual memory uses disk space as an extension of RAM, so programs larger than the physical memory can still run.
Computer ScienceOperating Systems PPSCID: LTP-7674
A system call provides a way for a program to:
- ADelete the operating system
- BPrint without a printer
- CRequest a service from the operating system ✓ Correct answer
- DConnect to the moon
✓ Correct answer: Request a service from the operating system
Full explanation
A system call lets a program request a service from the operating system, such as reading a file or creating a process.
Computer ScienceOperating Systems PPSCID: LTP-7675
Spooling in an operating system is used to:
- ASpeed up the CPU clock
- BCompress video files
- CEncrypt passwords
- DHold jobs for a slow device such as a printer ✓ Correct answer
✓ Correct answer: Hold jobs for a slow device such as a printer
Full explanation
Spooling is used to hold jobs for a slow device such as a printer, letting the CPU continue with other work while printing proceeds.
Computer ScienceOperating Systems PPSCID: LTP-7676
In round-robin scheduling, each process is given a fixed amount of CPU time called a:
- ATime quantum ✓ Correct answer
- BMemory page
- CDisk sector
- DNetwork packet
✓ Correct answer: Time quantum
Full explanation
In round-robin scheduling each process receives a fixed time quantum of CPU time before the CPU moves to the next process.
Computer ScienceInternet PPSCID: LTP-7677
Which port number is used by default for HTTP web traffic?
- A21
- B80 ✓ Correct answer
- C25
- D110
✓ Correct answer: 80
Full explanation
Port 80 is the default port for HTTP web traffic, while secure HTTPS traffic uses port 443.
Computer ScienceInternet PPSCID: LTP-7678
HTTPS differs from HTTP mainly because HTTPS provides:
- AFaster printing
- BLarger monitors
- CEncrypted and secure communication ✓ Correct answer
- DFree software
✓ Correct answer: Encrypted and secure communication
Full explanation
HTTPS provides encrypted and secure communication, protecting the data exchanged between the browser and the server.
Computer ScienceInternet PPSCID: LTP-7679
What is the main function of the Domain Name System (DNS)?
- ATo print web pages
- BTo design websites
- CTo store passwords
- DTo translate domain names into IP addresses ✓ Correct answer
✓ Correct answer: To translate domain names into IP addresses
Full explanation
The Domain Name System exists to translate domain names into IP addresses, so a name like example.com can reach the correct server.
Computer ScienceInternet PPSCID: LTP-7680
Which protocol is used to transfer hypertext documents on the World Wide Web?
- AHTTP ✓ Correct answer
- BFTP
- CSMTP
- DTCP
✓ Correct answer: HTTP
Full explanation
HTTP is the protocol used to transfer hypertext documents on the World Wide Web, carrying web pages from server to browser.
Computer ScienceInternet PPSCID: LTP-7681
An IP address is best described as:
- AA postal address of a person
- BA unique identifier for a device on a network ✓ Correct answer
- CA type of computer virus
- DA web page design
✓ Correct answer: A unique identifier for a device on a network
Full explanation
An IP address is a unique identifier for a device on a network, allowing data to be sent to the right machine.
Computer ScienceInternet PPSCID: LTP-7682
Which organisation coordinates the assignment of IP addresses and domain names worldwide?
- AIEEE
- BW3C
- CICANN ✓ Correct answer
- DISO
✓ Correct answer: ICANN
Full explanation
ICANN coordinates the assignment of IP addresses and domain names worldwide, keeping the naming system of the Internet organised.
Computer ScienceInternet PPSCID: LTP-7683
FTP is a protocol mainly used for:
- ASending printed letters
- BPlaying music
- CDrawing pictures
- DTransferring files between computers ✓ Correct answer
✓ Correct answer: Transferring files between computers
Full explanation
FTP is a protocol used for transferring files between computers over a network.
Computer ScienceInternet PPSCID: LTP-7684
SMTP is the protocol mainly used for:
- ASending email ✓ Correct answer
- BBrowsing web pages
- CTransferring files by FTP
- DChatting by video
✓ Correct answer: Sending email
Full explanation
SMTP is the protocol used for sending email from a mail client to a mail server and between servers.
Computer ScienceComputer Networking PPSCID: LTP-7685
A Local Area Network (LAN) is a network that covers:
- AThe whole world
- BA small area such as an office or a building ✓ Correct answer
- COnly two continents
- DA single computer with no cables
✓ Correct answer: A small area such as an office or a building
Full explanation
A Local Area Network covers a small area such as an office or a building, connecting computers close together.
Computer ScienceComputer Networking PPSCID: LTP-7687
TCP is best described as a protocol that is:
- AUnreliable and connectionless
- BUsed only for printing
- CA type of hardware
- DReliable and connection-oriented ✓ Correct answer
✓ Correct answer: Reliable and connection-oriented
Full explanation
TCP is a reliable and connection-oriented protocol that checks that data arrives completely and in order.
Computer ScienceComputer Networking PPSCID: LTP-7689
A MAC address is best described as:
- AA postal address
- BA unique hardware address of a network device ✓ Correct answer
- CAn email address
- DA web address
✓ Correct answer: A unique hardware address of a network device
Full explanation
A MAC address is a unique hardware address of a network device, assigned to its network card by the manufacturer.
ProgrammingPython Programming PPSCID: LTP-7690
In Python, which keyword starts a loop that repeats while a condition remains true?
- Afor
- Bif
- Cwhile ✓ Correct answer
- Ddef
✓ Correct answer: while
Full explanation
In Python the while keyword starts a loop that repeats while a condition remains true, checking the condition before each round.
ProgrammingPython Programming PPSCID: LTP-7691
In Python, which function is used to display output on the screen?
- Ascan()
- Bshow()
- Cdisplay()
- Dprint() ✓ Correct answer
✓ Correct answer: print()
Full explanation
The print() function is used in Python to display output on the screen.
ProgrammingPython Programming PPSCID: LTP-7692
Which Python data type is mutable, meaning its contents can be changed after creation?
- AList ✓ Correct answer
- BTuple
- CString
- DInteger
✓ Correct answer: List
Full explanation
A list is mutable in Python, so items can be added, removed or changed after the list is created.
ProgrammingPython Programming PPSCID: LTP-7693
Which Python data type is immutable, meaning it cannot be changed after creation?
- AList
- BTuple ✓ Correct answer
- CDictionary
- DSet
✓ Correct answer: Tuple
Full explanation
A tuple is immutable in Python, so its items cannot be changed after the tuple is created.
ProgrammingPython Programming PPSCID: LTP-7694
In Python, what does the expression 2 ** 3 evaluate to?
- A6
- B9
- C8 ✓ Correct answer
- D5
✓ Correct answer: 8
Full explanation
In Python the expression 2 ** 3 evaluates to 8, because ** is the power operator and 2 raised to 3 is 8.
ProgrammingPython Programming PPSCID: LTP-7695
In Python, blocks of code such as the body of a loop are defined by:
- ACurly braces
- BSemicolons
- CRound brackets
- DIndentation ✓ Correct answer
✓ Correct answer: Indentation
Full explanation
In Python, blocks of code are defined by indentation, with the same indent marking the statements that belong together.
ProgrammingPython Programming PPSCID: LTP-7696
In Python, which function returns the number of items in a list?
- Alen() ✓ Correct answer
- Bcount()
- Csize()
- Dlength()
✓ Correct answer: len()
Full explanation
The len() function returns the number of items in a list or other sequence in Python.
ProgrammingPython Programming PPSCID: LTP-7697
A Python dictionary stores data as:
- AOnly numbers
- BKey-value pairs ✓ Correct answer
- COnly images
- DSorted pages
✓ Correct answer: Key-value pairs
Full explanation
A Python dictionary stores data as key-value pairs, so each value is reached through its key.
ProgrammingPython Programming PPSCID: LTP-7698
In Python, which symbol starts a single-line comment?
- A//
- B/*
- C# ✓ Correct answer
- D--
✓ Correct answer: #
Full explanation
In Python the # symbol starts a single-line comment, and everything after it on that line is ignored.
ProgrammingPython Programming PPSCID: LTP-7699
Python is best described as which type of language?
- AMachine code only
- BAssembly only
- CA markup language
- DInterpreted ✓ Correct answer
✓ Correct answer: Interpreted
Full explanation
Python is an interpreted language, so its code is executed line by line by the Python interpreter.
ProgrammingJava Programming PPSCID: LTP-7700
The Java programming language was created by:
- AJames Gosling ✓ Correct answer
- BGuido van Rossum
- CDennis Ritchie
- DBjarne Stroustrup
✓ Correct answer: James Gosling
Full explanation
Java was created by James Gosling at Sun Microsystems and first released in 1995.
ProgrammingJava Programming PPSCID: LTP-7701
In Java, the JVM is responsible for:
- APrinting documents
- BExecuting Java bytecode ✓ Correct answer
- CDesigning web pages
- DStoring passwords
✓ Correct answer: Executing Java bytecode
Full explanation
The JVM is responsible for executing Java bytecode, running the compiled program on whatever platform it is installed on.
ProgrammingJava Programming PPSCID: LTP-7702
Java is famous for the principle known as:
- AWrite once, print anywhere
- BRun once, forget it
- CWrite once, run anywhere ✓ Correct answer
- DCompile once, delete it
✓ Correct answer: Write once, run anywhere
Full explanation
Java follows write once, run anywhere, because compiled bytecode runs on any machine with a JVM.
ProgrammingJava Programming PPSCID: LTP-7703
In Java, which access modifier makes a member visible only inside its own class?
- Apublic
- Bprotected
- Cstatic
- Dprivate ✓ Correct answer
✓ Correct answer: private
Full explanation
In Java the private access modifier makes a member visible only inside its own class, hiding it from other classes.
ProgrammingJava Programming PPSCID: LTP-7704
In Java, inheritance between classes is created with which keyword?
- Aextends ✓ Correct answer
- Binherits
- Cimplements
- Dderives
✓ Correct answer: extends
Full explanation
In Java the extends keyword creates inheritance, letting a class inherit the fields and methods of another class.
ProgrammingJava Programming PPSCID: LTP-7705
In a Java program, execution begins in which method?
- Astart
- Bmain ✓ Correct answer
- Cinit
- Drun
✓ Correct answer: main
Full explanation
Execution of a Java program begins in the main method, the entry point of the program.
ProgrammingJava Programming PPSCID: LTP-7706
Which of the following is the correct signature of the main method in Java?
- Apublic void main()
- Bstatic int main()
- Cpublic static void main(String[] args) ✓ Correct answer
- Dvoid start(String args)
✓ Correct answer: public static void main(String[] args)
Full explanation
The main method in Java is written as public static void main(String[] args), which is the entry point the JVM calls.
ProgrammingJava Programming PPSCID: LTP-7707
Encapsulation in Java means:
- ADeleting all private data
- BWriting code without classes
- CPrinting data to the screen
- DBundling data and methods together inside a class ✓ Correct answer
✓ Correct answer: Bundling data and methods together inside a class
Full explanation
Encapsulation means bundling data and methods together inside a class, hiding the internal details from outside code.
ProgrammingC++ Programming PPSCID: LTP-7708
The C++ programming language was created by:
- ABjarne Stroustrup ✓ Correct answer
- BJames Gosling
- CGuido van Rossum
- DDennis Ritchie
✓ Correct answer: Bjarne Stroustrup
Full explanation
C++ was created by Bjarne Stroustrup, who extended the C language with object-oriented features.
ProgrammingC++ Programming PPSCID: LTP-7709
In C++, which object is used to display output on the screen?
- Acin
- Bcout ✓ Correct answer
- Cprint
- Decho
✓ Correct answer: cout
Full explanation
In C++ the cout object is used to display output on the screen, usually with the insertion operator.
ProgrammingC++ Programming PPSCID: LTP-7710
In C++, which object is used to take input from the user?
- Acout
- Bscanf
- Ccin ✓ Correct answer
- Dget
✓ Correct answer: cin
Full explanation
In C++ the cin object is used to take input from the user, usually with the extraction operator.
ProgrammingC++ Programming PPSCID: LTP-7711
C++ is best known as a language that supports which programming style?
- AOnly machine code
- BOnly web design
- COnly database queries
- DObject-oriented programming ✓ Correct answer
✓ Correct answer: Object-oriented programming
Full explanation
C++ supports object-oriented programming, with classes, objects, inheritance and polymorphism built into the language.
ProgrammingC++ Programming PPSCID: LTP-7712
In C++, which operator is used to allocate memory dynamically?
- Anew ✓ Correct answer
- Bmalloc
- Calloc
- Dcreate
✓ Correct answer: new
Full explanation
In C++ the new operator is used to allocate memory dynamically at run time.
ProgrammingC++ Programming PPSCID: LTP-7713
In C++, the symbol * when used with a pointer variable means:
- AMultiply two numbers only
- BDereference the pointer to get the value it points to ✓ Correct answer
- CStart a comment
- DEnd the program
✓ Correct answer: Dereference the pointer to get the value it points to
Full explanation
In C++ the * symbol is used to dereference the pointer to get the value it points to, reaching the data stored at that address.
ProgrammingData Structures & Algorithms PPSCID: LTP-7714
A stack data structure follows which order of access?
- AFirst In, First Out (FIFO)
- BRandom access only
- CLast In, First Out (LIFO) ✓ Correct answer
- DSmallest first
✓ Correct answer: Last In, First Out (LIFO)
Full explanation
A stack follows Last In, First Out (LIFO), so the last item pushed on is the first item taken off.
ProgrammingData Structures & Algorithms PPSCID: LTP-7715
A queue data structure follows which order of access?
- ALast In, First Out (LIFO)
- BLargest first
- CRandom access only
- DFirst In, First Out (FIFO) ✓ Correct answer
✓ Correct answer: First In, First Out (FIFO)
Full explanation
A queue follows First In, First Out (FIFO), so the first item added is the first item removed.
ProgrammingData Structures & Algorithms PPSCID: LTP-7716
An array stores its elements in:
- AContiguous memory locations ✓ Correct answer
- BRandom files on disk
- CSeparate databases
- DPrinted pages
✓ Correct answer: Contiguous memory locations
Full explanation
An array stores its elements in contiguous memory locations, so each element can be reached by its index.
ProgrammingData Structures & Algorithms PPSCID: LTP-7717
Binary search can only be applied to data that is:
- AUnsorted
- BSorted ✓ Correct answer
- CEncrypted
- DPrinted
✓ Correct answer: Sorted
Full explanation
Binary search can only be applied to sorted data, because it repeatedly halves the search range by comparing the middle value.
ProgrammingData Structures & Algorithms PPSCID: LTP-7718
In a linked list, each element is stored in a node that contains:
- AOnly a picture
- BOnly a password
- CData and a pointer to the next node ✓ Correct answer
- DA whole database
✓ Correct answer: Data and a pointer to the next node
Full explanation
In a linked list each node contains data and a pointer to the next node, chaining the elements together.
ProgrammingData Structures & Algorithms PPSCID: LTP-7719
In a binary search tree, values smaller than a node are stored in its:
- ARight subtree
- BRoot only
- CParent only
- DLeft subtree ✓ Correct answer
✓ Correct answer: Left subtree
Full explanation
In a binary search tree values smaller than a node are stored in its left subtree, and larger values in its right subtree.
EnglishVocabulary — Synonyms PPSCID: LTP-7720
Choose the word nearest in meaning to FRUGAL.
- AThrifty ✓ Correct answer
- BWasteful
- CGenerous
- DCareless
✓ Correct answer: Thrifty
Full explanation
FRUGAL means careful with money, so Thrifty is nearest in meaning to FRUGAL.
EnglishVocabulary — Antonyms PPSCID: LTP-7721
Choose the word opposite in meaning to TEDIOUS.
- ABoring
- BInteresting ✓ Correct answer
- CDull
- DTiring
✓ Correct answer: Interesting
Full explanation
TEDIOUS means boring and too long, so its opposite is Interesting, meaning holding your attention.
EnglishSpelling PPSCID: LTP-7722
Choose the correctly spelt word.
- ABeautifull
- BBeatiful
- CBeautiful ✓ Correct answer
- DBeutiful
✓ Correct answer: Beautiful
Full explanation
The correctly spelt word is Beautiful, with the letters ea after the B.
General KnowledgeCapitals, Currencies & Organisations PPSCID: LTP-7725
Wellington, the capital of New Zealand, lies at the southern tip of which island?
- ASouth Island
- BNorth Island ✓ Correct answer
- CStewart Island
- DTasmania
✓ Correct answer: North Island
Full explanation
Wellington lies at the southern tip of the North Island of New Zealand, across Cook Strait from the South Island.
General KnowledgeBasic General Knowledge PPSCID: LTP-7727
Karachi remained the capital of Pakistan until the capital moved to Islamabad in which decade?
- A1950s
- B1970s
- C1980s
- D1960s ✓ Correct answer
✓ Correct answer: 1960s
Full explanation
Karachi remained the capital of Pakistan until the capital moved to Islamabad in the 1960s.
General KnowledgeCapitals, Currencies & Organisations PPSCID: LTP-7728
The Turkish lira is the currency of which country?
- ATurkey ✓ Correct answer
- BTurkmenistan
- CTunisia
- DThailand
✓ Correct answer: Turkey
Full explanation
The Turkish lira is the currency of Turkey, used for buying and selling within the country.
Pakistan StudiesNational Symbols & Emblems PPSCID: LTP-7732
The deodar, the national tree of Pakistan, grows mainly in which part of the country?
- ANorthern mountains ✓ Correct answer
- BSouthern deserts
- CCoastal plains
- DCentral plains
✓ Correct answer: Northern mountains
Full explanation
The deodar, the national tree of Pakistan, grows mainly in the northern mountains of the country.
Pakistan StudiesNational Symbols & Emblems PPSCID: LTP-7733
The shalwar kameez, the national dress of Pakistan, consists of which two main garments?
- AA coat and a tie
- BA long shirt and loose trousers ✓ Correct answer
- CA sari and a blouse
- DA jacket and jeans
✓ Correct answer: A long shirt and loose trousers
Full explanation
The shalwar kameez consists of a long shirt and loose trousers, worn across Pakistan.
Everyday ScienceEveryday Phenomena PPSCID: LTP-7738
The chemical symbol Na comes from the Latin name of which element?
- ANitrogen
- BNickel
- CSodium ✓ Correct answer
- DNeon
✓ Correct answer: Sodium
Full explanation
The chemical symbol Na comes from the Latin name natrium of the element Sodium.
IslamiatSeerat-un-Nabi PPSCID: LTP-7736
The Hijrah, the migration of the Holy Prophet (PBUH) to Madinah, marks the start of which calendar?
- AIslamic calendar ✓ Correct answer
- BGregorian calendar
- CJulian calendar
- DPersian calendar
✓ Correct answer: Islamic calendar
Full explanation
The Hijrah marks the start of the Islamic calendar, whose first year is 622 AD.
MathematicsPercentages PPSCID: LTP-7739
A shop offers a 15% discount on a Rs. 200 item. How much is the discount?
- ARs. 25
- BRs. 35
- CRs. 20
- DRs. 30 ✓ Correct answer
✓ Correct answer: Rs. 30
Full explanation
The discount is Rs. 30, because 15% of Rs. 200 equals Rs. 30.