Recent Posts

6/recent/ticker-posts

“200”, Aptitude Test Questions and Answers for ICT Officer II (Programmer) – NBS.

 


“200”, Aptitude Test Questions and Answers for ICT Officer II (Programmer) – NBS.

 

ABSTRACT

This book contains 200 multiple-choice questions and answers designed to help candidates prepare for the ICT Officer II (Programmer) aptitude test for the National Bureau of Statistics (NBS) conducted through the Public Service Recruitment Secretariat (PSRS) of Tanzania. The questions are designed to reflect the analytical, competency-based, and scenario-oriented nature of public service aptitude tests by assessing candidates’ understanding, logical reasoning, and ability to apply ICT knowledge in practical situations rather than relying on memorization. The content covers systems analysis and design, software development life cycle, programming concepts, object-oriented programming, software engineering principles, databases and SQL, software testing, system documentation, information security, algorithms, data structures, APIs, version control, software architecture, ICT maintenance, and professional ethics relevant to the duties of an ICT Officer II (Programmer). Each question is accompanied by the correct answer and a detailed rationale to strengthen conceptual understanding, reinforce learning, and improve candidates' confidence and readiness for the recruitment examination.

 

Prepared by: ICT Officer II (Programmer) – NBS.

Compiled by ICT Officer II (Programmer) – NBS.

Professionals stationed in Dar-es-salaam.

0628729934.

Date: July 19, 2026

 

Dear applicants,

This collection of questions and answers has been prepared to help all of you to understand the key areas tested during the interview. The goal is to provide a useful, and practical study guide so you can all perform confidently and fairly in the selection process. I wish you the best of luck, and may this resource support you in achieving success!

 

Warm regards,

Johnson Yesaya Mgelwa

 

For Personal Use by Applicants Preparing for ICT Officer II (Programmer) – National Bureau of Standards (NBS).

ALL QUESTIONS TOGETHER.

Question 1

An ICT Officer II (Programmer) at NBS is assigned to develop a new data collection system. Before writing any code, the officer meets users from several departments to determine exactly what the system should accomplish. What is the PRIMARY purpose of this activity?

A. To estimate the project budget only. B. To identify user requirements before system development. C. To prepare maintenance procedures after deployment. D. To verify network performance before implementation.

Answer: B. To identify user requirements before system development.

Rationale: Systems development begins with understanding what users actually need. Requirement gathering ensures the final system solves the intended business problem and reduces costly changes later. Budget estimation, maintenance planning, and network verification are important activities, but they occur at different stages of the project and cannot replace comprehensive requirements analysis.


Question 2

A programmer modifies a module without updating the corresponding system documentation. Several months later, another developer cannot understand the new logic and introduces errors while making further changes. Which software engineering principle was MOST directly violated?

A. Performance optimization. B. User authentication. C. Documentation consistency. D. Database normalization.

Answer: C. Documentation consistency.

Rationale: System documentation must always reflect the current implementation. When documentation is outdated, maintenance becomes difficult, increases the likelihood of introducing defects, and slows future development. Performance optimization, authentication, and normalization are unrelated to maintaining accurate technical documentation.


Question 3

During system analysis, users repeatedly request additional features after requirements have already been approved. If these requests continue without proper control, what project risk is MOST likely?

A. Scope creep. B. Data redundancy. C. Deadlock condition. D. Memory fragmentation.

Answer: A. Scope creep.

Rationale: Scope creep occurs when project requirements continue expanding without formal evaluation or approval. It often results in delays, increased costs, and missed deadlines. The remaining options describe unrelated technical issues affecting databases, operating systems, or concurrent computing rather than project management.


Question 4

A programmer is preparing a system flowchart. Which symbol should represent a decision where processing follows different paths depending on whether a condition is true or false?

A. Rectangle. B. Oval. C. Parallelogram. D. Diamond.

Answer: D. Diamond.

Rationale: The diamond symbol universally represents a decision point in system flowcharts. It allows the process to branch based on conditions such as Yes/No or True/False. Rectangles indicate processes, ovals represent start or end points, and parallelograms are used for input and output operations.


Question 5

An application successfully passes all individual module tests. The next step is to verify whether the modules interact correctly when combined. Which testing level should be performed?

A. Acceptance testing. B. Integration testing. C. Regression testing. D. Usability testing.

Answer: B. Integration testing.

Rationale: Integration testing focuses on verifying communication and interaction among individual software modules after unit testing has been completed. Acceptance testing determines whether the system satisfies users, regression testing checks for unintended effects after changes, and usability testing evaluates user experience rather than module interaction.


Question 6

A programmer discovers that different parts of an application perform exactly the same calculation using copied code. Which programming practice would BEST improve long-term maintainability?

