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