Prog Lec
Prog Lec
Quiz 1
Select one:
a. Scientific Applications
b. BusinessApplications
c. ArtificialIntelligence
d. SystemsProgramming
Select one:
a. Scientific Applications
b. BusinessApplications
c. WebSoftware
d. SystemsProgramming
Select one:
a. Readability
b. Writability
c. Reliability
d. Portability
A language with a large number of basic constructs is more difficult to learn than one with a smaller
number.
a relatively small set of primitive constructs can be combined in a relatively small number of ways to
build the control and data structures of the language.
suppose a numeric type is used for an indicator flag because there is no Boolean type in the language.
Some languages have used matching pairs of special words or symbols to form groups. C and its
descendants use braces to specify compound statements.
ability to define and then use complicated structures or operations in ways that allow many of the
details to be ignored.
it means that there are very powerful operators that allow a great deal of computation to be
accomplished with a very small program.
is simply testing for type errors in a given program, either by the compiler or during program execution.
The correct answer is: A language with a large number of basic constructs is more difficult to learn than
one with a smaller number. → Overall simplicity, a relatively small set of primitive constructs can be
combined in a relatively small number of ways to build the control and data structures of the language.
→ Orthogonality, suppose a numeric type is used for an indicator flag because there is no Boolean type
in the language. → Data Types, Some languages have used matching pairs of special words or symbols to
form groups. C and its descendants use braces to specify compound statements. → Syntax Design,
ability to define and then use complicated structures or operations in ways that allow many of the
details to be ignored. → Support for Abstraction, it means that there are very powerful operators that
allow a great deal of computation to be accomplished with a very small program. → Expressivity, is
simply testing for type errors in a given program, either by the compiler or during program execution. →
Type Checking
1960’s - 1070’s The operating system and the programming support tools of a
Select one:
a. Scientific Applications
b. BusinessApplications
c. ArtificialIntelligence
d. SystemsProgramming
specified in great detail, and the specific order of execution of the instructions or
by composing pure functions, avoiding shared state, mutable data, and side-effects;
around data, or objects, rather than functions and logic. An object can be defined as
a data field that has unique attributes and behavior, and lastly [Logic] a constructive
approach in Automated Theorem Proving, where logic proofs answer queries and
1950’s are characterized by facilities for producing elaborate reports, precise ways of
describing and storing decimal numbers and character data, and the ability to specify
Select one:
a. Scientific Applications
b. BusinessApplications
c. ArtificialIntelligence
d. SystemsProgramming
Quiz 2
It is a set of sentences.
Select one:
a. language
b. lexeme
c. sentence
d. token
A compiler normally translates the whole [source program] into the object program.
Some computer languages use an [interpreter] to translate the source program into
the object program. Interpretation refers to the process of [translating] each line of the
[ source program] into the corresponding line of the object program and [executing ]
the line.
It is the most basic type of computer languages, consisting of strings of numbers the
Select one:
a. Machine languages
b. Assembly languages
d. Notable Languages
such use, the program may be unnatural and convoluted, making it unusually difficult
to read.
Select one:
a. Readability
b. Writability
c. Reliability
d. Portability
machine languages.
Select one:
a. Machine languages
b. Assembly languages
d. Notable Languages
phases below:
1. [Editor]
2. [Preprocess]
3. [Compile]
4. [Link]
5. [Load]
6. [Execute]
Mid
Quiz 1
metalanguages that are well suited for the task of describing the syntax of
programming languages.
An [attribute grammar] is a descriptive formalism that can describe both the syntax
language constructs.
functions.
[Axiomatic semantics,] which is based on formal logic, was devised as a tool for
Select one:
True
False
Select one:
True
False
The correct answer is: The change in the state of the machine (memory, registers,
stack, heap, etc.) defines the meaning of the statement. → Operational semantics,
semantics, Define axioms and inference rules in logic for each statement type in the
Semantics, Programs are translated into functions about which properties can be
proved using the standard mathematical theory of functions, and especially domain
The weakest precondition is the least restrictive precondition that will guarantee the
postcondition
Select one:
True
False
constraints among variables that are true at that point in the execution
Select one:
True
False
language(select 2)
idealized computer)
The correct answers are: Define a mathematical object for each language entity,
Define a function that maps instances of the language entities onto instances of the
needed
Select one:
True
False
Fin
Quiz 1
Data types are those who are not composed of other data types.
Select one:
a. Data types
b. Void
c. Built-in
d. Char
Select one:
a. Data types
b. Void
c. Built-in
d. Char
Select one:
a. struct
b. union
c. int
d. char
Select one:
a. Data types
b. Void
c. Built-in
d. Char
Select one:
a. struct
b. union
c. int
d. char
a. Array
b. Functions
c. Pointers
d. Constant
e. Short
Select one:
a. Class
b. Object
c. Method
d. Function
It is the actual run time entity which holds data and function that has been defined in
the class.
Select one:
a. Class
b. Object
c. Method
d. Function
The correct answer is: are the whole numbers such as 5,39,-1917,0, etc. → Integers,
they have no fractional part. → Integers, An identifier declared as int cannot have a
fractional part. → Integers, It can store any member of the c++ implementation’s
occupies twice as much memory as a float. → Double, It is used when the float is too
Fin
Quiz 2
Select one:
True
False
________ in expressions are common, although they eliminate the error detection
Select one:
a. Associativity
b. Operand
c. Coercion
d. Assignment
Select one:
True
False
Select one:
a. Associativity
b. Operand
c. Coercion
d. Assignment
Select one:
a. Expressions
b. Assignment
c. Semantics
d. Coercion