Search Previous Year Questions

Find real questions from previous competitive exam papers with answers and solutions.

Leave the keyword blank to browse saved questions for your selected exam, newest papers first. Add a keyword, year or topic to narrow the results.

Browse complete papers
Showing 10 question(s)
Clear

Question 11

UP police programmer Grade 2 2013• Part 1: Information Technology

Which one of the following is not a shell ?

  1. AOption (a)

    sh

  2. BOption (b)

    csh

  3. COption (c)

    ksh

  4. DOption (d)

    gnomes

View answer & explanation

Correct answer

Answer: (d)D.

gnomes

Why this answer is correct

The correct answer is gnomes

Key Points

  • sh (Bourne Shell): ✅ The Bourne shell (sh) is one of the original Unix command-line interfaces and is widely used as a shell in Unix-like systems.
  • csh (C Shell): ✅ The C shell (csh) is a Unix shell developed for programming and scripting, providing features like history substitution and aliases.
  • ksh (Korn Shell): ✅ The Korn shell (ksh) is an enhanced Unix shell with features like scripting capabilities and improved user interaction.
  • gnomes: ❌ "Gnomes" is not a shell; it refers to GNOME (GNU Network Object Model Environment), which is a graphical desktop environment for Unix-based systems, not a shell.

Additional Information

  • Shell: A shell is a command-line interpreter that allows users to interact with the operating system by executing commands.
  • GNOME: GNOME is a desktop environment and not a shell. It provides graphical user interfaces for interacting with a computer system.
  • Usage: Shells like sh, csh, and ksh are commonly used for scripting and command-line tasks, whereas GNOME is used for graphical user interactions.

Hence, the correct answer is: option 4) gnomes

Question 12

UP police programmer Grade 2 2013• Part 1: Information Technology

The number of Full and Half adders required to add 32-bit numbers is 

  1. AOption (a)

    16 half adders and 16 Full adders

  2. BOption (b)

    1 Half adder and 31 Full adders

  3. COption (c)

    32 Half adders and 0 Full adders

  4. DOption (d)

    8 Half adders and 24 Full adders

View answer & explanation

Correct answer

Answer: (b)B.

1 Half adder and 31 Full adders

Why this answer is correct

The correct answer is option 2) 1 Half adder and 31 Full adders

Key Points

  • To add two binary numbers, we start from the Least Significant Bit (LSB) and move to the Most Significant Bit (MSB).
  • Half Adder: Can add two single bits (but no carry input).
  • Full Adder: Can add two bits and a carry from the previous stage.
  • For 32-bit numbers:
  • At the LSB position (first bit), there is no carry-in → so we use 1 Half Adder.
  • For the remaining 31 bits, we must consider carry-in → so we use 31 Full Adders.

Additional Information

  • Half adders are simpler but cannot handle carry propagation, which is essential in multi-bit addition.
  • This design is common in binary adders in ALUs (Arithmetic Logic Units).
  • To add n-bit numbers:

→ 1 Half Adder + (n−1) Full Adders

Hence, the correct answer is: option 2) 1 Half adder and 31 Full adders

Question 13

UP police programmer Grade 2 2013• Part 1: Information Technology

Which are the following specify types of partition in UNIX ?

i) ntfs

ii) ext2

iii) swap

iv) fat

  1. AOption (a)

    i) & ii) 

  2. BOption (b)

     ii) & iii)

  3. COption (c)

    iii) & iv)

  4. DOption (d)

     i) & iv)

View answer & explanation

Correct answer

Answer: (b)B.

 ii) & iii)

Why this answer is correct

The correct answer is option 2

Key Points

  • ext2: ✅ This is a file system type in UNIX/Linux operating systems. It stands for the "Second Extended File System". It is commonly used for disk partitions.
  • swap: ✅ This is another type of partition in UNIX/Linux. It is used as virtual memory (a space on the disk that acts as RAM when the system is out of physical memory).
  • ntfs: ❌ This is a file system type used in Windows operating systems. It is not a UNIX partition type.
  • fat: ❌ This stands for File Allocation Table, which is another file system type primarily used in Windows and external storage devices. It is not a UNIX partition type.

