5.1.1 - Innrduction to Programming.
1. What is the primary purpose of programming?
Correct Answer: (B) To convert problems into executable software
2. Which of the following is a fundamental concept in computer programming?
Correct Answer: (A) Data
3. What are the two essential elements of a computer program?
Correct Answer: (B) Sequence of instructions and computer programming language
4. Who is regarded as the first computer programmer?
Correct Answer: (B) Ada Augusta Lovelace
5. What is machine language primarily composed of?
Correct Answer: (B) Binary codes (0s and 1s)
6. Which programming language was developed for business applications?
Correct Answer: (C) COBOL
7. Which of the following keywords are used in a switch statement in C programming?
Correct Answer: (B) switch, case, default, break
8. What does the operand section of a machine language instruction specify?
Correct Answer: (B) The data to be used for the operation
9. What is a significant disadvantage of first-generation programming languages?
Correct Answer: (C) They are difficult to maintain
10. Which programming language is known for its use in scientific and numerical analysis?
Correct Answer: (B) FORTRAN
11. What does a compiler do?
Correct Answer: (B) Translates high-level code to machine language
12. What type of programming language is Python?
Correct Answer: (B) High-level language
13. Which of the following is an example of a high-level programming language?
Correct Answer: (A) C
14. What is the main advantage of using a high-level programming language?
Correct Answer: (B) It is easier for humans to read and write
15. Which of the following is NOT a characteristic of procedural programming?
Correct Answer: (B) Focus on data
16. What is the purpose of an Integrated Development Environment (IDE)?
Correct Answer: (B) To facilitate software development with tools
17. What is an algorithm?
Correct Answer: (B) A set of instructions for solving a problem
18. What is the significance of the 'break' statement in a switch case?
Correct Answer: (C) It exits the switch statement
19. Which of the following is an example of a structured programming language?
Correct Answer: (B) Java
20. What does a debugger do?
Correct Answer: (B) Analyzes and fixes code errors
21. Which generation of programming languages includes assembly languages?
Correct Answer: (B) Second Generation
22. What software is used to translate assembly language programs into machine language?
Correct Answer: (C) Assembler
23. Which of the following is a benefit of second-generation programming languages?
Correct Answer: (B) They are easier to create and understand than first-generation languages.
24. Which of the following is a drawback of second-generation programming languages?
Correct Answer: (B) They execute more slowly than machine languages.
25. Which programming paradigm is primarily used by third-generation programming languages?
Correct Answer: (C) Procedural Programming
26. Which of the following programming languages is considered a third-generation language?
Correct Answer: (B) COBOL
27. What is a key characteristic of third-generation programming languages?
Correct Answer: (C) They are machine-independent.
28. Which of the following is a benefit of third-generation programming languages?
Correct Answer: (B) They make it easier to maintain programs.
29. Which statement accurately describes compilers?
Correct Answer: (B) They translate the entire program into machine language before execution.
30. Which programming languages are categorized as fourth-generation languages?
Correct Answer: (C) SQL, PowerBuilder, XBase++
31. What is the primary purpose of fourth-generation programming languages (4GLs)?
Correct Answer: (B) To minimize the cost and time of software development
32. Which characteristic is essential for fourth-generation programming languages?
Correct Answer: (B) They implement database management systems (DBMS).
33. Which of the following programming languages is associated with the fifth generation of programming languages?
Correct Answer: (C) Prolog
34. What is a primary focus of fifth-generation programming languages?
Correct Answer: (B) Artificial Intelligence and Neural Networks
35. Which of the following is a characteristic of a good programming language?
Correct Answer: (B) It must allow programmers to focus on design without extensive background knowledge.
36. What should a programming language's function library include?
Correct Answer: (C) Detailed documentation
37. Which characteristic improves the efficiency of programs written in a good programming language?
Correct Answer: (C) Efficient use of memory and computer resources.
38. Why are fifth-generation programming languages user-friendly?
Correct Answer: (B) They utilize everyday English vocabulary for communication.
39. Which programming languages fall under the fifth generation?
Correct Answer: (B) Prolog, Lisp
40. Which programming paradigm is commonly used in fifth-generation languages?
Correct Answer: (C) Logic-based