cs200 Flashcards
What is a key feature of mobile computing that enables devices to continue their operation even when disconnected from a network?
a) Communication
b) Mobility
c) Scalability
d) Security
Mobility
Which component allows mobile devices to communicate wirelessly with other devices or networks?
a) Processor
b) Memory
c) Mobile Communication
d) Operating System
Mobile Communication
In mobile computing, which term refers to the interaction of mobile devices with cloud services for data storage and processing?
a) Mobile Hardware
b) Mobile Cloud Computing
c) Mobile Software
d) Mobile Platform
Mobile Cloud Computing
Which computer component is responsible for executing instructions?
a) RAM
b) Hard Drive
c) CPU
d) GPU
CPU
What does the acronym ALU stand for?
a) Assembly Logic Unit
b) Arithmetic Logic Unit
c) Array Linear Unit
d) Automatic Logical Understanding
Arithmetic Logic Unit
What is the main function of a computer’s RAM?
a) Temporary data storage for active processes
b) Long-term data storage
c) Processing power
d) Input and output management
Temporary data storage for active processes
Which paradigm emphasizes a sequence of statements to achieve a desired result?
a) Functional
b) Logic
c) Imperative
d) Object-oriented
Imperative
In which programming paradigm are functions treated as first-class citizens?
a) Functional
b) Imperative
c) Logic
d) Object-oriented
Functional
Which of the following is an example of object-oriented programming?
a) LISP
b) Java
c) Haskell
d) Prolog
Java
Which programming paradigm relies heavily on facts and rules for computation?
a) Object-oriented
b) Functional
c) Logic
d) Imperative
Logic
Which programming concept uses “composition” and “aggregation” to represent relationships between classes?
a) Object-oriented programming
b) Functional programming
c) Imperative programming
d) Logic programming
Object-oriented programming
Who is considered the father of lambda calculus, an important concept in functional programming?
a) Alonzo Church
b) Alan Turing
c) John von Neumann
d) Abu Ja’far Muhammad ibn Musa
Alonzo Church
Who developed the concept of a theoretical machine that forms the foundation of computer science and logic programming?
a) Gottfried Wilhelm Leibniz
b) Alan Turing
c) Ada Lovelace
d) Grace Hopper
Alan Turingx
Which mathematician contributed significantly to imperative programming through the creation of binary arithmetic?
a) Abu Ja’far Muhammad ibn Musa
b) Gottfried Wilhelm Leibniz
c) Alonzo Church
d) John Backus
Gottfried Wilhelm Leibniz
Who developed the context-free grammar and BNF notation used in the design of programming languages?
a) John Backus
b) Peter Naur
c) Donald Knuth
d) Alan Kay
John Backus
What is the term for the structure or form of expressions in a programming language?
a) Semantics
b) Syntax
c) Grammar
d) Lexeme
Syntax
Which type of semantics focuses on describing the meaning of programs by executing them on a machine?
a) Denotational Semantics
b) Static Semantics
c) Operational Semantics
d) Axiomatic Semantics
Operational Semantics
In EBNF, what symbol denotes repetition (0 or more occurrences)?
a) []
b) {}
c) ()
d) |
{}
What is the purpose of a parser in a compiler?
a) Translate high-level code to machine code
b) Analyze the structure of code and generate parse trees
c) Manage memory allocation
d) Optimize code execution
Analyze the structure of code and generate parse trees
Which of the following statements about grammar ambiguity is true?
a) Ambiguous grammar is always preferred in language design
b) Ambiguous grammar can generate multiple parse trees for the same string
c) Ambiguity in grammar does not affect program execution
d) Grammar ambiguity is not a real problem in programming
Ambiguous grammar can generate multiple parse trees for the same string
The component of a computer responsible for executing instructions and performing calculations.
CPU
The lowest level syntactic unit in a programming language.
Lexeme
The method of describing program meaning through execution on a machine.
Operational Semantics
The process of converting a number from one base to another.
Number System Conversion
A hierarchical diagram representing the syntactic structure of a string.
Parse Tree
The term for the meaning of expressions and statements in a programming language.
Semantics
In functional programming, functions are treated as first-class citizens.
t/f
T
The Turing Machine is a theoretical concept that models computation.
t/f
T
Grammar ambiguity means that only one parse tree can be generated for any input string.
t/f
F
Alan Turing developed lambda calculus, which is a foundation of functional programming.
t/f
F (It was Alonzo Church)
In mobile computing, mobility refers to the ability to switch between different networks seamlessly.
t/f
F (It refers to the ability to function while moving or disconnected)
A parser is responsible for converting high-level programming code into machine code.
t/f
F (It generates the parse tree)
In object-oriented programming, what is the term for combining data and the methods that operate on that data into a single unit?
a) Polymorphism
b) Encapsulation
c) Inheritance
d) Abstraction
Encapsulation
Which of the following is an example of functional programming?
a) Python
b) C++
c) Haskell
d) Prolog
Haskell
Which paradigm allows inheritance, where one class can extend the properties and behavior of another?
a) Functional
b) Logic
c) Imperative
d) Object-oriented
Object-oriented
In programming language grammar, what is the function of the start symbol?
a) Defines operators
b) Defines the alphabet of the language
c) Indicates the beginning of a grammar rule
d) Specifies data types
Indicates the beginning of a grammar rule
Which of the following denotes the sequence of steps a program takes to perform an operation?
a) Lexical Structure
b) Control Flow
c) Data Flow
d) Semantic Rules
Control Flow
What is an axiomatic semantics approach used for?
a) Defining syntax
b) Proving correctness of programs
c) Optimizing program execution
d) Defining data structures
Proving correctness of programs
Who is credited with creating the first compiler?
a) Ada Lovelace
b) Grace Hopper
c) John von Neumann
d) Peter Naur
Grace Hopper
Who is the mathematician that formalized the concept of algorithm and computability?
a) Alan Turing
b) Donald Knuth
c) John Backus
d) Alonzo Church
Alan Turing
The programming paradigm where problems are solved by applying and composing functions.
Functional Programming
A component that provides temporary data storage and allows the CPU to access information faster than accessing it from main memory.
Cache
The theoretical machine proposed by Alan Turing, which is a central concept in computer science and logic.
Turing Machine
The grammar notation used to describe the syntax of programming languages.
Backus-Naur Form (BNF)
A data structure used by parsers to represent the structure of an expression.
Abstract Syntax Tree (AST)
Logic programming relies on the idea of state changes to compute results.
t/f
False (It relies on logical inference)
In binary arithmetic, the result of multiplying two binary numbers is always larger than either of the original numbers.
t/f
False (Not always; depends on the numbers)
Abu Ja’far Muhammad ibn Musa contributed significantly to the development of binary number systems.
t/f
False (He contributed to algebra, not binary systems)
In mobile computing, mobile devices are limited to only using local storage for data management.
t/f
False (Cloud computing allows mobile devices to use external resources)
The concept of encapsulation in object-oriented programming is about hiding internal details of objects.
t/f
T
In programming language grammar, a production rule defines how symbols can be derived from each other.
t/f
T
The introduction of object-oriented programming was significantly influenced by which language?
a) Smalltalk
b) Pascal
c) BASIC
d) Assembly
Smalltalk
Which language is considered the first high-level programming language?
a) COBOL
b) Python
c) FORTRAN
d) C
FORTRAN
Which programming language is designed specifically for logical inference and rule-based systems?
a) Lisp
b) Java
c) Prolog
d) Ruby
Prolog