1.
Structured programming known as?
Correct Answer
A. Modular programming
Explanation
Modular programming is the correct answer because it refers to a programming approach where a large program is divided into smaller, manageable modules or functions. Each module performs a specific task and can be developed and tested independently. This approach promotes code reusability, maintainability, and readability. It helps in organizing the code into logical units, making it easier to understand and debug. Additionally, modular programming allows multiple programmers to work on different modules simultaneously, enhancing productivity and collaboration.
2.
Example of OOP language is?
Correct Answer
B. C++
Explanation
C++ is an example of an object-oriented programming (OOP) language. It was developed as an extension of the C programming language and includes additional features such as classes, objects, and inheritance. These OOP concepts allow for the creation of modular, reusable code and promote code organization and encapsulation. C++ is widely used in various domains such as game development, system programming, and high-performance computing. It provides a balance between low-level control and high-level abstractions, making it a powerful and versatile language for software development.
3.
Structured programming focuses on?
Correct Answer
B. Processes
Explanation
Structured programming focuses on organizing a program into well-defined, modular processes. It emphasizes the use of procedures or functions to break down a program into smaller, manageable tasks. This approach promotes code reusability, readability, and maintainability. By separating the program logic into distinct processes, structured programming allows for easier debugging, testing, and modification of the code. It also helps in improving the overall efficiency and performance of the program by promoting a systematic and disciplined approach to programming.
4.
Structured programming follow which approach?
Correct Answer
A. Top down approach
Explanation
Structured programming follows the top-down approach. This approach involves breaking down a problem into smaller sub-problems and solving them one by one. In structured programming, the main program is divided into modules or functions, with each module performing a specific task. The program execution starts from the main module and then moves to the sub-modules in a hierarchical manner. This top-down approach allows for easier understanding, debugging, and maintenance of the code.
5.
Structured programming provide less reuseability.
Correct Answer
A. True
Explanation
Structured programming focuses on breaking down a program into smaller, manageable modules or functions. While this approach promotes code organization and readability, it can limit the reusability of code. Since each module is designed to perform a specific task, it may not be easily adaptable or reusable in other parts of the program. In contrast, other programming paradigms like object-oriented programming offer more flexibility and reusability through the use of classes and objects. Therefore, the statement "Structured programming provides less reusability" is true.
6.
Data moves freely around functions
Correct Answer
A. Structured programming language
Explanation
The given correct answer is "structured programming language" because in structured programming, data is passed between functions using parameters and return values, allowing for the free movement of data. In contrast, Object-Oriented Programming (OOP) focuses on encapsulating data within objects and using methods to manipulate that data, which may restrict the movement of data between functions. Therefore, structured programming languages are more conducive to the free movement of data.
7.
OOP helps to keep the code?
Correct Answer
B. DRY
Explanation
OOP helps to keep the code DRY, which stands for "Don't Repeat Yourself". This principle encourages the use of reusable code and modular design, reducing duplication and improving maintainability. By organizing code into classes and objects, OOP allows for encapsulation, inheritance, and polymorphism, which promote code reusability and modularity. This helps to eliminate redundancy and ensures that changes made in one part of the codebase do not require modifications in multiple places. Overall, OOP helps to keep the code concise, efficient, and easier to maintain.
8.
Mobile Phone,Remote Control is an example of?
Correct Answer
A. Abstraction
Explanation
Mobile phones and remote controls are examples of abstraction because they represent a simplified version of complex systems. Both devices hide the internal workings and complexities of the technology behind a user-friendly interface. Users can interact with these devices without needing to understand the underlying details of how they function. Abstraction allows users to focus on the essential features and functionalities of the device, making it easier to use and understand.
9.
_____________allow an object to perform in multiple ways.
Correct Answer
B. PolymorpHism
Explanation
Polymorphism allows an object to perform in multiple ways. It is a concept in object-oriented programming where an object can take on many forms or have multiple behaviors. This is achieved through method overriding and method overloading. Polymorphism allows different objects to respond differently to the same method call, based on their specific implementation. It promotes code reusability, flexibility, and extensibility in software development.
10.
Java,python is an example of ?
Correct Answer
B. OOP
Explanation
Java and Python are both examples of Object-Oriented Programming (OOP) languages. OOP is a programming paradigm that organizes code into objects, which are instances of classes. It focuses on the concept of objects and their interactions, allowing for the creation of reusable code and modular design. In OOP, programs are structured around objects that have properties (attributes) and behaviors (methods). Both Java and Python support the principles of OOP, such as encapsulation, inheritance, and polymorphism, making them suitable for developing complex and scalable applications.