Palawan Polytechnic College Incorporated
Programming Languages Examination
Name: ____________________________ Date: ____________________________ Score: ______ / 50
Direction: Read each question carefully and choose the letter of the correct answer.
1. Which of the following is considered the first high-level programming language?
A. C B. Assembly C. FORTRAN D. Java
2. FORTRAN was primarily developed for:
A. Web development B. Scientific and engineering computation
C. Artificial intelligence D. Game development
3. COBOL was designed mainly for:
A. Business applications B. Robotics C. Graphics design D. Operating systems
4. Which generation of languages uses machine code?
A. First Generation B. Second Generation C. Third Generation D. Fourth Generation
5. Assembly language belongs to which generation?
A. First B. Second C. Third D. Fourth
6. C language greatly influenced the development of:
A. HTML B. Java and C++ C. SQL D. Prolog
7. Which language introduced the concept of Object-Oriented Programming?
A. C B. Smalltalk C. FORTRAN D. Pascal
8. The development of programming languages has generally moved toward:
A. More hardware dependence B. Lower abstraction C. Higher abstraction D. More binary coding
9. Which language is closely associated with Artificial Intelligence development?
A. Prolog B. COBOL C. BASIC D. C
10. The main purpose of high-level languages is to:
A. Replace hardware B. Make programming easier for humans C. Increase binary usage D. Eliminate compiler
11. Java became popular because of its:
A. Platform dependency B. 'Write Once, Run Anywhere' capability
C. Machine-level access D. Assembly syntax
12. The evolution of programming languages reflects improvements in:
A. Programmer productivity B. Manual computation C. Hardware cost only D. Paper documentation
13. A programming paradigm refers to:
A. A compiler type B. A programming style or approach C. A hardware specification D. A processor
14. Imperative programming focuses on:
A. Objects B. Mathematical functions C. Statements that change program state D. Logical rules only
15. Which language is primarily imperative?
A. C B. Prolog C. Haskell D. Lisp
16. Object-Oriented Programming is based on:
A. Functions only B. Objects and classes C. Logic rules D. Assembly instruction
17. Encapsulation is a feature of which paradigm?
A. Logic B. Functional C. Object-Oriented D. Procedural only
18. Inheritance allows:
A. Code repetition B. One class to acquire properties of another C. Deleting classes D. Ignoring methods
19. Functional programming emphasizes:
A. Mutable data B. Changing variables C. Pure functions and immutability D. GOTO statements
20. Which language is functional?
A. Java B. Haskell C. C D. Assembly
21. Logic programming is based on:
A. Functions B. Objects C. Facts and rules D. Loops
22. Which language is an example of logic programming?
A. Python B. C++ C. Prolog D. Java
23. Polymorphism is associated with:
A. Imperative programming B. Object-Oriented programming C. Machine language D. Assembly language
24. In functional programming, recursion often replaces:
A. Variables B. Loops C. Classes D. Objects
25. Which paradigm focuses on 'what to solve' rather than 'how to solve'?
A. Imperative B. Object-Oriented C. Logic D. Assembly
26. Readability refers to:
A. Speed of execution B. Ease of understanding code C. Memory usage D. Hardware compatibility
27. Writability refers to:
A. Ease of writing programs B. Program length C. Compiler speed D. Hardware speed
28. Reliability is defined as:
A. Fast execution B. Program correctness and consistency C. Fewer lines of code D. Small file size
29. Efficiency refers to:
A. Ease of reading B. Resource usage and performance C. Number of programmers D. Code formatting
30. Which factor improves readability?
A. Complex syntax B. Clear and consistent syntax C. Excessive abbreviations D. Random variable names
31. Strong typing contributes to:
A. Poor reliability B. Improved reliability C. Slower typing D. Less abstraction
32. Orthogonality in language design means:
A. Random feature combinations B. Features that work independently and consistently
C. Complex syntax rules D. No structure
33. Which design criterion focuses on preventing errors?
A. Writability B. Reliability C. Efficiency D. Simplicity
34. A language that uses fewer keywords is often more:
A. Readable B. Reliable C. Inefficient D. Complex
35. Efficiency is closely related to:
A. Execution time and memory use B. Code comments C. Indentation D. Font style
36. Which of the following improves writability?
A. Limited abstraction B. Support for abstraction C. No control structures D. Manual memory only
37. Simplicity in language design generally increases:
A. Confusion B. Hardware cost C. Readability D. Compilation time
38. Type checking enhances:
A. Reliability B. Inefficiency C. Ambiguity D. Complexity
39. Syntax refers to:
A. Meaning of statements B. Rules for writing code structure C. Execution speed D. Hardware logic
40. Semantics refers to:
A. Grammar rules B. Program meaning C. Syntax symbols D. Code formatting
41. BNF stands for:
A. Binary Normal Form B. Backus-Naur Form C. Basic Node Format D. Binary Node Function
42. BNF is used to describe:
A. Program execution B. Programming language grammar C. Hardware design D. Memory allocation
43. Context-Free Grammars are used in:
A. Parsing programming languages B. Hardware assembly C. Typing speed D. Network configuration
44. A parse tree represents:
A. Program output B. Execution time C. Syntactic structure of code D. Memory usage
45. In a parse tree, the root node represents:
A. Terminal symbol B. Starting symbol C. Variable name D. Constant value
46. Terminals in grammar are:
A. Non-replaceable symbols B. Variables C. Expressions D. Functions
47. Non-terminals can be:
A. Replaced by other symbols B. Executed C. Compiled D. Printed
48. A syntax error occurs when:
A. Logic is incorrect B. Grammar rules are violated C. Output is wrong D. Program runs slowly
49. A semantic error occurs when:
A. Grammar is incorrect B. Meaning of code is wrong C. Compiler crashes D. There is no output
50. Which tool checks syntax before execution?
A. Compiler B. Printer C. Monitor D. Keyboard