Showing 2321–2340 of 4795

Q2321.What will happen in the following C++ code? extern void display(); int main() { display(); }

Easy
A Program runs successfully
B Compile-time syntax error
C Undefined reference (linker error)
D Infinite loop
Computer Terminology PPSC

Correct Answer: C

The extern keyword declares a function without providing its definition. display() is called in main, but the compiler cannot find its actual implementation. Compilation passes the syntax check, but linking fails. The linker reports an undefined reference error.

Q2322.What is the issue in the following C++ function? void show(int x = 5, int y = 10)

Easy
A Default values are not allowed in functions
B Default parameters must be declared from right to left
C Parameters must be initialized to zero
D Function syntax is invalid
Computer Terminology PPSC

Correct Answer: B

In C++, default arguments must be assigned from right to left. If a parameter has a default value, all parameters to its right must also have defaults. The rule ensures unambiguous function calls.

Q2323.Determine the output of the following? JavaScript code: console.log(false == 0) console.log(false === 0)

Easy
A true, true
B false, false
C true, false
D false, true
Computer Terminology PPSC

Correct Answer: C

console.log(false == 0) prints true because '==' performs type coercion, and false coerces to 0, so 0 == 0 is true. console.log(false === 0) prints false because '===' checks both value and type, and a boolean is never strictly equal to a number.

Q2324.A variable starts at 0 and is incremented by +2 each time. It should not exceed 10. How many iterations are required?

Easy
A 4
B 5
C 6
D 10
Computer Terminology PPSC

Correct Answer: B

Start value = 0. Increment by +2 each time. Iterations: 1 -> 2; 2 -> 4; 3 -> 6; 4 -> 8; 5 -> 10. After 5 iterations, value reaches 10 (limit). It should not exceed 10, so we stop here. Total iterations = 5.

Q2325.Which loop is used to retrieve the first true condition and then stops?

Easy
A for loop
B while loop
C do-while loop
D if statement
Computer Terminology PPSC

Correct Answer: D

An if statement checks a condition and executes once if it is true. It does not loop repeatedly, unlike for, while, or do-while loops. It effectively stops after the first true condition is evaluated.

Q2326.Determine the output of the program: int x = 0; while (x < 5) { x += 2; } cout << x;

Easy
A 4
B 5
C 6
D 7
Computer Basics PPSC

Correct Answer: C

Initial value: x = 0. Loop runs while x < 5. Iterations: 1st: x = 0 + 2 = 2. 2nd: x = 2 + 2 = 4. 3rd: x = 4 + 2 = 6. Now x = 6, condition x < 5 becomes false, loop stops. Final value printed is 6.

Q2327.If systems are overloaded with data, what is the safest action to prevent a crash?

Easy
A System shutdown
B Turn firewall off
C Switch off power abruptly
D Implement load balancing or throttling
Computer Networks PPSC

Correct Answer: D

Load balancing distributes incoming data across multiple systems to reduce overload. Throttling limits the rate of incoming requests to keep the system stable. These methods help prevent crashes while keeping services running.

Q2328.Which protocol is connectionless?

Easy
A TCP
B UDP
C FTP
D HTTP
Internet & Web PPSC

Correct Answer: B

UDP (User Datagram Protocol) is a connectionless protocol. It sends data without establishing a connection between sender and receiver. UDP is faster but less reliable than TCP. TCP is connection-oriented and ensures data delivery.

Q2329.Given syntax is correct but output/error shows "video can't be played". Likely cause?

Easy
A Browser does not support the video format
B Code syntax error
C Operating system issue
D Video file missing
Computer Terminology PPSC

Correct Answer: A

The syntax is already correct, so the issue is not in the code. Browsers support only certain formats like MP4, WebM, or OGG.

Q2330.In a monolithic network architecture, what is true?

Easy
A All devices connect through a single central switch or hub
B Each device has independent connections
C Devices are isolated
D Network has no central management
Computer Networks PPSC

Correct Answer: A

A monolithic network architecture typically connects all devices to a single, central switch or hub, centralizing traffic and management but introducing a single point of failure.

Q2331.Snippet: System.out.println("Hello World")?

