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

CSE 1321 STUDY GUIDE EXAM 2026/2027 QUESTIONS AND SOLUTIONS RATED A+

Document preview thumbnail
Preview 2 out of 5 pages

CSE 1321 STUDY GUIDE EXAM 2026/2027 QUESTIONS AND SOLUTIONS RATED A+

Content preview

CSE 1321 STUDY GUIDE EXAM 2026/2027 QUESTIONS AND
SOLUTIONS RATED A+
✔✔Conversion Techniques - ✔✔- Assignment conversion
Example: assign an int to a long

-Promotion
Example: divide an int by a double

- Casting
Example: assign a double to int

✔✔Explicit Type Casting - ✔✔Syntax:
(dataType)(expression)

Note: parentheses around the expression are optional if the expression consists of 1
variable

Useful for calculating averages:
double result = (double) 25/3;
double result = (double) total / count;

✔✔Expression evaluation follow - ✔✔operator precedent rule (order of operations).

✔✔The order of statement execution is called the - ✔✔flow of control

✔✔By default, execution is - ✔✔linear: one statement after another

✔✔A ------- allows us to choose which statements will be executed next: - ✔✔Selection
(conditional) statement

✔✔if - ✔✔if - block of code executes if a Boolean expression is true.
(selection statement)

✔✔if-else - ✔✔will execute one block of code if the Boolean expression is true, or
another if it is false.
(selection statement)

✔✔if-else-if - ✔✔tests a series of Boolean expressions and execute corresponding
block when it finds one that is true.
(selection statement)

✔✔switch - ✔✔lets the value of a variable determine where the program will branch to.

, ✔✔Relational Operators - ✔✔Create a true or false using a relational operator:

> greater than
< less than
== equals
! not
!= not equal
>= greater than or equal
<= less than or equal

✔✔!
!= - ✔✔not not equal to (relational operators)

✔✔Logical Operators - ✔✔Boolean expressions can also use the following logical
operators:
Logical NOT
Logical AND
Logical OR
Exclusive OR

✔✔Mathematical operators have ------ than the Relational and Logical operators -
✔✔higher precidence

✔✔&&
I I - ✔✔And
Or
(logical operators)

✔✔The ------- provides another way to decide which statement to execute next -
✔✔switch statement

✔✔The switch statement evaluates an --------, then attempts to match the result to one
of several possible - ✔✔expression, cases (cases)
-Each case contains a value and a list of statements
-The flow of control transfers to statement associated with the first case value that
matches

✔✔Often a ------ is used as the last statement in each case's statement list - ✔✔break
statement

✔✔A break statement causes control to transfer to the - ✔✔end of the switch statement.
-If a break statement is not used, the flow of control will continue into the next case

✔✔Default Case - ✔✔-A switch statement can have an optional default case

Document information

Uploaded on
April 7, 2026
Number of pages
5
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.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.
EXAMCAFE
3.4
(19)
Sold
156
Followers
7
Items
26055
Last sold
2 days 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