M1: CSE 240

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:27 PM on 2/6/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

12 Terms

1
New cards

What computing paradigm enforces stateless (no side-effects) programming?

functional

2
New cards

What is a feature of object-oriented computing?

 

encapsulation of states

3
New cards

What programming paradigm does Fortran belong to?

imperative

4
New cards

What programming language characteristics impact the readability of the programs written in this language?

Syntax design, Data structures, Control structures

5
New cards

What computing paradigm can solve a problem by describing the requirements, without writing code in a step-wise fashion to solve the problem.

logic

6
New cards

How many different identifiers can the following BNF ruleset generate?

<char> ::= a | b | c | ... | x | y | z

<identifier> ::= <char> | <char> <identifier>

more than 26

7
New cards

What does the | (pipe) symbol in a BNF rule mean?

It is an "or" operation.  Choose one of the options.

8
New cards

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

9
New cards

Which of the following cannot be checked by an imperative or object-oriented compiler. (Select the most problematic one.)

Interpretation

10
New cards

Which implementation of a function has potentially the best performance in terms of execution speed?

macro

11
New cards

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.

12
New cards

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