A. Increase variable names. B. Replace comments with diagrams. C. Encapsulate the logic into a reusable function. D. Execute the calculation inside every module.

Answer: C. Encapsulate the logic into a reusable function.

Rationale: Reusable functions eliminate duplicated code, simplify maintenance, reduce inconsistencies, and improve software quality. If the calculation changes, only one function requires modification. Repeating the same logic throughout the application increases maintenance effort and the likelihood of inconsistent updates.


Question 7

A database table stores employee records using EmployeeID as a unique identifier. Why is EmployeeID preferred over employee names when establishing relationships with other tables?

A. Employee names require less storage. B. EmployeeID uniquely identifies each record. C. Employee names improve query speed automatically. D. EmployeeID prevents all database failures.

Answer: B. EmployeeID uniquely identifies each record.

Rationale: Primary keys uniquely identify each record and remain stable even when names change or duplicates exist. Names may not be unique and can change over time, making them unsuitable as relationship keys. Although indexing can improve performance, uniqueness—not storage or failure prevention—is the principal reason for using identifiers.


Question 8

A programmer notices that confidential statistical records are accessible to staff members who have no official responsibility for them. Which information security principle has MOST likely been violated?

A. Least privilege. B. High availability. C. Fault tolerance. D. Resource virtualization.

Answer: A. Least privilege.

Rationale: The principle of least privilege requires users to receive only the minimum permissions necessary to perform their duties. Granting unnecessary access increases the risk of unauthorized disclosure or misuse of sensitive information. Availability, fault tolerance, and virtualization address different aspects of system design.


Question 9

A software development team decides that every source code modification must be reviewed by another programmer before being merged into the main project. What is the PRIMARY objective of this practice?

A. Reduce electricity consumption. B. Increase processor utilization. C. Improve code quality and detect defects early. D. Eliminate the need for software testing.

Answer: C. Improve code quality and detect defects early.

Rationale: Peer code reviews identify logical errors, improve coding standards, encourage knowledge sharing, and detect defects before testing begins. Reviews complement rather than replace software testing. Their purpose is software quality improvement, not hardware performance or energy efficiency.


Question 10

During system analysis, an ICT Officer discovers that two departments use different definitions for the term "Active Household." If this inconsistency is not resolved before development begins, what is the MOST likely consequence?

A. Faster system implementation. B. Improved database performance. C. Different users may interpret reports differently. D. Automatic normalization of data.

Answer: C. Different users may interpret reports differently.

Rationale: Shared business terminology must be clearly defined during requirements analysis. Different interpretations of key terms can produce inconsistent reports, incorrect business decisions, and software that fails to satisfy stakeholder expectations. Establishing a common business vocabulary is therefore an essential part of systems analysis.


Question 11

A programmer changes one module to correct a reported defect. Before releasing the updated application, which testing activity is MOST important to ensure that existing functions still operate correctly?

A. Smoke testing only. B. Load testing only. C. Regression testing. D. Installation testing.

Answer: C. Regression testing.

Rationale: Regression testing verifies that recent changes have not unintentionally affected previously working functionality. Correcting one defect can introduce others, making regression testing an essential quality assurance practice. Smoke, load, and installation testing evaluate different aspects of software quality.


Question 12

During requirements analysis, two departments request conflicting system behaviors. What should the systems analyst do FIRST?

A. Implement both immediately. B. Ignore one department. C. Escalate directly for procurement. D. Clarify requirements with stakeholders.

Answer: D. Clarify requirements with stakeholders.

Rationale: Conflicting requirements should be resolved through consultation with stakeholders before development begins. Clarification ensures the system reflects agreed business needs and avoids expensive redesign later. Ignoring conflicts or implementing assumptions often leads to project failure.


Question 13

A programmer stores database connection details directly inside multiple source code files. Which software engineering concern is MOST likely to arise?

A. Difficult maintenance when configurations change. B. Improved modularity across the application. C. Reduced dependency between software modules. D. Automatic encryption of sensitive information.

Answer: A. Difficult maintenance when configurations change.

Rationale: Hardcoding configuration values creates maintenance problems because every occurrence must be updated whenever the configuration changes. External configuration files or environment variables improve flexibility and reduce maintenance effort. Hardcoding does not improve modularity or provide encryption.


Question 14

Which database operation retrieves records that satisfy specified conditions without modifying the stored data?

A. INSERT. B. UPDATE. C. SELECT. D. DELETE.

Answer: C. SELECT.

Rationale: The SQL SELECT statement retrieves information while leaving stored data unchanged. INSERT adds records, UPDATE modifies existing data, and DELETE removes records. Reading information without alteration is one of the most common database operations.