Easy
A C++
B Python
C Java
D JavaScript
Computer Terminology PPSC

Correct Answer: C

System.out.println() is a Java statement used to print output to the console. C++ uses cout << "Hello World";. Python uses print("Hello World"). JavaScript uses console.log("Hello World");. This syntax is specific to Java's standard output system.

Q2332.Which security system only detects threats but does not take any action?

Easy
A Intrusion Detection System (IDS)
B Intrusion Prevention System (IPS)
C Antivirus with firewall
D Firewall
Computer Security PPSC

Correct Answer: A

An IDS monitors network or system activities to detect potential threats. It does not block or prevent attacks; it only alerts administrators. An IPS (Intrusion Prevention System) can take action to stop threats. Antivirus and firewalls actively block or remove malicious activity.

Q2333.Which program/code corresponds to Pandas library in Python?

Easy
A import pandas as pd
B import numpy as np
C import matplotlib.pyplot as plt
D import sklearn as sk
Computer Terminology PPSC

Correct Answer: A

Pandas is a Python library for data manipulation and analysis. The standard import statement is: import pandas as pd. NumPy is for numerical computations, Matplotlib is for data visualization, and Scikit-learn is for machine learning.

Q2334.What does data redundancy refer to?

Easy
A Storing the same data in multiple places within a system
B Increasing the speed of data retrieval
C Encrypting data for security
D Removing unnecessary data from a system
Computer Basics PPSC

Correct Answer: A

Data redundancy occurs when the same piece of data is stored in more than one location. It often happens in databases or storage systems. Redundant data can waste storage space and increase the risk of inconsistencies.

Q2335.BIOS is used for?

Easy
A Updating system information on network
B Loading system
C It helps in routing
D It takes inputs from keywords and other devices
Computer Networks PPSC

Correct Answer: B

BIOS (Basic Input/Output System) is firmware that starts up the computer. It initializes hardware like CPU, memory, and storage when the computer is powered on. BIOS loads the operating system from the hard drive into memory. It also provides basic communication between the OS and hardware devices.

Q2336.Which symbols in a Use Case Diagram represent the start and end of a process?

Easy
A Oval
B Rectangle
C Circle
D Rounded rectangle or filled circle
Computer Basics PPSC

Correct Answer: D

In Use Case Diagrams or Activity Diagrams, the start of a process is shown with a filled circle. The end of a process is represented by a filled circle inside another circle (final node). Ovals represent use cases, and rectangles are typically used for system boundaries.

Q2337.In set theory, what does the * symbol represent in the context of Cartesian products?

Easy
A Union of sets
B Intersection of sets
C Multiplication of sets
D Cartesian product of two sets
General MCQs PPSC

Correct Answer: D

In set theory, the Cartesian product of two sets A and B is written as A x B (sometimes represented with * in programming contexts). It produces a set of all ordered pairs (a, b) where a belongs to A and b belongs to B.

Q2338.In a Use Case Diagram, what is the purpose of the oval symbol?

Easy
A Represents the start of a process
B Represents an actor
C Represents a use case or functionality
D Represents the end of a process
Computer Basics PPSC

Correct Answer: C

In a Use Case Diagram, an oval denotes a use case, which is a specific functionality of the system. Actors (users or external systems) are represented by stick figures.

Q2339.In NLP, the sentence "He has duck" can create ambiguity. What is the issue here?

Easy
A Grammar is correct and unambiguous
B Lexical ambiguity - "duck" could be a noun or verb
C Spelling mistake
D Semantic ambiguity about "he"
Computer Basics PPSC

Correct Answer: B

Lexical ambiguity occurs when a word has multiple meanings. In "He has duck," "duck" could be a noun (the bird) or a verb (to lower the head quickly). The sentence is grammatically correct but unclear in meaning.

Q2340.What is the main difference between malware and ransomware?

Easy
A Malware only affects hardware; ransomware affects software
B Malware is malicious software; ransomware encrypts files and demands payment
C Malware requires payment; ransomware does not
D They are identical
Computer Security PPSC

Correct Answer: B

Malware is any software designed to harm or exploit a computer system. Ransomware is a type of malware that encrypts files and demands payment to unlock them. Not all malware is ransomware.