CSE240 MIDTERM (QUIZ QUESTIONS) WITH COMPLETES SOLUTIONS
Learning the concepts, logic and problem solving of programming unlocks our ability to learn
d d d d d d d d d d d d d d
new languages - ans-TRUE d d dd
Reliability speaks to how easily a programmer can express themselves reliably within the lan
d d d d d d d d d d d d d
guage - ans-FALSE d dd
Orthogonality... - ans-Sort = One-to-Many, Compositional = Many-to- d dd d d d d d
Many, Number = general lack of restrictions in reproducing the features of your code
d d d d d d d d d d d d d
If I have set of commands S1 that describe data types in my language and a set of commands S
d d d d d d d d d d d d d d d d d d d
2 that describe creation of variables:
d d d d d
S1: int, decimal, bool
d d d
S2: <type> <name>, <type> <name> = <value>, constant <type> <name> = <value>
d d d d d d d d d d d
The set S3: int <name>, int <name> = <value>, constant int <name> = <value> --
d d d d d d d d d d d d d d
demonstrates what kind of orthogonality? - ans-SORT ORTHOGONALITY
d d d d d d dd d
When evaluating a programming language the category Writeability describes: - ans-
d d d d d d d d d dd
This concept is concerned with the actual production of code and the ability of the programmer
d d d d d d d d d d d d d d d
to easily use the language... syntax, abstraction, expressivity
d d d d d d d d
When evaluating a programming language the category Efficiency describes: - ans-
d d d d d d d d d dd
The 'first concern' historically. Concerned with how fast the code compiles and run
d d d d d d d d d d d d
When evaluating a programming language the category Reliability describes: - ans-
d d d d d d d d d dd
This concept is concerned with the internal safety and consistency of the language ... type che
d d d d d d d d d d d d d d d
cking, exceptions, etc. d d
Autocode and FORTRAN are considered to be the first high-level programming languages -
d d d d d d d d d d d d
ans-TRUE
dd
This quote: d
"When piloting a helicopter - changing speed can/
d d d d d d d
will change your direction and possibly vice versa"
d d d d d d d
Demonstrates that changing speed and/or direction is Orthogonal - ans-FALSE d d d d d d d d dd
What programming language characteristics impact the readability of the programs written in
d d d d d d d d d d d d
this language? - ans-Control Structures, Data Structures, Syntax Design
d d dd d d d d d
, In contrast to Web 1.0, what is the key function of Web 2.0? - ans-
d d d d d d d d d d d d d dd
Web is the computing platform d d d d
What is a feature of object-oriented computing? - ans-encapsulation of states
d d d d d d d dd d d
Event-driven computing paradigm is to.... - ans- d d d d d dd
define a set of events and write an event handler for each event.
d d d d d d d d d d d d
What programming paradigm does Fortran belong to? - ans-imperative
d d d d d d d dd
Which command will have a loop when expressed in a syntax graph? - ans-switch
d d d d d d d d d d d d dd
A programming languages can be broken down into four structural layers. Identify these layer
d d d d d d d d d d d d d
s. - ans-Syntax, Semantic, Contextual,
d dd d d
Can the identifier "base_variable" be created from the following BNF ruleset? - ans-
d d d d d d d d d d d dd
<char> ::= a | b | c | ... | s | ... | x | y | z d d d d d d d d d d d d d d d d d d
<identifier> ::= <char> | <char> <identifer> d d d d d
No - there is an underscore in the identifier name that cannot be generated.
d d d d d d d d d d d d d
What does the | (pipe) symbol in a BNF rule mean? - ans-
d d d d d d d d d d d dd
It is an or statement. Choose one of the options
d d d d d d d d d
Which commands (constructs) do NOT have a loop when expressed in syntax graphs?
d d d d d d d d d d d d
Select all that apply - ans-if-then-else
d d d d d dd
for ( <init-expr>; <test-expr>; <increment-expr> ) {<statements>}
d d d d d d
while (condition) do {statements;} d d d
Given:
Very Simple Programming Language (VSPL)
d d d d
<char> ::= a | b | c | ... | z | 0 | 1 | ... | 9 d d d d d d d d d d d d d d d d d d
<operator> ::= + | - | * | / | % | < | > | == | >= | <= d d d d d d d d d d d d d d d d d d d d
<variable> ::= <char> | <char> <variable> d d d d d
<expr> ::= <variable> <operator> <variable> | ( <expr> ) <operator> ( <expr> )
d d d d d d d d d d d d
<assign> ::= <variable> = <expr>; d d d d
<statements> ::= <assign> | <assign> <statements> d d d d d
The following is valid: d d d
a = x + y; b = s * t; c = w + v; - ans-TRUE
d d d d d d d d d d d d d d d dd
Given:
Very Simple Programming Language (VSPL)
d d d d
Learning the concepts, logic and problem solving of programming unlocks our ability to learn
d d d d d d d d d d d d d d
new languages - ans-TRUE d d dd
Reliability speaks to how easily a programmer can express themselves reliably within the lan
d d d d d d d d d d d d d
guage - ans-FALSE d dd
Orthogonality... - ans-Sort = One-to-Many, Compositional = Many-to- d dd d d d d d
Many, Number = general lack of restrictions in reproducing the features of your code
d d d d d d d d d d d d d
If I have set of commands S1 that describe data types in my language and a set of commands S
d d d d d d d d d d d d d d d d d d d
2 that describe creation of variables:
d d d d d
S1: int, decimal, bool
d d d
S2: <type> <name>, <type> <name> = <value>, constant <type> <name> = <value>
d d d d d d d d d d d
The set S3: int <name>, int <name> = <value>, constant int <name> = <value> --
d d d d d d d d d d d d d d
demonstrates what kind of orthogonality? - ans-SORT ORTHOGONALITY
d d d d d d dd d
When evaluating a programming language the category Writeability describes: - ans-
d d d d d d d d d dd
This concept is concerned with the actual production of code and the ability of the programmer
d d d d d d d d d d d d d d d
to easily use the language... syntax, abstraction, expressivity
d d d d d d d d
When evaluating a programming language the category Efficiency describes: - ans-
d d d d d d d d d dd
The 'first concern' historically. Concerned with how fast the code compiles and run
d d d d d d d d d d d d
When evaluating a programming language the category Reliability describes: - ans-
d d d d d d d d d dd
This concept is concerned with the internal safety and consistency of the language ... type che
d d d d d d d d d d d d d d d
cking, exceptions, etc. d d
Autocode and FORTRAN are considered to be the first high-level programming languages -
d d d d d d d d d d d d
ans-TRUE
dd
This quote: d
"When piloting a helicopter - changing speed can/
d d d d d d d
will change your direction and possibly vice versa"
d d d d d d d
Demonstrates that changing speed and/or direction is Orthogonal - ans-FALSE d d d d d d d d dd
What programming language characteristics impact the readability of the programs written in
d d d d d d d d d d d d
this language? - ans-Control Structures, Data Structures, Syntax Design
d d dd d d d d d
, In contrast to Web 1.0, what is the key function of Web 2.0? - ans-
d d d d d d d d d d d d d dd
Web is the computing platform d d d d
What is a feature of object-oriented computing? - ans-encapsulation of states
d d d d d d d dd d d
Event-driven computing paradigm is to.... - ans- d d d d d dd
define a set of events and write an event handler for each event.
d d d d d d d d d d d d
What programming paradigm does Fortran belong to? - ans-imperative
d d d d d d d dd
Which command will have a loop when expressed in a syntax graph? - ans-switch
d d d d d d d d d d d d dd
A programming languages can be broken down into four structural layers. Identify these layer
d d d d d d d d d d d d d
s. - ans-Syntax, Semantic, Contextual,
d dd d d
Can the identifier "base_variable" be created from the following BNF ruleset? - ans-
d d d d d d d d d d d dd
<char> ::= a | b | c | ... | s | ... | x | y | z d d d d d d d d d d d d d d d d d d
<identifier> ::= <char> | <char> <identifer> d d d d d
No - there is an underscore in the identifier name that cannot be generated.
d d d d d d d d d d d d d
What does the | (pipe) symbol in a BNF rule mean? - ans-
d d d d d d d d d d d dd
It is an or statement. Choose one of the options
d d d d d d d d d
Which commands (constructs) do NOT have a loop when expressed in syntax graphs?
d d d d d d d d d d d d
Select all that apply - ans-if-then-else
d d d d d dd
for ( <init-expr>; <test-expr>; <increment-expr> ) {<statements>}
d d d d d d
while (condition) do {statements;} d d d
Given:
Very Simple Programming Language (VSPL)
d d d d
<char> ::= a | b | c | ... | z | 0 | 1 | ... | 9 d d d d d d d d d d d d d d d d d d
<operator> ::= + | - | * | / | % | < | > | == | >= | <= d d d d d d d d d d d d d d d d d d d d
<variable> ::= <char> | <char> <variable> d d d d d
<expr> ::= <variable> <operator> <variable> | ( <expr> ) <operator> ( <expr> )
d d d d d d d d d d d d
<assign> ::= <variable> = <expr>; d d d d
<statements> ::= <assign> | <assign> <statements> d d d d d
The following is valid: d d d
a = x + y; b = s * t; c = w + v; - ans-TRUE
d d d d d d d d d d d d d d d dd
Given:
Very Simple Programming Language (VSPL)
d d d d