Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

CSE 1321 CORE EXAMS SET 2026.pdf

Document preview thumbnail
Preview 2 out of 6 pages

CSE 1321 CORE EXAMS SET

Content preview

CSE 1321 CORE EXAMS SET 2026/2027 QUESTIONS AND
SOLUTIONS RATED A+
✔✔If the variable isTested is a Boolean, then the statement below is a valid control
expression:

IF(isTested)

true or false - ✔✔true

✔✔In programming && is considered an arithmetic operator.

true or false - ✔✔false

✔✔If x = 3, y = 1, and z = 5 then the following Boolean expression evaluates to true:

( x > 0) && (y == 0) || (z < 5)

true or false - ✔✔false

✔✔The Boolean expression ((A AND B) AND (NOT(A AND B)) evaluates to:

a) true whenever both A is true and B is true.
b) false in all cases.
c) true whenever only A is true or only B is true.
d) true in all cases. - ✔✔b) false in all cases.

✔✔Which statement below will be true after the following code terminates?

BEGIN MAIN
CREATE x = 0
WHILE (x < 100)
{
x *= 2;
}
END WHILE
END MAIN

a) x == 98
b) x == 2
c) The loop won't terminate. It's an infinite loop.
d) x == 0 - ✔✔c) The loop won't terminate. It's an infinite loop.

(0 * 2 will always be 0 so infinite loop)

, ✔✔Consider this code:

BEGIN MAIN
int y=1;
int x=1;
PRINTLINE(x++);
END MAIN

What will this code print?

a) 2
b) 0
c) 1
d) unknown - ✔✔c) 1

✔✔A relational operator used when comparing primitive data types is !=.

true or false - ✔✔true

✔✔A switch statement is similar to an if statement in that both are used to alter the flow
of a program.

true or false - ✔✔true

✔✔Pseudocode form of writing should be used only when the logic of the program is
complex.

true or false - ✔✔false

✔✔Is this valid syntax for a FOR loop?

BEGIN MAIN
FOR(CREATE j = 0; j < 1000; j++) PRINT(j) END FOR
END MAIN

True or False - ✔✔true

✔✔Mathematical Operators are: - ✔✔Addition: +
subtraction: -
Multiplication: *
Divison: /
Modulus (remainder): %

✔✔Comparison/Relational Operators are: - ✔✔"==" equals to
"!=" not equals to

Document information

Uploaded on
July 21, 2026
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$16.49

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.
BOARDWALK
3.5
(40)
Sold
276
Followers
8
Items
32861
Last sold
5 hours 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