Additional Information

  • ext2: The ext2 file system is widely used in UNIX/Linux systems for regular data storage. It does not support journaling but is efficient for smaller partitions.
  • swap: The swap partition is crucial for systems with limited physical memory. It allows the system to "swap out" inactive data from RAM to disk, ensuring better performance.

Hence, the correct answer is: option 2) ii) & iii)

Question 14

UP police programmer Grade 2 2013• Part 1: Information Technology

Module cohesion may not be of the following type: 

  1. AOption (a)

    Logical 

  2. BOption (b)

    Procedural

  3. COption (c)

    Relational

  4. DOption (d)

    Functional

View answer & explanation

Correct answer

Answer: (c)C.

Relational

Why this answer is correct

The correct answer is : option 3

Key Points Module cohesion refers to how closely the responsibilities of a module are related to each other. High cohesion is desirable as it means the module focuses on a single task or a set of closely related tasks.

Common types of cohesion (from best to worst) include:

  1. Functional cohesion: All parts of the module contribute to a single well-defined task. (Best)
  2. Sequential cohesion: Output from one part is input to another.
  3. Communicational cohesion: Parts operate on the same data.
  4. Procedural cohesion: Parts are related by sequence of steps (e.g., a procedure).
  5. Temporal cohesion: Parts are related by timing (e.g., initialization).
  6. Logical cohesion: Parts are logically categorized (e.g., all input handlers).
  7. Coincidental cohesion: Parts are unrelated (worst).

Now, evaluating the options:

  • Option 1: Logical cohesion: This is a valid type (though low cohesion).
  • Option 2: Procedural cohesion: This is a valid type.
  • Option 3: Relational cohesion: This is not a standard type of cohesion. The standard types include functional, sequential, communicational, procedural, temporal, logical, and coincidental. "Relational" is not recognized in software engineering as a cohesion type.
  • Option 4: Functional cohesion: This is a valid (and the best) type.

Therefore, relational cohesion (option 3) is not a standard type of module cohesion.

Question 15

UP police programmer Grade 2 2013• Part 1: Information Technology

A use case is initiated by: 

  1. AOption (a)

    Director 

  2. BOption (b)

    Producer

  3. COption (c)

    Actor

  4. DOption (d)

    Distributer

View answer & explanation

Correct answer

Answer: (c)C.

Actor

Why this answer is correct

The correct answer is Actor

Key Points

  • Actor: ✅ An actor is a user or an external system that interacts with a system to achieve a specific goal. Use cases are initiated by actors because they represent the entities that trigger and interact with the system's functionality.
  • Director: ❌ A director is not involved in initiating use cases; they are typically associated with organizational roles or film production, not system interaction.
  • Producer: ❌ A producer does not initiate a use case; they are unrelated to the concept of actors in system design.
  • Distributor: ❌ Distributors do not initiate use cases; their roles are not relevant to system interaction.

Additional Information

  • Definition: A use case describes how an actor interacts with a system to achieve a specific goal. It focuses on the system's functionality from the user's perspective.
  • Examples: Actors can be human users, external systems, or devices interacting with the system.

Hence, the correct answer is: option 3) Actor

Question 16

UP police programmer Grade 2 2013• Part 1: Information Technology

The focus of the validation testing is 

  1. AOption (a)

    To uncover places that a user will be able to observe failure of the Software to confirm to requirements 

  2. BOption (b)

    To remove all the errors

  3. COption (c)

    To remove errors phase wise

  4. DOption (d)

    No

View answer & explanation

Correct answer

Answer: (a)A.

To uncover places that a user will be able to observe failure of the Software to confirm to requirements 

Why this answer is correct

The correct answer is Option 1

