Quiz
Programming
Dieses Quiz enthält Fragetypen, die sich im gewohnten Player öffnen.
Fragen in diesem Quiz (21)
1(Pick 4) Named entities are bound in a running program to:
- Ascope
- Bvisibility
- Ctype
- Dlifetime
- Efunctions
2A [blank_start]type[blank_end] is a collection of values and a collection of operations on those values.
[blank_start]Simple[blank_end] types: numbers, characters, booleans, ...
[blank_start]Structured[blank_end] types: Strings, lists, trees, hash tables, ...- Atype
- BSimple
- CStructured
3[blank_start]Type[blank_end] system in a programming language is needed to organize data and helps to check the correctness of programs: Determine legal operations. Detect type errors.
- AType
4What is a programming language paradigm?
- AIs a pattern of problem- solving thought that underlies a particular genre of programs and languages.
- BIs a pattern of problem- solving thought that underlies a particular genre of languages.
- CIs a pattern of ineptness thought that underlies a particular genre of programs and languages.
5Many researches (and Wikipedia) classify programming languages into two categories.
- AImperative in which the programmer instructs the machine how to change its state.
- BArbitrative in which the programmer merely declares properties of the desired result, but not how to compute it.
- CDeclarative in which the programmer merely declares properties of the desired result, but not how to compute it.
- DDeclarative in which the programmer instructs the machine how to change its state.
6Which of these are not included in Imperative languages?
- Aprocedural which groups instructions into procedures.
- Bobject-oriented which groups instructions together with the part of the state they operate on.
- Cfunctional in which the desired result is declared as the
value of a series of function applications.
7Declarative languages also include: (Pick 3)
- Afunctional in which the desired result is declared as the
value of a series of function applications. - Blogic in which the desired result is declared as the answer to a question about a system of facts and rules.
- Cmathematical in which the desired result is declared as the solution of an optimization problem.
- Dobject-oriented which groups instructions together with the part of the state they operate on.
- Afunctional in which the desired result is declared as the
8Which of these are the 4 main programming paradigms?
- AImperative, Object-Oriented (OO), Functional, Logic (Declarative)
- BImperative, Object-Oriented (OO), Procedural, Logic (Declarative)
- CUlcerative, Object-Oriented (OO), Functional, Logic (Declarative)
- DImperative, Logic-Oriented (OO), Functional, Logic (Declarative)
9Von Neumann architecture: how to encode programs as sequences of numbers resulting in a stored-program computer.
- ARichtig
- BFalsch
10Modern CPU:
• Memory contains instructions and data
• Processing unit performs arithmetic and logical operations
• Control unit interprets instructions- ARichtig
- BFalsch
11Imperative Programming Language:
- Asequential execution
- Bvariables representing memory
- Cuse of assignment to change the values of variables
- DC#
12An OO Program is a collection of objects that interact by passing messages that transform the state.
- ARichtig
- BFalsch
13Functional programming models a computation as a collection of mathematical functions. largely without variables, assignment, and iteration. purity: no side-effects (not even for I/O), no variables, no assignment statement
- ARichtig
- BFalsch
14Logic / Declarative programming declares what outcome the program should accomplish, rather than how it should be accomplished
- ARichtig
- BFalsch
15Key characteristics of programming languages:
- ASimplicity and readability
- BClarity about binding
- CReliability
- DSupport
- EAbstraction
- FOrthogonality
- GEfficient implementation
- HSelf Sufficient
- IDeviant
16Early vs Late binding
• early binding takes place at compile-time
• late binding takes place at run time
• Static vs Dynamic binding
• static binding happens prior to execution (i.e. compile-time)
• dynamic binding happens and is changeable during run-time (i.e. execution)- ARichtig
- BFalsch
17Two types of programming language abstractions are:
- AData abstractions: simplify the behavior and attributes of data for humans
• Examples: numbers, character strings, search trees - BControl abstractions: simplify properties of the transfer of control
• Examples: loops, conditional statements, procedure calls - CConditional abstractions: simplify properties of the transfer of control
• Examples: loops, conditional statements, procedure calls - DCharacter abstractions: simplify the behavior and attributes of data for humans
• Examples: numbers, character strings, search trees
- AData abstractions: simplify the behavior and attributes of data for humans
18A language is orthogonal if its features are built upon a small, mutually independent set of primitive operations. Fewer exceptional rules = conceptual simplicity. Tradeoff with efficiency
- ARichtig
- BFalsch
19What is a compiled language?
- ACompiled languages are translated into machine code that can be run directly on a computer’s processor. Usually the whole program is translated before it is run
- Bare processed by a higher-level virtual machine
- CUsually a program is translated on the fly, i.e., a statement is translated and then immediately executed
20Interpreted languages are:
- Aprocessed by a higher-level virtual machine
- BUsually a program is translated on the fly, i.e., a statement is translated and then immediately executed
- CUsually a program is translated on the fly, i.e., a statement is translated and executed simultaneously
21TRUE is any non-zero value.
FALSE is a zero value.- ARichtig
- BFalsch
Informationen
- Beschreibung
- Quiz am Programming , erstellt von Upma Sharma am 24/10/2018.
- Autor
- Upma Sharma
- Sprache
- English
- Aufrufe
- 0
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz