Advertise here ✔️

Phone: +255 692 127 931 Email: njoholes@gmail.com

Wednesday, October 1, 2025

PROGRAMMER QUESTIONS AND ANSWERS

 1. What is the base of a recursive function?

A. The first call to the function
B. The condition that stops recursion
C. The infinite loop inside recursion
D. The recursive call itself

 

2. In MVVM, what does VM stand for?
A. Virtual Machine
B. View Manager
C. View Model
D. Variable Mapper

 

3. Among Figma, Adobe XD, and InVision, which supports version control?
A. Figma
B. Adobe XD
C. InVision
D. None

 

4. Which of the following is NOT true about embedded systems? (Choose two)
A. They are designed for specific tasks
B. They always have unlimited resources
C. They are usually resource-constrained
D. They never interact with hardware

 

5. Native mobile app development is superior because:
A. It runs slower than cross-platform apps
B. It provides better performance and access to device features
C. It is less secure than hybrid apps
D. It is always cheaper to develop

 

6. What is the 7th number in the Fibonacci sequence (starting 0,1…)?
A. 8
B. 7
C. 9
D. 10

 

7. What is polymorphism in OOP?
A. Ability of a function to take multiple forms
B. Hiding implementation details
C. Reusing code from another class
D. Creating objects from classes

 

8. Encapsulation refers to:
A. Hiding internal details and exposing only necessary features
B. Deriving one class from another
C. Using multiple inheritance
D. Overloading methods

 

9. Inheritance allows:
A. One class to acquire properties and behaviors of another
B. Hiding implementation details
C. Functions with the same name but different arguments
D. Declaring constructors

 

10. What is a constructor in OOP?
A. A method that destroys objects
B. A special method used to initialize objects
C. A method that hides data
D. A function that calls itself

 

11. What is database normalization?
A. A method to reduce redundancy and improve data integrity
B. A way to speed up queries by duplication
C. A technique to store binary data
D. A process of creating backups

 

12. Which programming language is most used for developing embedded systems?
A. Java
B. C
C. Python
D. Ruby

 

13. Which of the following is NOT a SOLID principle?
A. Single Responsibility Principle
B. Open/Closed Principle
C. Interface Segregation Principle
D. Data Hiding Principle

 

14. Which OOP concept allows different classes to define methods with the same name but different behavior?
A. Abstraction
B. Polymorphism
C. Encapsulation
D. Overloading

 

15. Which SQL command is used to remove duplicate records?
A. UNIQUE
B. DISTINCT
C. GROUP BY
D. REMOVE

 

16. Which design pattern is known as “one class, one instance”?
A. Factory
B. Singleton
C. Observer
D. Adapter

 

17. What is the default access modifier in most OOP languages (like Java)?
A. Private
B. Package/Default
C. Protected
D. Public

 

18. Which of the following is an example of an embedded system?
A. ATM Machine
B. Microsoft Word
C. Google Chrome
D. Laptop Computer

 

19. Which HTML tag is used to link an external CSS file?
A. <css>
B. <link>
C. <style>
D. <import>

 

20. Which algorithmic complexity is the fastest growth?
A. O(1)
B. O(log n)
C. O(n)
D. O(n²)

 

21. In relational databases, what does ACID stand for?
A. Atomicity, Consistency, Isolation, Durability
B. Access, Control, Index, Data
C. Array, Class, Instance, Dependency
D. Action, Cycle, Integration, Delivery

 

22. Which principle of OOP hides unnecessary details from the user?
A. Inheritance
B. Abstraction
C. Polymorphism
D. Encapsulation

 

23. Which mobile app development approach uses one codebase for multiple platforms?
A. Native
B. Hybrid
C. Pure Native
D. Static

 

24. What does ORM stand for in databases?
A. Object Relational Mapping
B. Online Resource Manager
C. Optimized Relational Model
D. Object Resource Module

 

25. Which UML diagram represents the dynamic behavior of a system?
A. Class Diagram
B. Use Case Diagram
C. Sequence Diagram
D. Component Diagram

 

26. In Git, which command is used to combine changes from different branches?
A. git clone
B. git merge
C. git branch
D. git push

 

27. Which cloud service model provides infrastructure resources?
A. SaaS
B. PaaS
C. IaaS
D. DBaaS

 

28. Which HTTP method is idempotent?
A. POST
B. GET
C. PATCH
D. CONNECT

 

29. What is the main advantage of database indexing?
A. Reduced storage
B. Faster query performance
C. Eliminates redundancy
D. Automatic backups

 

30. Which type of testing verifies individual units of code?
A. Integration Testing
B. Unit Testing
C. System Testing
D. Acceptance Testing

 

31. Which mobile app type requires internet connection for most functionalities?
A. Native
B. Web App
C. Hybrid
D. Desktop

 

32. In software engineering, what does DRY principle mean?
A. Don’t Repeat Yourself
B. Data Reuse Yield
C. Dynamic Resource Yield
D. Default Reusable Yards

 

33. Which of the following is a NoSQL database?
A. MySQL
B. MongoDB
C. Oracle
D. PostgreSQL

 

34. Which of the following is a primary key characteristic?
A. Allows duplicates
B. Cannot be NULL
C. Can have multiple NULLs
D. Is optional

 

35. What is the default port number for HTTP?
A. 20
B. 21
C. 80
D. 443

 

36. Which algorithm is commonly used for shortest path in graphs?
A. Bubble Sort
B. Dijkstra’s Algorithm
C. Merge Sort
D. Prims Algorithm

 

37. Which OOP concept allows a subclass to redefine a method of its parent class?
A. Method Overloading
B. Method Overriding
C. Encapsulation
D. Polymorphism

 

38. Which type of database key uniquely identifies each record in a table?
A. Foreign Key
B. Composite Key
C. Primary Key
D. Alternate Key

 

39. Which software development model is based on iterations and feedback?
A. Waterfall
B. Agile
C. V-Model
D. Spiral

 

40. Which of the following is a benefit of using APIs in software development?
A. Increases code duplication
B. Enables software integration
C. Makes testing impossible
D. Reduces modularity

 

Share:

0 comments:

Post a Comment

Contact Us

SALEHE NJOHOLE P.O.BOX 2428, DAR ES SALAAM, TANZANIA EAST AFRIKA. Call: 0692 127 931