Showing 3961–3980 of 4795

Q3961.What will be the output of the following python code? a= {1, 2, 3} b= {4, 5} c= a + b print (c)

Easy
A Error
B [5, 7]
C [1, 2, 3, 4, 5]
D [1, 2, 3], [4, 5]
Computer Terminology PPSC

Correct Answer: A

In Python, the '+' operator is not supported for set union operations; attempting to add two sets directly raises a TypeError.

Q3962.What is the purpose of intermediate code generation in a compiler?

Easy
A To perform lexical analysis
B To produce machine code directly
C To provide a platform-independent representation of the source code
D None of these
Computer Terminology PPSC

Correct Answer: C

Intermediate code generation provides a platform-independent, intermediate representation of source code, making cross-platform compilation easier.

Q3963.Which type of software development methodology focuses on iterative development and continous feedback?

Easy
A Agile Methodology
B Waterfall Model
C Spiral Model
D None of these
General MCQs PPSC

Correct Answer: A

Agile methodologies focus on iterative, incremental development cycles (sprints) coupled with continuous feedback and collaboration.

Q3964.What is the significance of system uptime for a Senior Computer Operator?

Easy
A The time taken to boot up a system
B The time when the system was last updated
C The total operational time of a system without interruption
D None of these
General MCQs PPSC

Correct Answer: C

Uptime represents the total continuous duration a system has remained fully operational and online without any interruptions or crashes.

Q3965.In the context of software design patterns, what does the Singleton pattern ensure?

Easy
A A class can be subclassed only once
B A class has only one instance and provides a global point of access to it
C A class can be instantiated only once per thread
D None of these
General MCQs PPSC

Correct Answer: B

The Singleton pattern restricts a class to exactly one instance throughout the application and provides a global entry point to that instance.

Q3966.Which of the following operations is typically more efficient in a linked list compared to an array?

Easy
A Accessing the middle element
B Accessing an element by index
C Inserting an element at the beginning
D None of these
Computer Terminology PPSC

Correct Answer: C

Inserting an element at the beginning of a linked list is a constant-time O(1) operation because it only requires pointer updates, unlike an array which takes O(n) due to shifting.

Q3967.Which data structure would you use to evaluate an expression given in postfix notation?

Easy
A Stack
B Binary Tree
C Queue
D None of these
Computer Terminology PPSC

Correct Answer: A

A Stack data structure evaluates postfix expressions efficiently by pushing operands and popping them as operators are encountered.

Q3968.What is the output of the following C code? int main () { int x = 5; printf("%d\n", x++); return 0; }

Easy
A Undefeated behavior
B 0
C 5
D None of these
Computer Basics PPSC

Correct Answer: C

The postfix increment operator (x++) evaluates to the current value of x (which is 5) before incrementing x to 6.

Q3969.Which of the following is a cloud deployment model?

Easy
A Network cloud
B Open cloud
C Private cloud
D None of these
Computer Networks PPSC

Correct Answer: C

Private cloud is a deployment model where cloud infrastructure is dedicated exclusively to a single organization.

Q3970.Which of the following is a characteristic of a non-clustered index?

Easy
A It cannot be created on a table with a clustered index
B The physical order of rows is different from the index order
C The physical order of rows is same from the index order
D None of these
Computer Basics PPSC

Correct Answer: B

A non-clustered index creates a separate logical lookup structure containing pointers, so the physical order of data rows does not match the index order.

Q3971.Which traversal algorithm is used in the breadth-first search (BFS) of a graph?

Easy
A Level-order traversal
B Post-order traversal
C Pre-order traversal
D None of these
Computer Terminology PPSC

Correct Answer: A

BFS processes nodes level-by-level, which corresponds directly to level-order traversal (using a queue).

Q3972.In a multi-user environment, what is a common method to ensure fair CPU time allocation among users?

Easy
A Priority Scheduling
B Shortest Job Next Scheduling
C Round Robin Scheduling
D None of these
Computer Basics PPSC

Correct Answer: C

Round Robin scheduling allocates fixed, rotating time quanta to each user/process, ensuring fair time-sharing and preventing CPU monopolization.

Q3973.In a JK flipflop, what happens if both J and K inputs are held high while the clock pulse is applied?

Easy
A The output toggles
B The output is reset to 0
C The output is set to 1
D None of these
Computer Basics PPSC

Correct Answer: A

In a JK flip-flop, holding both inputs high causes the output state to toggle (flip between 0 and 1) on each active clock pulse.

Q3974.Which type of attack involves tricking a user into providing sensitive information?

Easy
A DDoS
B Phishing
C SQL Injection
D None of these
Computer Terminology PPSC

Correct Answer: B

Phishing is a social-engineering cyberattack designed to deceive users into disclosing private credentials or sensitive details.

Q3975.In a multi-threaded environment, which of the following is true about thread synchronization?

Easy
A Thread synchronization is not necessary as threads do not share resources
B Synchronization is handled automatically by the operating system
C Thread synchronization used semaphores and mutexes to prevent race condition
D None of these
Computer Terminology PPSC

Correct Answer: C

In multi-threading, synchronization tools (like mutexes, semaphores, or locks) are used to protect shared memory and prevent race conditions.

Q3976.Which of the following is NOT a type of NoSQL database?

Easy
A Relational
B Key-Value
C Document
D None of these
Computer Terminology PPSC

Correct Answer: A

Relational databases (SQL) organize data into tables with schemas, which is fundamentally distinct from NoSQL storage models.

Q3977.Which service model is typically used for web hosting?

Easy
A IaaS
B PaaS
C Saas
D None of these
General MCQs PPSC

Correct Answer: B

PaaS (Platform as a Service) is commonly used for web hosting, providing the runtime environment and libraries while abstracting hardware management.

Q3978.Which of the following is not a private IP address range according to RFC 1918?

Easy
A 172.16.0.0 - 172.31.255.255
B 192.168.0.0 - 192.168.255.255
C 169.254.0.0 - 169.254.255.255
D None of these
Computer Networks PPSC

Correct Answer: C

The range 169.254.0.0/16 is reserved for Link-Local/APIPA (Automatic Private IP Addressing) and is not a private network range specified in RFC 1918.

Q3979.Convert the hexadecimal number 1A3 to binary?

Easy
A 110100011
B 110100001
C 100100011
D None of these
General MCQs PPSC

Correct Answer: A

Converting hexadecimal 1A3 to binary gives: 1 -> 0001, A -> 1010, 3 -> 0011. Concatenating these results in binary 110100011.

Q3980.What is a "Kernel Panic" in the context of operating systems?

Easy
A A sudden loss of network connectivity
B A failure in data synchronization
C A system crash caused by critical errors in the OS kernel
D None of these
Computer Terminology PPSC

Correct Answer: C

A Kernel Panic is a safety measure taken by an operating system's kernel upon encountering a fatal error from which it cannot safely recover, resulting in a system crash.