Key Points

  • Validation Testing: Validation testing is a type of software testing that ensures the software meets the business requirements and provides the intended behavior. Its primary focus is to identify whether the software conforms to the user’s needs and requirements.
  • Uncovering Failures: The goal of validation testing is to uncover places where the user will observe failures of the software to conform to the specified requirements. This ensures that the software behaves as expected in real-world scenarios.
  • Error Removal: While error removal is important in other phases of software development (e.g., debugging and unit testing), the focus of validation testing is specifically on identifying mismatches between the software and the user's requirements rather than removing all errors.

Additional Information

  • Phase-wise Error Removal: Removing errors phase-wise is part of the software development lifecycle (e.g., during unit testing, integration testing, etc.), but this is not the focus of validation testing.
  • Validation vs. Verification: Validation ensures "you built the right thing," while verification ensures "you built it right." Validation focuses on user requirements, while verification checks compliance with design specifications.

Hence, the correct answer is: Option 1) To uncover places that a user will be able to observe failure of the Software to confirm to requirements

Question 17

UP police programmer Grade 2 2013• Part 1: Information Technology

________ representation requires the least number of bits to store the number +255.

  1. AOption (a)

    BCD 

  2. BOption (b)

    2’s complement

  3. COption (c)

    Signed binary 

  4. DOption (d)

    Unsigned binary

View answer & explanation

Correct answer

Answer: (d)D.

Unsigned binary

Why this answer is correct

The correct answer is: Unsigned binary

Key Points

  • Unsigned binary: ✅ Unsigned binary representation is the most efficient way to represent non-negative integers. It uses the least number of bits because it does not require any additional bit for sign representation.
  • BCD (Binary-Coded Decimal): ❌ In BCD, each decimal digit is represented by a 4-bit binary number. To represent the number 255 in BCD, you would need 12 bits (4 bits for each digit: "2", "5", and "5").
  • 2’s complement: ❌ 2’s complement is primarily used for representing signed integers. To store +255, you would need an extra bit for the sign, requiring 9 bits.
  • Signed binary: ❌ Signed binary representation also requires an extra bit for the sign, resulting in 9 bits for +255.

Additional Information

  • Unsigned binary: The number +255 in unsigned binary is represented as "11111111" (8 bits).
  • Efficiency: Unsigned binary is the most space-efficient representation for non-negative integers because it does not allocate a bit for the sign.

Hence, the correct answer is: option 4) Unsigned binary.

Question 18

UP police programmer Grade 2 2013• Part 1: Information Technology

Using Bubble Sort in how many passes number 9 would be in its place for the given sequence ?

20 1 7 9 30 45 10

  1. AOption (a)

    4

  2. BOption (b)

    3

  3. COption (c)

    2

  4. DOption (d)

    1

View answer & explanation

Correct answer

Answer: (a)A.

4

Why this answer is correct

The correct answer is option 1 (4)

Key Points

  • Bubble Sort: Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. This process is repeated until the list is sorted.
  • Pass: In each pass, the largest unsorted element "bubbles up" to its correct position in the array.

Here is the step-by-step explanation for the given sequence:

Initial Sequence: 20, 1, 7, 9, 30, 45, 10