Question 15

A programmer receives reports that an application becomes slower as the database grows, although the program logic remains unchanged. Which action should be investigated FIRST?

A. Review database indexing strategy. B. Replace all variable names. C. Increase monitor brightness. D. Rewrite the operating system.

Answer: A. Review database indexing strategy.

Rationale: Poor indexing is a common cause of declining database performance as data volume increases. Appropriate indexes significantly reduce search time without changing application logic. The other options have little or no relationship to database query performance.


Question 16

A newly developed application is delivered to users, who evaluate whether it satisfies operational requirements before official deployment. Which testing stage is being performed?

A. Unit testing. B. Integration testing. C. Acceptance testing. D. Static analysis.

Answer: C. Acceptance testing.

Rationale: Acceptance testing determines whether the completed system meets user expectations and business requirements before implementation. Unit testing evaluates individual components, integration testing examines module interaction, and static analysis reviews code without execution.


Question 17

A programmer wants to reduce the possibility of invalid information being stored in the database. Which measure should be implemented closest to the point where data enters the system?

A. Memory defragmentation.  B. Screen resolution adjustment. C. Processor overclocking. D. Input validation. 

Answer: D. Input validation.

Rationale: Input validation checks data before processing or storage, ensuring accuracy, consistency, and compliance with business rules. Preventing invalid data at the point of entry is more effective than correcting it later. The remaining options relate to hardware rather than data quality.


Question 18

Which software development practice MOST directly supports tracking every modification made to program source code over time?

A. Version control system. B. Operating system scheduler. C. Network firewall. D. Disk partition manager.

Answer: A. Version control system.

Rationale: Version control systems maintain complete histories of source code changes, support collaboration, facilitate rollback, and help resolve conflicts between developers. Operating systems, firewalls, and partition managers perform entirely different functions.


Question 19

An ICT Officer performs routine cleaning and inspection of computer hardware to reduce the likelihood of unexpected equipment failure. This activity is BEST classified as:

A. Corrective maintenance. B. Preventive maintenance. C. Adaptive maintenance. D. Perfective maintenance.

Answer: B. Preventive maintenance.

Rationale: Preventive maintenance involves scheduled actions intended to reduce the probability of equipment failure before problems occur. Corrective maintenance repairs existing faults, adaptive maintenance accommodates environmental changes, and perfective maintenance improves existing functionality.


Question 20

A programmer discovers that two different users can accidentally overwrite each other's changes when editing the same record simultaneously. Which database concept is intended to prevent such inconsistencies?

A. Disk mirroring.   B. Data compression. C. Concurrency control.   D. File archiving.

Answer: C. Concurrency control.

Rationale: Concurrency control ensures multiple users can access shared data without causing conflicts or compromising database consistency. Locking and transaction management are common mechanisms. Compression, mirroring, and archiving address storage and backup rather than simultaneous access.


Question 21

A supervisor instructs an ICT Officer to bypass established Standard Operating Procedures (SOPs) simply to complete a task more quickly. What should the officer do?

A. Ignore documentation completely. B. Follow informal procedures permanently. C. Adhere to approved SOPs unless formally authorized otherwise. D. Modify the procedures independently.

Answer: C. Adhere to approved SOPs unless formally authorized otherwise.

Rationale: Public institutions rely on approved Standard Operating Procedures to ensure consistency, accountability, compliance, and quality. Deviating from them without proper authorization may compromise security, audit requirements, and operational integrity.


Question 22

A programmer notices that one software module performs several unrelated tasks, making it difficult to understand and maintain. Which software design principle is MOST relevant?

A. Single Responsibility Principle. B. First Come First Served. C. Round Robin Scheduling. D. Divide and Conquer Sorting.

Answer: A. Single Responsibility Principle.

Rationale: The Single Responsibility Principle states that each module should have one well-defined responsibility. This improves readability, testing, maintenance, and future modifications. The other options relate to scheduling or algorithms rather than software design principles.


Question 23

Before programmers begin implementing a new module, management requires a document describing how the software will be structured, including major components, interfaces, and data flow. Which document BEST satisfies this purpose?

A. User Manual. B. Software Design Document. C. Payroll Register. D. Attendance Sheet.

Answer: B. Software Design Document.

Rationale: A Software Design Document explains how the approved requirements will be implemented by describing the system architecture, modules, interfaces, data structures, and processing logic. Unlike a user manual, it serves as a technical guide for developers during implementation.


Question 24

A newly deployed statistical system must continue operating even if one database server fails unexpectedly. Which infrastructure capability MOST directly enables the system to continue operating with minimal interruption?

