100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CSE 240 UPDATED ACTUAL Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
52
Grade
A+
Uploaded on
20-08-2025
Written in
2025/2026

CSE 240 UPDATED ACTUAL Exam Questions and CORRECT Answers True or false: Learning the concepts, logic and problem solving of programming unlocks our ability to learn knew languages. - CORRECT ANSWER - True Reliability speaks to how easily a programmer can express themselves reliably within the language. - CORRECT ANSWER - False Is sort orthogonality one-to-many, many-to-many, or a general lack of restriction? - CORRECT ANSWER - One-to-many

Show more Read less
Institution
CSE 240
Course
CSE 240











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CSE 240
Course
CSE 240

Document information

Uploaded on
August 20, 2025
Number of pages
52
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CSE 240 UPDATED ACTUAL Exam
Questions and CORRECT Answers
True or false: Learning the concepts, logic and problem solving of programming unlocks our
ability to learn knew languages. - CORRECT ANSWER - True


Reliability speaks to how easily a programmer can express themselves reliably within the
language. - CORRECT ANSWER - False


Is sort orthogonality one-to-many, many-to-many, or a general lack of restriction? - CORRECT
ANSWER - One-to-many


Is compositional orthogonality one-to-many, many-to-many, or a general lack of restriction? -
CORRECT ANSWER - Many-to-many


Is number orthogonality one-to-many, many-to-many, or a general lack of restriction? -
CORRECT ANSWER - General lack of restriction on reproducing features in your code



What does one-to-many mean? - CORRECT ANSWER - if you can combine one command in
a set of command with another command in another


What does many-to-many mean? - CORRECT ANSWER - if you can combine all the
commands in one set with all commands in another set


If I have set of commands S1 that describe data types in my language and a set of commands S2
that describe creation of variables:


S1: int, decimal, bool
S2: <type> <name>, <type> <name> = <value>, constant <type> <name> = <value>

,The set S3: int <name>, int <name> = <value>, constant int <name> = <value> -- demonstrates
what kind of orthogonality? - CORRECT ANSWER - Sort orthogonality



Sort Orthogonality is _ - CORRECT ANSWER - one-to-many



Compositional Orthogonality is: - CORRECT ANSWER - many-to-many



Number orthogonality is: - CORRECT ANSWER - General lack of restriction on reproducing
features in your code


Syntax Error asks what? - CORRECT ANSWER - Is the statement built correctly?



Context Error asks what? - CORRECT ANSWER - Is the statement built from the right stuff?



Semantic Error asks what? - CORRECT ANSWER - Is the program doing the right things?



PEBCAK Error is what? - CORRECT ANSWER - When the user/programmer is being stupid


True or False: In Backus Naur Form, non-terminals contained in () are required in the syntax. -
CORRECT ANSWER - False


True or False: Backus Naur Form allows for recursive definitions of non-terminal symbols. The
definitions are usually separated with a | (aka a "pipe"). - CORRECT ANSWER - True


Which command will have a loop when expressed in a syntax graph?
1. while-loop
2. if-then-else
3. switch

,4. if-then - CORRECT ANSWER - switch


Which of the following cannot be checked by an imperative or object-oriented compiler. (Check
all that applies.)
1. Lexical
2. Semantics
3. Contextual

4. Syntactic - CORRECT ANSWER - Semantics


If your program was designed to print "Hello World" ten (10) times, but during execution, it
printed eleven (11) times. What type of error is it? - CORRECT ANSWER - Semantics error


Which commands (constructs) do NOT have a loop when expressed in syntax graphs? Select all
that apply


1. if-then-else
2. while (condition) do {statements;}
3. switch (expr) { case value: statements ;}
4. for ( <init-expr>; <test-expr>; <increment-expr> ) {<statements>} - CORRECT
ANSWER - 1, 2, 4


Given Very Simple Programming Language (VSPL):


<char> ::= a | b | c | ... | z | 0 | 1 | ... | 9
<operator> ::= + | - | * | / | % | < | > | == | >= | <=
<variable> ::= <char> | <char> <variable>
<expr> ::= <variable> <operator> <variable> | ( <expr> ) <operator> ( <expr> )
<assign> ::= <variable> = <expr>;
<statements> ::= <assign> | <assign> <statements>

, Is the following valid?

my_int = int1 + int2; - CORRECT ANSWER - No, not valid because of the underscore. To be
valid, the underscore would have to be in the VSPL symbols


Given Very Simple Programming Language (VSPL):


<char> ::= a | b | c | ... | z | 0 | 1 | ... | 9
<operator> ::= + | - | * | / | % | < | > | == | >= | <=
<variable> ::= <char> | <char> <variable>
<expr> ::= <variable> <operator> <variable> | ( <expr> ) <operator> ( <expr> )
<assign> ::= <variable> = <expr>;
<statements> ::= <assign> | <assign> <statements>


Is the following valid?

myvar = (x + y) * (a - c); - CORRECT ANSWER - Yes. variable = expression (operator)
expression. (Reminder: | means or)


Given Very Simple Programming Language (VSPL):


<char> ::= a | b | c | ... | z | 0 | 1 | ... | 9
<operator> ::= + | - | * | / | % | < | > | == | >= | <=
<variable> ::= <char> | <char> <variable>
<expr> ::= <variable> <operator> <variable> | ( <expr> ) <operator> ( <expr> )
<assign> ::= <variable> = <expr>;
<statements> ::= <assign> | <assign> <statements>


Is the following valid?

Get to know the seller

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.
MGRADES Stanford University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1067
Member since
1 year
Number of followers
102
Documents
68976
Last sold
15 hours ago
MGRADES (Stanford Top Brains)

Welcome to MGRADES Exams, practices and Study materials Just think of me as the plug you will refer to your friends Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

168 reviews

5
73
4
30
3
43
2
8
1
14

Recently viewed by you

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

Frequently asked questions