We need to determine how many passes it will take for the number 9 to reach its correct position using Bubble Sort.

  1. Pass 1:
  • Compare 20 and 1 → Swap → Sequence: 1, 20, 7, 9, 30, 45, 10
  • Compare 20 and 7 → Swap → Sequence: 1, 7, 20, 9, 30, 45, 10
  • Compare 20 and 9 → Swap → Sequence: 1, 7, 9, 20, 30, 45, 10
  • Compare 20 and 30 → No swap → Sequence: 1, 7, 9, 20, 30, 45, 10
  • Compare 30 and 45 → No swap → Sequence: 1, 7, 9, 20, 30, 45, 10
  • Compare 45 and 10 → Swap → Sequence: 1, 7, 9, 20, 30, 10, 45
  1. Pass 2:
  • Compare 1 and 7 → No swap → Sequence: 1, 7, 9, 20, 30, 10, 45
  • Compare 7 and 9 → No swap → Sequence: 1, 7, 9, 20, 30, 10, 45
  • Compare 9 and 20 → No swap → Sequence: 1, 7, 9, 20, 30, 10, 45
  • Compare 20 and 30 → No swap → Sequence: 1, 7, 9, 20, 30, 10, 45
  • Compare 30 and 10 → Swap → Sequence: 1, 7, 9, 20, 10, 30, 45
  1. Pass 3:
  • Compare 1 and 7 → No swap → Sequence: 1, 7, 9, 20, 10, 30, 45
  • Compare 7 and 9 → No swap → Sequence: 1, 7, 9, 20, 10, 30, 45
  • Compare 9 and 20 → No swap → Sequence: 1, 7, 9, 20, 10, 30, 45
  • Compare 20 and 10 → Swap → Sequence: 1, 7, 9, 10, 20, 30, 45
  1. Pass 4:
  • Compare 1 and 7 → No swap → Sequence: 1, 7, 9, 10, 20, 30, 45
  • Compare 7 and 9 → No swap → Sequence: 1, 7, 9, 10, 20, 30, 45
  • Compare 9 and 10 → No swap → Sequence: 1, 7, 9, 10, 20, 30, 45

After 4 passes, the number 9 is in its correct position.

Additional Information

  • Bubble Sort is not the most efficient sorting algorithm for large datasets, but it is easy to understand and implement.
  • Time complexity of Bubble Sort is O(n²) in the worst case.

Hence, the correct answer is: option 1 (4)

Question 19

UP police programmer Grade 2 2013• Part 1: Information Technology

The combinational circuit in the following figure can be replaced by a single

  1. AOption (a)

    OR gate

  2. BOption (b)

    XOR gate

  3. COption (c)

    NOR gate

  4. DOption (d)

     AND gate

View answer & explanation

Correct answer

Answer: (a)A.

OR gate

Why this answer is correct

The correct answer is option 1.

Let's assume two inputs be X and Y.

and the output is Z.

\(Z=\overline{\overline{X}\space .{\overline{Y}}}\)

Using De-Morgan's Law:

\(Z=\overline{\overline{X}}\space +\overline{{{\overline{Y}}}}\)

\(Z = X+Y\)

This clearly shows it is an OR gate.

Question 20

UP police programmer Grade 2 2013• Part 1: Information Technology

Which of the following is the database management activity of coordinating the action of database manipulation processes that operate concurrently, access shared data and can potentially interfere with each other ?

  1. AOption (a)

    Concurrency management

  2. BOption (b)

    Database management

  3. COption (c)

    Transaction management

  4. DOption (d)

    Information management

View answer & explanation

Correct answer

Answer: (a)A.

Concurrency management

Why this answer is correct

The correct answer is Concurrency management

Key Points

  • Concurrency management: ✅ Concurrency management is a database management activity that ensures multiple database manipulation processes can operate simultaneously without conflicting with one another. It resolves potential issues such as data inconsistencies, deadlocks, and race conditions when multiple users or processes access shared data concurrently.
  • Database management: ❌ This is a broad term that encompasses all activities related to managing a database, including storage, retrieval, and security. It does not specifically address the coordination of concurrent operations.
  • Transaction management: ❌ This focuses on ensuring that database transactions are processed correctly and completely. While it overlaps with concurrency management, it does not specifically deal with coordinating concurrent processes.
  • Information management: ❌ This deals with the collection, storage, and distribution of information but does not address concurrency issues in databases.

Additional Information

  • Concurrency Issues: Without proper concurrency management, multiple processes can lead to problems like lost updates, dirty reads, and inconsistent data.
  • Techniques Used: Concurrency control techniques include locking, timestamping, and optimistic concurrency control to ensure database integrity and consistency.

Hence, the correct answer is: option 1) Concurrency management