A. Failover mechanism. B. Data compression. C. File encryption. D. Screen resolution scaling.

Answer: A. Failover mechanism.

Rationale: A failover mechanism automatically transfers processing to a standby server when the primary server becomes unavailable, minimizing service interruption. It is a practical implementation used to achieve resilient and continuously available information systems.


Question 25

Before approving deployment of a newly developed statistical information system, management requests evidence that every documented requirement has been tested successfully. Which quality assurance technique BEST provides this evidence?

A. Code indentation review. B. Memory utilization report. C. Network topology diagram. D. Requirements traceability matrix.

Answer: D. Requirements traceability matrix.

Rationale: A Requirements Traceability Matrix (RTM) links every requirement to corresponding design elements, test cases, and test results. It demonstrates that all specified requirements have been verified before deployment, making it an essential quality assurance tool for large information systems such as those used by NBS.


Question 26

A programmer is reviewing a proposed information system and discovers that one process accepts data that can never be produced by any preceding process. What does this MOST likely indicate?

A. A missing data flow or incorrect process design. B. Excessive processor utilization during execution. C. Insufficient database normalization. D. Incorrect monitor resolution settings.

Answer: A. A missing data flow or incorrect process design.

Rationale: Every process in a properly designed information system must receive valid input from an external entity, data store, or another process. If a process appears to consume data that no preceding component generates, it indicates an inconsistency in the system design or data flow. Detecting such logical gaps during analysis prevents implementation errors and improves system reliability.


Question 27

An NBS application receives census records from thousands of users simultaneously. Which database property ensures that every completed transaction remains valid even when many users access the database at the same time?

A. Scalability. B. Isolation. C. Portability. D. Virtualization.

Answer: B. Isolation.

Rationale: Isolation is one of the ACID properties of database transactions. It ensures that concurrent transactions do not interfere with one another, preventing inconsistent or partially updated data from being seen by other users. Scalability concerns growth, portability relates to compatibility across platforms, and virtualization concerns resource abstraction.


Question 28

A programmer develops a function that calculates statistical averages. Another module later requires the same calculation. Which approach BEST promotes software quality?

A. Rewrite the calculation independently. B. Duplicate the original code. C. Reuse the existing function. D. Perform the calculation manually.

Answer: C. Reuse the existing function.

Rationale: Code reuse promotes consistency, simplifies maintenance, and reduces the risk of introducing inconsistent logic. If future modifications become necessary, only one function requires updating. Duplicating or rewriting identical logic increases maintenance costs and the likelihood of programming errors.


Question 29

While testing a new reporting module, a programmer intentionally enters alphabetic characters into a field that accepts only numeric values. What type of testing is primarily being performed?

A. Performance testing. B. Security auditing. C. Installation testing. D. Negative testing.

Answer: D. Negative testing.

Rationale: Negative testing intentionally provides invalid or unexpected input to determine whether the application correctly detects and rejects improper data. Robust systems must not only process valid information but also safely handle invalid user input without crashing or storing incorrect data.


Question 30

A systems analyst recommends dividing a large application into several independent modules with clearly defined responsibilities. What is the MAIN advantage of this approach?

A. It removes the need for testing. B. It simplifies maintenance and future enhancements. C. It guarantees zero programming errors. D. It eliminates database requirements.

Answer: B. It simplifies maintenance and future enhancements.

Rationale: Modular software is easier to understand, test, debug, and maintain because each component performs a specific function independently. Changes made to one module are less likely to affect unrelated parts of the system. Modularity improves software quality but does not eliminate testing or prevent every programming error.

📘 Get the Full Aptitude Test Questions PDF through your  Gmail (Questions 1–200)

You’ve just accessed the first 30 questions. The full set of 200 expertly prepared aptitude test questions for ICT Officer II (Programmer) – NBS,  Is available, pay, and get access.

To get access to the full PDF, please make a payment of Tsh 10,000 to the LIPA numbers below:

CRDB Lipa TANQR : 11692089
Airtel Money LIPA Number: 13970429
Yas/Tigo LIPA Number: 18401500
M-Pesa WAKALA:  826910
Registered Name: Johnson Yesaya Mgelwa

After payment, please send a text message to notify us of your payment:

Contact Number: +255 628 729 934

⚠️ Important Notice

  • The PDF will be watermarked with your name and phone number and protected for personal use only.
  • Redistribution, sharing, screenshotting, or copying the contents is strictly prohibited. When you share unlawfully, your name and phone number are visible and easy to trace as you leaked a document to other third parties.
  • Legal action may be taken against the misuse of this material.

Thank you for supporting quality content. Best of luck in your interview preparation!

Post a Comment

0 Comments