1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What computing paradigm enforces stateless (no side-effects) programming?
functional
What is a feature of object-oriented computing?
encapsulation of states
What programming paradigm does Fortran belong to?
imperative
What programming language characteristics impact the readability of the programs written in this language?
Syntax design, Data structures, Control structures
What computing paradigm can solve a problem by describing the requirements, without writing code in a step-wise fashion to solve the problem.
logic
How many different identifiers can the following BNF ruleset generate?
<char> ::= a | b | c | ... | x | y | z
<identifier> ::= <char> | <char> <identifier>
more than 26
What does the | (pipe) symbol in a BNF rule mean?
It is an "or" operation. Choose one of the options.
For the following BNF ruleset, which are terminal symbols? Select all that apply.
<char> ::= a | b | c | ... | x | y | z
<identifier> ::= <char> | <char> <identifier>
a, y
Which of the following cannot be checked by an imperative or object-oriented compiler. (Select the most problematic one.)
Interpretation
Which implementation of a function has potentially the best performance in terms of execution speed?
macro
Assume a function requires 20 lines of machine code and will be called 10 times in the main program. You can choose to implement it using a function definition or a macro definition. Compared with the function definition, macro definition will lead the compiler to generate, for the entire program, ______
a longer machine code program but with shorter execution time.
Given the following code, what is the expected value for z? Assume that you are using a compiler that doesn't do any special treatment of macro parameters.
#include <stdio.h>
#define func(x, y) (x > y) ? y : x
int main()
{
int x = 10;
int y = 9;
int z = func(++x, y++);
}
10