Computer ScienceDatabases & DBMS PPSCID: LTP-7740
In database design, Second Normal Form (2NF) requires that a table is in 1NF and that every non-key column depends on:
- AThe whole primary key ✓ Correct answer
- BOnly part of the key
- CNo key at all
- DThe foreign key only
✓ Correct answer: The whole primary key
Full explanation
Second Normal Form requires that every non-key column depends on the whole primary key, not just part of a composite key.
Computer ScienceDatabases & DBMS PPSCID: LTP-7741
Third Normal Form (3NF) removes which kind of dependency from a table?
- APrimary key
- BTransitive dependency ✓ Correct answer
- CForeign key
- DIndex
✓ Correct answer: Transitive dependency
Full explanation
Third Normal Form removes transitive dependency, where a non-key column depends on another non-key column instead of the key.
Computer ScienceDatabases & DBMS PPSCID: LTP-7742
Boyce-Codd Normal Form (BCNF) is a stronger version of which normal form?
- AFirst Normal Form
- BFourth Normal Form
- CThird Normal Form ✓ Correct answer
- DFifth Normal Form
✓ Correct answer: Third Normal Form
Full explanation
Boyce-Codd Normal Form is a stronger version of Third Normal Form, dealing with cases where a non-key column determines part of a key.
Computer ScienceDatabases & DBMS PPSCID: LTP-7743
In SQL, the Data Definition Language (DDL) includes which of the following commands?
- ASELECT
- BINSERT
- CUPDATE
- DCREATE ✓ Correct answer
✓ Correct answer: CREATE
Full explanation
CREATE belongs to the Data Definition Language, which defines the structure of database objects such as tables.
Computer ScienceDatabases & DBMS PPSCID: LTP-7744
In SQL, the Data Manipulation Language (DML) includes which of the following commands?
- AINSERT ✓ Correct answer
- BCREATE
- CDROP
- DGRANT
✓ Correct answer: INSERT
Full explanation
INSERT belongs to the Data Manipulation Language, which is used to add, change and delete the data inside tables.
Computer ScienceDatabases & DBMS PPSCID: LTP-7745
In SQL, the GRANT command belongs to which language category?
- AData Definition Language
- BData Control Language (DCL) ✓ Correct answer
- CData Manipulation Language
- DQuery Language
✓ Correct answer: Data Control Language (DCL)
Full explanation
GRANT belongs to the Data Control Language (DCL), which controls permissions on database objects.
Computer ScienceDatabases & DBMS PPSCID: LTP-7746
Which SQL command is used to save all changes made by a transaction permanently?
- AROLLBACK
- BSAVEPOINT
- CCOMMIT ✓ Correct answer
- DDELETE
✓ Correct answer: COMMIT
Full explanation
The COMMIT command saves all changes made by a transaction permanently, ending the transaction.
Computer ScienceDatabases & DBMS PPSCID: LTP-7747
Which SQL command undoes all changes made by the current transaction?
- ACOMMIT
- BGRANT
- CCREATE
- DROLLBACK ✓ Correct answer
✓ Correct answer: ROLLBACK
Full explanation
The ROLLBACK command undoes all changes made by the current transaction, restoring the database to its earlier state.
Computer ScienceDatabases & DBMS PPSCID: LTP-7748
An INNER JOIN between two tables returns:
- AOnly rows that match in both tables ✓ Correct answer
- BAll rows from the left table only
- CAll rows from both tables
- DNo rows at all
✓ Correct answer: Only rows that match in both tables
Full explanation
An INNER JOIN returns only rows that match in both tables, leaving out rows with no match.
Computer ScienceDatabases & DBMS PPSCID: LTP-7749
A LEFT JOIN returns all rows from the left table and:
- AOnly rows that match in both tables
- BMatching rows from the right table, with NULL where there is no match ✓ Correct answer
- CNo rows from the right table
- DAll rows from the right table only
✓ Correct answer: Matching rows from the right table, with NULL where there is no match
Full explanation
A LEFT JOIN returns all rows from the left table and matching rows from the right table, with NULL where there is no match.
Computer ScienceDatabases & DBMS PPSCID: LTP-7750
A RIGHT JOIN returns all rows from the right table and:
- AOnly rows that match in both tables
- BNo rows from the left table
- CMatching rows from the left table, with NULL where there is no match ✓ Correct answer
- DAll rows from the left table only
✓ Correct answer: Matching rows from the left table, with NULL where there is no match
Full explanation
A RIGHT JOIN returns all rows from the right table and matching rows from the left table, with NULL where there is no match.
Computer ScienceDatabases & DBMS PPSCID: LTP-7751
A FULL OUTER JOIN returns:
- AOnly matching rows
- BOnly the left table rows
- COnly the right table rows
- DAll rows from both tables, with NULL where there is no match ✓ Correct answer
✓ Correct answer: All rows from both tables, with NULL where there is no match
Full explanation
A FULL OUTER JOIN returns all rows from both tables, with NULL where there is no match on either side.
Computer ScienceDatabases & DBMS PPSCID: LTP-7752
A CROSS JOIN between two tables produces:
- AThe Cartesian product of the two tables ✓ Correct answer
- BOnly matching rows
- CAn empty result
- DA single row
✓ Correct answer: The Cartesian product of the two tables
Full explanation
A CROSS JOIN produces the Cartesian product of the two tables, pairing every row of one table with every row of the other.
Computer ScienceDatabases & DBMS PPSCID: LTP-7753
In SQL, the UNION operator combines the results of two queries and:
- AKeeps all duplicate rows
- BRemoves duplicate rows ✓ Correct answer
- CDeletes the tables
- DSorts by the primary key only
✓ Correct answer: Removes duplicate rows
Full explanation
The UNION operator combines two query results and removes duplicate rows, while UNION ALL would keep them.
Computer ScienceDatabases & DBMS PPSCID: LTP-7754
In SQL, the GROUP BY clause is used to:
- ASort rows in reverse order
- BDelete duplicate tables
- CGroup rows that share the same values for aggregate functions ✓ Correct answer
- DCreate a new database
✓ Correct answer: Group rows that share the same values for aggregate functions
Full explanation
The GROUP BY clause is used to group rows that share the same values for aggregate functions, so each group can be summarised separately.
Computer ScienceDatabases & DBMS PPSCID: LTP-7755
In SQL, the HAVING clause differs from WHERE because HAVING filters:
- ARows before grouping
- BTables before creation
- CColumns by data type
- DGroups after aggregation ✓ Correct answer
✓ Correct answer: Groups after aggregation
Full explanation
The HAVING clause filters groups after aggregation, while WHERE filters individual rows before grouping.
Computer ScienceDatabases & DBMS PPSCID: LTP-7756
In SQL, the ORDER BY clause is used to:
- ASort the result rows ✓ Correct answer
- BDelete rows
- CCreate an index
- DGrant permissions
✓ Correct answer: Sort the result rows
Full explanation
The ORDER BY clause is used to sort the result rows, in ascending order by default or descending with DESC.
Computer ScienceDatabases & DBMS PPSCID: LTP-7757
In SQL, the DISTINCT keyword is used to:
- ADelete a table
- BRemove duplicate values from the result ✓ Correct answer
- CSort by date
- DAdd a new column
✓ Correct answer: Remove duplicate values from the result
Full explanation
The DISTINCT keyword is used to remove duplicate values from the result, so each value appears only once.
Computer ScienceDatabases & DBMS PPSCID: LTP-7758
Which SQL aggregate function returns the number of rows in a group?
- ASUM
- BAVG
- CCOUNT ✓ Correct answer
- DMAX
✓ Correct answer: COUNT
Full explanation
The COUNT aggregate function returns the number of rows in a group, while SUM adds values and AVG finds the average.
Computer ScienceDatabases & DBMS PPSCID: LTP-7759
A database view is best described as:
- AA physical copy of a table
- BA backup file
- CA user password
- DA virtual table based on a query ✓ Correct answer
✓ Correct answer: A virtual table based on a query
Full explanation
A database view is a virtual table based on a query, showing data from one or more tables without storing it separately.
Computer ScienceDatabases & DBMS PPSCID: LTP-7760
A database index is mainly used to:
- ASpeed up data retrieval ✓ Correct answer
- BSlow down queries
- CDelete records
- DEncrypt passwords
✓ Correct answer: Speed up data retrieval
Full explanation
A database index is mainly used to speed up data retrieval by letting the system find rows quickly without scanning the whole table.
Computer ScienceDatabases & DBMS PPSCID: LTP-7761
A trigger in a database is:
- AA printed report
- BA stored procedure that runs automatically when an event occurs ✓ Correct answer
- CA type of virus
- DA backup tape
✓ Correct answer: A stored procedure that runs automatically when an event occurs
Full explanation
A trigger is a stored procedure that runs automatically when an event occurs, such as inserting or updating a row.
Computer ScienceDatabases & DBMS PPSCID: LTP-7762
A stored procedure is best described as:
- AA single row of a table
- BA user manual
- CA set of SQL statements saved in the database for reuse ✓ Correct answer
- DA network cable
✓ Correct answer: A set of SQL statements saved in the database for reuse
Full explanation
A stored procedure is a set of SQL statements saved in the database for reuse, executed by calling its name.
Computer ScienceDatabases & DBMS PPSCID: LTP-7763
In an ER diagram, cardinality describes:
- AThe size of the database file
- BThe speed of the server
- CThe colour of the diagram
- DHow many instances of one entity relate to another ✓ Correct answer
✓ Correct answer: How many instances of one entity relate to another
Full explanation
Cardinality describes how many instances of one entity relate to another, such as one-to-many or many-to-many.
Computer ScienceDatabases & DBMS PPSCID: LTP-7764
A weak entity in an ER model is an entity that:
- ACannot exist without its owner entity ✓ Correct answer
- BHas no attributes at all
- CIs never stored
- DHas many primary keys
✓ Correct answer: Cannot exist without its owner entity
Full explanation
A weak entity cannot exist without its owner entity, such as a dependent of an employee, and it has no key of its own.
Computer ScienceDatabases & DBMS PPSCID: LTP-7765
The schema of a database describes:
- AThe data stored in the tables
- BThe structure of the database, including tables and columns ✓ Correct answer
- CThe password of the DBA
- DThe speed of queries
✓ Correct answer: The structure of the database, including tables and columns
Full explanation
The schema describes the structure of the database, including tables and columns and their relationships.
Computer ScienceDatabases & DBMS PPSCID: LTP-7766
The data dictionary of a DBMS contains:
- AThe personal data of users
- BPrinted manuals
- CMetadata about the database structure ✓ Correct answer
- DBackup tapes only
✓ Correct answer: Metadata about the database structure
Full explanation
The data dictionary contains metadata about the database structure, such as table definitions and column types.
Computer ScienceDatabases & DBMS PPSCID: LTP-7767
Which of the following is the main responsibility of a Database Administrator (DBA)?
- AWriting web pages
- BDesigning logos
- CRepairing printers
- DManaging and securing the database system ✓ Correct answer
✓ Correct answer: Managing and securing the database system
Full explanation
A Database Administrator is responsible for managing and securing the database system, including backups and user access.
Computer ScienceDatabases & DBMS PPSCID: LTP-7768
In a database, concurrency control is needed mainly to:
- APrevent conflicts when several users access data at the same time ✓ Correct answer
- BDelete old records
- CPrint reports faster
- DCompress the database file
✓ Correct answer: Prevent conflicts when several users access data at the same time
Full explanation
Concurrency control is needed to prevent conflicts when several users access data at the same time, keeping the database consistent.
Computer ScienceDatabases & DBMS PPSCID: LTP-7769
In database recovery, a log file is used to:
- AStore user photographs
- BRecord changes so the database can be restored after a failure ✓ Correct answer
- CPrint invoices
- DSpeed up the network
✓ Correct answer: Record changes so the database can be restored after a failure
Full explanation
A log file is used to record changes so the database can be restored after a failure, by replaying or undoing the logged operations.
Computer ScienceSQL PPSCID: LTP-7771
Which SQL statement is used to change the values in existing rows?
- ASELECT
- BCREATE
- CGRANT
- DUPDATE ✓ Correct answer
✓ Correct answer: UPDATE
Full explanation
The UPDATE statement is used in SQL to change the values in existing rows of a table.
Computer ScienceSQL PPSCID: LTP-7772
Which SQL statement is used to remove rows from a table?
- ADELETE FROM ✓ Correct answer
- BDROP TABLE
- CTRUNCATE TABLE
- DREMOVE FROM
✓ Correct answer: DELETE FROM
Full explanation
The DELETE FROM statement is used in SQL to remove rows from a table, while the table itself remains.
Computer ScienceSQL PPSCID: LTP-7773
What is the difference between DROP TABLE and TRUNCATE TABLE?
- ATRUNCATE removes the whole table; DROP removes only its rows
- BDROP removes the whole table; TRUNCATE removes only its rows ✓ Correct answer
- CBoth delete the database
- DBoth only delete one row
✓ Correct answer: DROP removes the whole table; TRUNCATE removes only its rows
Full explanation
DROP removes the whole table; TRUNCATE removes only its rows — DROP deletes the structure too, while TRUNCATE keeps the empty table.
Computer ScienceSQL PPSCID: LTP-7774
Which SQL statement is used to change the structure of an existing table?
- AUPDATE TABLE
- BMODIFY DATA
- CALTER TABLE ✓ Correct answer
- DCHANGE ROW
✓ Correct answer: ALTER TABLE
Full explanation
The ALTER TABLE statement is used in SQL to change the structure of an existing table, such as adding a column.
Computer ScienceSQL PPSCID: LTP-7775
Which SQL clause is used to filter rows before they are returned?
- AHAVING
- BORDER BY
- CGROUP BY
- DWHERE ✓ Correct answer
✓ Correct answer: WHERE
Full explanation
The WHERE clause filters rows before they are returned, keeping only the rows that meet the condition.
Computer ScienceSQL PPSCID: LTP-7776
In SQL, which operator is used with WHERE to match a pattern in text?
- ALIKE ✓ Correct answer
- BBETWEEN
- CIN
- DIS
✓ Correct answer: LIKE
Full explanation
The LIKE operator is used with WHERE to match a pattern in text, using % for any characters and _ for one character.
Computer ScienceSQL PPSCID: LTP-7777
In SQL, the BETWEEN operator is used to select values:
- AOutside all ranges
- BWithin a given range ✓ Correct answer
- COnly equal to zero
- DOnly in text columns
✓ Correct answer: Within a given range
Full explanation
The BETWEEN operator selects values within a given range, including both ends of the range.
Computer ScienceSQL PPSCID: LTP-7778
In SQL, the IN operator is used to:
- ADelete a list
- BSort a list
- CMatch any value in a list ✓ Correct answer
- DCreate a list
✓ Correct answer: Match any value in a list
Full explanation
The IN operator is used to match any value in a list, so WHERE city IN ('Lahore', 'Karachi') finds rows with either city.
Computer ScienceSQL PPSCID: LTP-7779
In SQL, which condition correctly tests whether a column has no value?
- A= NULL
- B== NULL
- CIS EMPTY
- DIS NULL ✓ Correct answer
✓ Correct answer: IS NULL
Full explanation
In SQL the IS NULL condition tests whether a column has no value, because NULL cannot be compared with =.
Computer ScienceSQL PPSCID: LTP-7780
In SQL, ORDER BY with DESC sorts the results in which order?
- ADescending order ✓ Correct answer
- BAscending order
- CRandom order
- DNo order
✓ Correct answer: Descending order
Full explanation
ORDER BY with DESC sorts the results in descending order, from the largest value to the smallest.
Computer ScienceSQL PPSCID: LTP-7781
Which SQL function returns the average value of a numeric column?
- ASUM
- BAVG ✓ Correct answer
- CCOUNT
- DMAX
✓ Correct answer: AVG
Full explanation
The AVG function returns the average value of a numeric column, while SUM returns the total.
Computer ScienceSQL PPSCID: LTP-7782
Which SQL function returns the largest value in a column?
- AMIN
- BCOUNT
- CMAX ✓ Correct answer
- DSUM
✓ Correct answer: MAX
Full explanation
The MAX function returns the largest value in a column, while MIN returns the smallest.
Computer ScienceSQL PPSCID: LTP-7783
In SQL, a subquery is best described as:
- AA deleted query
- BA printed report
- CA database backup
- DA query nested inside another query ✓ Correct answer
✓ Correct answer: A query nested inside another query
Full explanation
A subquery is a query nested inside another query, and its result is used by the outer query.
Computer ScienceSQL PPSCID: LTP-7784
In SQL, the AS keyword is used to:
- AGive a column or table an alias ✓ Correct answer
- BDelete a column
- CSort the results
- DCreate a database
✓ Correct answer: Give a column or table an alias
Full explanation
The AS keyword is used to give a column or table an alias, a temporary name used in the result of the query.
Computer ScienceSQL PPSCID: LTP-7785
In Oracle, the DUAL table is best described as:
- AA table with all user data
- BA one-row dummy table used for calculations ✓ Correct answer
- CA backup table
- DA table of passwords
✓ Correct answer: A one-row dummy table used for calculations
Full explanation
In Oracle the DUAL table is a one-row dummy table used for calculations and for selecting values such as SYSDATE.
Computer ScienceSQL PPSCID: LTP-7786
In Oracle, which function returns the current date and time of the database server?
- ATODAY
- BNOW
- CSYSDATE ✓ Correct answer
- DCURDATE
✓ Correct answer: SYSDATE
Full explanation
In Oracle the SYSDATE function returns the current date and time of the database server.
Computer ScienceSQL PPSCID: LTP-7787
In Oracle, the NVL function is used to:
- ADelete NULL rows
- BCount NULL values
- CSort NULL values first
- DReplace a NULL value with a given value ✓ Correct answer
✓ Correct answer: Replace a NULL value with a given value
Full explanation
In Oracle the NVL function is used to replace a NULL value with a given value, so NVL(salary, 0) gives 0 when salary is NULL.
Computer ScienceSQL PPSCID: LTP-7788
In Oracle, a sequence is used mainly to:
- AGenerate unique numbers automatically ✓ Correct answer
- BStore pictures
- CPrint reports
- DEncrypt data
✓ Correct answer: Generate unique numbers automatically
Full explanation
In Oracle a sequence is used to generate unique numbers automatically, often for primary key values with NEXTVAL.
Computer ScienceSQL PPSCID: LTP-7789
In Oracle, which data type is used for variable-length character strings?
- ANUMBER
- BVARCHAR2 ✓ Correct answer
- CDATE
- DCLOB
✓ Correct answer: VARCHAR2
Full explanation
In Oracle the VARCHAR2 data type is used for variable-length character strings, such as names and addresses.
Computer ScienceSQL PPSCID: LTP-7790
In Oracle, the NUMBER data type is used to store:
- APictures only
- BDates only
- CNumeric values ✓ Correct answer
- DLong text only
✓ Correct answer: Numeric values
Full explanation
In Oracle the NUMBER data type is used to store numeric values, including integers and decimals.
Computer ScienceSQL PPSCID: LTP-7791
In SQL, which clause joins tables by matching values in a specified column?
- AWHERE ONLY
- BBY
- CWITH
- DON ✓ Correct answer
✓ Correct answer: ON
Full explanation
The ON clause joins tables by matching values in a specified column, as in JOIN ... ON employees.dept_id = departments.id.
Computer ScienceSQL PPSCID: LTP-7792
In SQL, UNION ALL differs from UNION because UNION ALL:
- AKeeps duplicate rows ✓ Correct answer
- BRemoves duplicate rows
- CDeletes the tables
- DSorts in reverse
✓ Correct answer: Keeps duplicate rows
Full explanation
UNION ALL keeps duplicate rows when combining two query results, while UNION removes them.
Computer ScienceSQL PPSCID: LTP-7793
In Oracle, the TO_CHAR function is used to:
- ADelete a table
- BConvert a date or number to text ✓ Correct answer
- CCount rows
- DCreate an index
✓ Correct answer: Convert a date or number to text
Full explanation
In Oracle the TO_CHAR function is used to convert a date or number to text, for example formatting a date as DD-MON-YYYY.
Computer ScienceSQL PPSCID: LTP-7794
In SQL, which statement creates a table with a primary key on the id column?
- ASELECT TABLE students (id)
- BDROP TABLE students (id)
- CCREATE TABLE students (id NUMBER PRIMARY KEY, name VARCHAR2(50)) ✓ Correct answer
- DUPDATE TABLE students (id)
✓ Correct answer: CREATE TABLE students (id NUMBER PRIMARY KEY, name VARCHAR2(50))
Full explanation
The statement CREATE TABLE students (id NUMBER PRIMARY KEY, name VARCHAR2(50)) creates a table with a primary key on the id column.
Computer ScienceSoftware PPSCID: LTP-7795
The Rapid Application Development (RAD) model is best known for:
- ASlow manual coding
- BNo user involvement
- COnly hardware design
- DFast development using prototypes and user feedback ✓ Correct answer
✓ Correct answer: Fast development using prototypes and user feedback
Full explanation
The Rapid Application Development model is known for fast development using prototypes and user feedback in short cycles.
Computer ScienceSoftware PPSCID: LTP-7796
In the V-model of software development, each development phase is paired with:
- AA matching testing phase ✓ Correct answer
- BA marketing phase
- CA sales phase
- DA holiday
✓ Correct answer: A matching testing phase
Full explanation
In the V-model each development phase is paired with a matching testing phase, so testing is planned alongside development.
Computer ScienceSoftware PPSCID: LTP-7797
The incremental model of software development delivers the system:
- AOnly after ten years
- BIn small working pieces over time ✓ Correct answer
- CAs a single printed book
- DWithout any testing
✓ Correct answer: In small working pieces over time
Full explanation
The incremental model delivers the system in small working pieces over time, adding more features in each increment.
Computer ScienceSoftware PPSCID: LTP-7798
Alpha testing is testing carried out:
- ABy customers after release
- BOnly on hardware
- CBy the developers at the development site ✓ Correct answer
- DOnly on paper
✓ Correct answer: By the developers at the development site
Full explanation
Alpha testing is carried out by the developers at the development site before the software is released to users.
Computer ScienceSoftware PPSCID: LTP-7799
Beta testing is testing carried out by:
- AOnly the project manager
- BOnly the printer
- CNo one at all
- DSelected real users outside the company ✓ Correct answer
✓ Correct answer: Selected real users outside the company
Full explanation
Beta testing is carried out by selected real users outside the company, who try the software before its final release.
Computer ScienceSoftware PPSCID: LTP-7800
Regression testing is done mainly to check that:
- ANew changes have not broken existing features ✓ Correct answer
- BThe software is printed correctly
- CThe price is right
- DThe logo looks good
✓ Correct answer: New changes have not broken existing features
Full explanation
Regression testing checks that new changes have not broken existing features, by re-running earlier tests.
Computer ScienceSoftware PPSCID: LTP-7801
Integration testing checks:
- AA single line of code only
- BHow modules work together ✓ Correct answer
- CThe colour of the screen
- DThe weight of the computer
✓ Correct answer: How modules work together
Full explanation
Integration testing checks how modules work together after they are combined into larger parts of the system.
Computer ScienceSoftware PPSCID: LTP-7802
Acceptance testing is carried out to decide whether the software:
- AIs the cheapest product
- BHas the best logo
- CMeets the users requirements and can be accepted ✓ Correct answer
- DRuns on the moon
✓ Correct answer: Meets the users requirements and can be accepted
Full explanation
Acceptance testing decides whether the software meets the users requirements and can be accepted for delivery.
Computer ScienceSoftware PPSCID: LTP-7803
A feasibility study in a software project is carried out to decide whether the project is:
- AThe longest possible
- BPrinted in colour
- CSold abroad
- DPractical and worth doing ✓ Correct answer
✓ Correct answer: Practical and worth doing
Full explanation
A feasibility study decides whether the project is practical and worth doing, considering cost, technology and time.
Computer ScienceSoftware PPSCID: LTP-7804
In UML, a class diagram mainly shows:
- AClasses and their relationships ✓ Correct answer
- BThe speed of the network
- CThe price of hardware
- DThe names of users
✓ Correct answer: Classes and their relationships
Full explanation
A UML class diagram shows classes and their relationships, including attributes, methods and inheritance.
Computer ScienceOperating Systems PPSCID: LTP-7805
In an operating system, a process can be in which of the following states?
- AOnly sleeping
- BRunning, ready or waiting ✓ Correct answer
- COnly deleted
- DOnly printed
✓ Correct answer: Running, ready or waiting
Full explanation
A process can be in the running, ready or waiting states as the operating system schedules it on the CPU.
Computer ScienceOperating Systems PPSCID: LTP-7806
The Process Control Block (PCB) stores:
- AOnly the name of the user
- BOnly the printer settings
- CInformation about a process such as its state and registers ✓ Correct answer
- DThe weather forecast
✓ Correct answer: Information about a process such as its state and registers
Full explanation
The Process Control Block stores information about a process such as its state and registers, including its program counter.
Computer ScienceOperating Systems PPSCID: LTP-7807
Context switching is the process of:
- AChanging the monitor brightness
- BReplacing the keyboard
- CPrinting two pages at once
- DSaving one process state and loading another so the CPU can switch between them ✓ Correct answer
✓ Correct answer: Saving one process state and loading another so the CPU can switch between them
Full explanation
Context switching is the process of saving one process state and loading another so the CPU can switch between them.
Computer ScienceOperating Systems PPSCID: LTP-7808
A semaphore in an operating system is used for:
- ASynchronising processes and controlling access to shared resources ✓ Correct answer
- BDrawing pictures
- CStoring files
- DPlaying music
✓ Correct answer: Synchronising processes and controlling access to shared resources
Full explanation
A semaphore is used for synchronising processes and controlling access to shared resources, preventing two processes from using the same resource at once.
Computer ScienceOperating Systems PPSCID: LTP-7809
Thrashing in an operating system occurs when:
- AThe computer runs very fast
- BThe system spends most of its time swapping pages instead of doing useful work ✓ Correct answer
- CAll files are deleted
- DThe printer jams
✓ Correct answer: The system spends most of its time swapping pages instead of doing useful work
Full explanation
Thrashing occurs when the system spends most of its time swapping pages instead of doing useful work, because memory is overcommitted.
Computer ScienceOperating Systems PPSCID: LTP-7810
Internal fragmentation in memory management means:
- AA broken hard disk
- BA virus in memory
- CWasted space inside an allocated block ✓ Correct answer
- DA slow network
✓ Correct answer: Wasted space inside an allocated block
Full explanation
Internal fragmentation means wasted space inside an allocated block, when a block is larger than the process that uses it.
Computer ScienceOperating Systems PPSCID: LTP-7811
A page fault occurs when a program tries to access a page that is:
- ADeleted forever
- BOn the printer
- CIn another country
- DNot currently in main memory ✓ Correct answer
✓ Correct answer: Not currently in main memory
Full explanation
A page fault occurs when a program tries to access a page that is not currently in main memory, so it must be loaded from disk.
Computer ScienceOperating Systems PPSCID: LTP-7812
Shortest Job First (SJF) scheduling gives priority to the process with:
- AThe shortest burst time ✓ Correct answer
- BThe longest burst time
- CThe largest memory
- DThe oldest age
✓ Correct answer: The shortest burst time
Full explanation
Shortest Job First scheduling gives priority to the process with the shortest burst time, which reduces average waiting time.
Computer ScienceInternet PPSCID: LTP-7813
An Internet Service Provider (ISP) is a company that provides:
- APrinting services only
- BAccess to the Internet ✓ Correct answer
- CComputer hardware only
- DTelevision channels only
✓ Correct answer: Access to the Internet
Full explanation
An Internet Service Provider is a company that provides access to the Internet for homes and businesses.
Computer ScienceInternet PPSCID: LTP-7814
IPv6 addresses are how many bits long?
- A32 bits
- B64 bits
- C128 bits ✓ Correct answer
- D256 bits
✓ Correct answer: 128 bits
Full explanation
IPv6 addresses are 128 bits long, giving far more addresses than the 32-bit IPv4 addresses.
Computer ScienceInternet PPSCID: LTP-7815
POP3 is a protocol mainly used for:
- ASending email only
- BBrowsing the web
- CTransferring files by FTP
- DReceiving email from a mail server ✓ Correct answer
✓ Correct answer: Receiving email from a mail server
Full explanation
POP3 is a protocol used for receiving email from a mail server, downloading messages to the local computer.
Computer ScienceInternet PPSCID: LTP-7816
The domain extension .edu is mainly used for:
- AEducational institutions ✓ Correct answer
- BGovernment offices
- CCommercial companies
- DMilitary organisations
✓ Correct answer: Educational institutions
Full explanation
The domain extension .edu is mainly used for educational institutions such as universities and colleges.
Computer ScienceInternet PPSCID: LTP-7817
The domain extension .gov is mainly used for:
- ASchools only
- BGovernment organisations ✓ Correct answer
- COnline shops
- DPersonal blogs
✓ Correct answer: Government organisations
Full explanation
The domain extension .gov is mainly used for government organisations and departments.
Computer ScienceInternet PPSCID: LTP-7818
An intranet is best described as:
- AThe public Internet
- BA type of virus
- CA private network inside an organisation ✓ Correct answer
- DA satellite link
✓ Correct answer: A private network inside an organisation
Full explanation
An intranet is a private network inside an organisation, using internet technology but open only to its own staff.
Computer ScienceInternet PPSCID: LTP-7819
IPv4 addresses are how many bits long?
- A64 bits
- B128 bits
- C16 bits
- D32 bits ✓ Correct answer
✓ Correct answer: 32 bits
Full explanation
IPv4 addresses are 32 bits long, giving about four billion possible addresses, while IPv6 uses 128 bits.
EnglishVocabulary — Synonyms PPSCID: LTP-7820
Choose the word nearest in meaning to AMIABLE.
- AFriendly ✓ Correct answer
- BHostile
- CRude
- DCold
✓ Correct answer: Friendly
Full explanation
AMIABLE means pleasant and easy to like, so Friendly is nearest in meaning to AMIABLE.
EnglishVocabulary — Antonyms PPSCID: LTP-7821
Choose the word opposite in meaning to DILIGENT.
- AHardworking
- BLazy ✓ Correct answer
- CCareful
- DBusy
✓ Correct answer: Lazy
Full explanation
DILIGENT means working hard and carefully, so its opposite is Lazy, meaning unwilling to work.
EnglishSpelling PPSCID: LTP-7822
Choose the correctly spelt word.
- ASeperate
- BSeparete
- CSeparate ✓ Correct answer
- DSeprate
✓ Correct answer: Separate
Full explanation
The correctly spelt word is Separate, with the letter a after the p.
General KnowledgeCapitals, Currencies & Organisations PPSCID: LTP-7825
Brasilia replaced Rio de Janeiro as the capital of Brazil in which year?
- A1950
- B1960 ✓ Correct answer
- C1970
- D1945
✓ Correct answer: 1960
Full explanation
Brasilia replaced Rio de Janeiro as the capital of Brazil in 1960, when the new planned city was opened.
General KnowledgeBasic General Knowledge PPSCID: LTP-7827
Yuri Gagarin's historic space flight in 1961 lasted about how long?
- A60 minutes
- B24 hours
- C90 minutes
- D108 minutes ✓ Correct answer
✓ Correct answer: 108 minutes
Full explanation
Yuri Gagarin's historic space flight in 1961 lasted about 108 minutes, one orbit of the Earth.
General KnowledgeCapitals, Currencies & Organisations PPSCID: LTP-7828
The Saudi riyal is divided into how many halalas?
- A100 ✓ Correct answer
- B10
- C50
- D1000
✓ Correct answer: 100
Full explanation
One Saudi riyal is divided into 100 halalas, the smaller unit of Saudi currency.
Pakistan StudiesPakistan History PPSCID: LTP-7830
Defence Day marks the day in 1965 when Pakistan's armed forces defended which city against attack?
- AKarachi
- BIslamabad
- CLahore ✓ Correct answer
- DPeshawar
✓ Correct answer: Lahore
Full explanation
Defence Day marks 6 September 1965, when Pakistan's armed forces defended Lahore against attack.
Pakistan StudiesPakistan General Knowledge PPSCID: LTP-7831
Hafeez Jalandhari wrote the national anthem of Pakistan in which language?
- APersian ✓ Correct answer
- BArabic
- CEnglish
- DUrdu
✓ Correct answer: Persian
Full explanation
Hafeez Jalandhari wrote the national anthem of Pakistan in Persian, and it was adopted in 1954. Only one Urdu word, 'ka', appears in the anthem.
Pakistan StudiesPakistan General Knowledge PPSCID: LTP-7833
Khyber Pakhtunkhwa, the smallest province of Pakistan by area, was formerly known by which name?
- ANorthern Areas
- BNorth-West Frontier Province ✓ Correct answer
- CBalochistan
- DBahawalpur
✓ Correct answer: North-West Frontier Province
Full explanation
Khyber Pakhtunkhwa was formerly known as the North-West Frontier Province, until it was renamed in 2010.
Everyday ScienceEveryday Phenomena PPSCID: LTP-7838
Vitamin D helps the body absorb which mineral for strong bones?
- AIron
- BZinc
- CCalcium ✓ Correct answer
- DSodium
✓ Correct answer: Calcium
Full explanation
Vitamin D helps the body absorb Calcium, the mineral that makes bones and teeth strong.
IslamiatPillars of Islam PPSCID: LTP-7835
Zakat is the pillar of Islam that requires Muslims to:
- AFast every day
- BTravel every year
- CPray only at night
- DGive a share of their wealth to the needy ✓ Correct answer
✓ Correct answer: Give a share of their wealth to the needy
Full explanation
Zakat requires Muslims to give a share of their wealth to the needy, and it is one of the five pillars of Islam.