PPL CS200 Flashcards
In the expression x = 7 + 3 * 6, which operation is performed first?
A. Addition C. Subtraction
B. Multiplication D. Division
Multiplication
Who is credited with designing the first widely known compiler?
a) Alick E. Glennie c) John Backus
b) Grace Hopper d) Dennis Ritchie
Grace Hopper
What kind of programming uses logical deduction rather than sequential steps?
A. Object-Oriented Programming
B. Functional Programming
C. Imperative Programming
D. Logic Programming
Logic Programming
Which of the following is NOT considered a feature of a programming language?
a) Orthogonality c) Type equivalence
b) Control structures d) Debugging mode
Debugging mode
Which paradigm organizes computation around variables and stepwise control of data manipulation?
a) Functional c) Imperative
b) Logic d) Declarative
Imperative
What is the purpose of a variable in programming?**
A. It stores data temporarily in memory
B. It controls the flow of the program
C. It performs mathematical calculations
D. It only stores integers
It stores data temporarily in memory
Which of the following languages introduced the concept of object-oriented programming?
a) Simula c) Fortran
b) Pascal d) Prolog
Simula
Functional programming is based on which mathematical concept?
a) Boolean algebra
b) Lambda calculus
c) Logic predicates
d) Stored program concept
Lambda calculus
What type of error occurs if you try to divide an integer by zero in most programming languages?**
A. Syntax error C. Runtime error
B. Compilation error D. Logical error
Runtime error
Which of the following is a primary aspect of program performance influenced by language features?
a) Expressiveness c) Aliasing
b) Reusability d) Assembly language compatibility
Expressiveness
What is a common disadvantage of using a compiler over an interpreter?**
A. The compiled code is not portable
B. You must recompile the code after making changes
C. It translates code line by line, which is slower
D. Errors are displayed one at a time during execution
. You must recompile the code after making changes
Which feature of programming languages supports reuse of code and improves readability and writeability?
a) Control structures c) Abstraction
b) Syntax design d) Type checking
Abstraction
In which language paradigm are “classes” and “objects” fundamental concepts?
A. Imperative C. Object-Oriented
B. Functional D. Declarative
Object-Oriented
What does an assembler do?
A. Translates machine code into assembly
B. Translates assembly language into machine code
C. Interprets high-level languages
D. Debugs programs
Translates assembly language into machine code
Which of the following is a typical functional programming language?
a) Fortran c) Lisp
b) Java d) Prolog
Lisp
. What does P vs NP in programming refer to?
A. A classification of problems based on difficulty in algorithmic solution
B. A programming language comparison
C. A discussion of hardware limitations
D. The development of new software
A classification of problems based on difficulty in algorithmic solution
What is a key difference between a compiler and an interpreter?
A. A compiler runs code line by line
B. An interpreter translates and runs code line by line, while a compiler translates the whole code at once
C. A compiler executes the code immediately
D. An interpreter saves the object code for later use
An interpreter translates and runs code line by line, while a compiler translates the whole code at once
When is a while loop typically used?**
A. When you know exactly how many times the code block will execute
B. When there are no conditions to check
C. When you do not know the number of iterations or details of the condition
D. When iterating through a list
When you do not know the number of iterations or details of the condition
The paradigm that expresses computation in terms of logic predicates is known as:
a) Declarative
b) Imperative
c) Object-oriented
d) Functional
Declarative
Which language was a major influence on the development of structured programming?
a) C++ c) Lisp
b) ALGOL d) Smalltalk
ALGOL
Which programming language feature is primarily responsible for improving reliability by preventing programs from crashing due to unexpected circumstances?
a) Expressiveness c) Syntax design
b) Exception handling d) Data structures
Exception handling
Who invented the binary system and calculus?
A. Alan Turing
B. Gottfried Wilhelm Leibniz
C. Alonzo Church
D. Abu Ja’far Muhammad ibn Musa
Gottfried Wilhelm Leibniz
What is a key drawback of highly expressive programming languages?
a) Reduced readability
b) Weaker data types
c) Less reliability
d) Limited exception handling
Reduced readability
Which is NOT a characteristic of machine language?
A. Translation-free
B. Machine dependent
C. Error-prone
D. High-level abstraction
High-level abstraction
Prolog was originally designed for which application?
a) Object-oriented programming
b) Artificial intelligence
c) Mathematical calculations
d) System implementation
Artificial intelligence
Which criterion evaluates a software’s ability to run on different platforms without modification?
a. Performance
b. Portability
c. Stability
d. System resource access
Portability
What ensures that a programming language enforces constraints on variable data types to prevent errors?
a. Type Safety
b. Analysis
c. Learning curve
d. Ease in debugging
Type Safety
Which factor determines the speed and efficiency of a software or programming language?
a. Portability
b. Performance
c. Stability
d. Analysis
Performance
What feature of a tool or language helps developers quickly locate and fix errors?
a. Ease in debugging
b. Learning curve
c. Size (smaller is better)
d. Stability
Ease in debugging
Which criterion assesses the ability of software to interact directly with the system hardware?
a. System resource access
b. Portability
c. Analysis
d. Stability
System resource access
What measures the reliability of software or tools under various conditions?
a. Portability
b. Stability
c. Type Safety
d. Analysis
Stability
What describes how easy it is to learn and start using a programming language or tool?
a. Learning curve
b. Performance
c. Portability
d. Analysis
Learning curve
Which factor considers the file or memory size of a software where smaller is better?
a. Type Safety
b. Size (smaller is better)
c. Stability
d. Availability in several facilities
Size (smaller is better)
Which term refers to the examination and interpretation of data or performance in programming?
a. Analysis
b. Portability
c. System resource access
d. Learning curve
Analysis
What measures how widely a tool or language can be used in various settings or applications?
a. Availability in several facilities
b. Ease in debugging
c. Type Safety
d. Size (smaller is better)
Availability in several facilities
Which programming language generation is directly executed by the hardware without any translation?
a. Assembly Language
b. Machine Language
c. 3rd Generation Languages (3G)
d. 4th Generation Languages (4G)
Machine Language
Which generation of programming languages introduced symbolic instructions and required assemblers for translation?
a. Machine Language
b. Assembly Language
c. 3rd Generation Languages (3G)
d. 5th Generation Languages (5G)
Assembly Language
Which generation of programming languages introduced high-level languages like C and FORTRAN?
a. Assembly Language
b. 3rd Generation Languages (3G)
c. 4th Generation Languages (4G)
d. 5th Generation Languages (5G)
3rd Generation Languages (3G)
Which programming language generation focuses on database and application development with minimal coding?
a. 3rd Generation Languages (3G)
b. 4th Generation Languages (4G)
c. 5th Generation Languages (5G)
d. Assembly Language
4th Generation Languages (4G)
Which generation of programming languages emphasizes artificial intelligence and logic-based problem solving?
a. 3rd Generation Languages (3G)
b. 4th Generation Languages (4G)
c. 5th Generation Languages (5G)
d. Machine Language
5th Generation Languages (5G)
Who is known for early contributions to algebra and laid the foundation for modern mathematics?
a. Alan Turing
b. Abu Ja’far Muhammad ibn Musa
c. Stephen Kleene
d. Gottlöb Frege
Abu Ja’far Muhammad ibn Musa
Which mathematician developed a binary numeral system and influenced computer science?
a. Gottfried Wilhelm Leibniz
b. Alonzo Church
c. Dennis Ritchie
d. Brian Kernighan
Gottfried Wilhelm Leibniz
Who is recognized for formalizing logic and laying the groundwork for predicate logic?
a. Alan Turing
b. Gottlöb Frege
c. David Wheeler
d. Kristen Nygaard
Gottlöb Frege
Who proposed the concept of a universal machine that could simulate any algorithm?
a. Alan Turing
b. Alonzo Church
c. Stephen Kleene
d. Brian Kernighan
Alan Turing
Which logician is associated with lambda calculus and influenced functional programming?
a. Alan Turing
b. Alonzo Church
c. Dennis Ritchie
d. Kristen Nygaard
Alonzo Church
Who worked alongside Alonzo Church and contributed to recursive function theory?
a. Stephen Kleene
b. Gottlob Frege
c. David Wheeler
d. Dennis Ritchie
Stephen Kleene
What thesis asserts that any effectively calculable function is computable by a Turing machine?
a. Church’s Legacy
b. Church-Turing Thesis
c. Lambda Calculus
d. Predicate Logic
Church-Turing Thesis
Who is credited with creating the first subroutine and influencing modular programming?
a. David Wheeler
b. Dennis Ritchie
c. Brian Kernighan
d. Alan Turing
David Wheeler
Which individual developed the C programming language?
a. Dennis Ritchie
b. Brian Kernighan
c. David Wheeler
d. Kristen Nygaard
Dennis Ritchie
Who co-authored the book The C Programming Language and contributed to Unix development?
a. Dennis Ritchie
b. Brian Kernighan
c. Kristen Nygaard
d. Stephen Kleene
Brian Kernighan
Who co-invented the Simula programming language and pioneered object-oriented programming?
a. Kristen Nygaard
b. Alan Turing
c. Dennis Ritchie
d. Gottlob Frege
Kristen Nygaard