• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 11 pages
Exam (elaborations)

CSE 240 Midterm questions with complete solutions

Document preview thumbnail
Preview 2 out of 11 pages

CSE 240 Midterm questions with complete solutions

Content preview

CSE 240 Midterm questions with complete
solutions

What key feature of programming languages is supported by C++, but not Java? - ans-
d d d d d d d d d d d d d dd




Pointers

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 platformd d d d




What computing paradigm enforces stateless (no variable allowed) programming? - ans-
d d d d d d d d d dd




Functional

What computing paradigm can solve a problem by describing the requirements, without writin
d d d d d d d d d d d d




g code in a step-wise fashion to solve the problem? - ans-logic
d d d d d d d d d d dd




What is the major improvement of structured programming languages over the earlier progra
d d d d d d d d d d d d




mming languages? - ans-Removing Goto statement from the language.
d d dd d 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




What programming languages better prepare you for leaning database query languages suc
d d d d d d d d d d d




h as SQL and LINQ? - ans-Prolog and Scheme
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 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, Syntax design, and Data Structures
d d dd d d d d d d




Given the following code, what is the expected value for z?
d d d d d d d d d d




#include <stdio.h> d




#define func(x, y) (x > y) ? y : x d d d d d d d d d




int main() d




{
int x = 10;
d d d d d




int y = 9;
d d d d




int z = func(++x, y++);
d d d d d d




} - ans-10
d dd




Explicit type conversion is commonly referred to as __________ . - ans-Casting.
d d d d d d d d d d dd

, If you like to see accurate debugging information, which of the following program processing
d d d d d d d d d d d d d d




would you recommend? - ans-Interpretationd d d dd




What is the main reason of applying two-
d d d d d d d




step translation of high level programming language? - ans-One compiler for all machines
d d d d d d d dd d d d d




Can the identifier "base_variable" be created from the following BNF ruleset?
d
d d d d d d d d d d




<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> <identifier> - ans-No - d d d d d d dd d




there is an underscore in the identifier name that cannot be generated.
d d d d d d d d d d d d




ow many different identifiers can the following BNF ruleset generate?
d
d d d d d d d d d




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




<identifier> ::= <char> | <char> <identifier> - ans-More than 26. d d d d d d dd 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, for ( <init-expr>; <test-expr>; <increment-
d d d d d dd d d d d d




expr> ) {<statements>} , while (condition) do {statements;}
d d d d d d d




Given this snippet of code in C, d d d d d d




char alpha = 'a'; d d d




int numeric = alpha + 10;
d d d d d




which of the following statement is correct: - ans-
d d d d d d d dd




Syntactically correct, but contextually incorrect. d d d d




What is "func" in this example? d d d d d d




#include <stdio.h> d




#define func(x, y) (x > y) ? y : x d d d d d d d d d




int main() d




{
int x = 10;
d d d d




int y = 9;
d d d d




int z = func(x, y);
d d d d d




} - ans-A macro
d dd d




Which implementation of a function has potentially the best performance in terms of executio
d d d d d d d d d d d d d




n speed? - ans-macro
d d dd




Given the following code, what is the expected value for z?
d d d d d d d d d d




#define func(x, y) (x > y) ? y++ : x++ d d d d d d d d d

Document information

Uploaded on
October 11, 2026
Number of pages
11
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
CA$21.85

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
VICTORYSUCCESS
3.0
(2)
Sold
20
Followers
0
Items
2306
Last sold
3 weeks ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions