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 9 pages
Exam (elaborations)

CSE 1321 STUDY GUIDE EXAM 2026.pdf

Document preview thumbnail
Preview 2 out of 9 pages

CSE 1321 STUDY GUIDE EXAM

Content preview

CSE 1321 STUDY GUIDE EXAM 2026/2027 QUESTIONS
AND SOLUTIONS RATED A+
✔✔What is the output of the following code?

BEGIN MAIN
int u = 3;
int v = 5;
u += v;
v += u;
u -= v;
v -= u;
PRINT (u + ", " + v);
END MAIN

a) 5, 3
b) -5,-3
c) 3, 5
d) -5, 18 - ✔✔d) -5, 18

✔✔What would be the best datatype to represent product? A variable that stores
information about the number of items currently in stock in a grocery store.

a) double
b) int
c) float
d) String - ✔✔b) int
(number of items in the store is going to be a whole number)

✔✔What is the value of j after this code is executed?

BEGIN MAIN
int i = 6, int j=10;
j+=i;
END MAIN

a) 10
b) 6
c) 4
d) 16 - ✔✔d) 16

✔✔A String (or string) object is a primitive data type.

true or false - ✔✔false

, ✔✔a string is actually: - ✔✔- Strings are immutable which means once a String object is
created its contents cannot be changed. (cant change in memory)
- complex: can be broken down into characters

✔✔What is the output of the following code?

BEGIN MAIN
int num1 = 500;
int num2 = 200;
int num3 = 300;
double average = num1 + num2 + num;
PRINTLINE(average);
END MAIN

a) 333.33333333333
b) 333.0
c) Error message
d) 800.0 - ✔✔d) 800.0

✔✔If the expression xyz % 3 == 0 is true and xyz is a positive integer, then the value
stored in the variable xyz is evenly divisible by 3.

true or false - ✔✔true

✔✔Consider the expression: value >= 30
Which of the following is equivalent to this expression?

a) value > 30 OR value == 30
b) NOT(value < 29)
c) NOT(value > 31)
d) value > 30 AND value == 30 - ✔✔a) value > 30 OR value == 30

✔✔Consider two variables x and y. If the values of x =5 and y=10

BEGIN MAIN
IF(x < 0)
{
PRINT "Mr.Spock"
}
ELSE
{
IF (x > y)
{
PRINT "Captain Kirk"
}

Document information

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

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