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 4 out of 51 pages
Exam (elaborations)

PSU CS 101 FULL REVISION NOTES WITH ALGORITHMS.

Document preview thumbnail
Preview 4 out of 51 pages

PSU CS 101 FULL REVISION NOTES WITH ALGORITHMS.

Content preview

PSU CS 101 FULL REVISION NOTES WITH
ALGORITHMS, DATA STRUCTURES, AND BASIC
CODING CONCEPTS

◉ !((numPeople > 10) && (numCars > 2)).
Answer: The && expression is false. So !(false) is true.


◉ %.
Answer: modulo (remainder


◉ modf.
Answer: Break into fractional and integral parts.


◉ Iterate until c equals 'z'.
Answer: c != 'z'


◉ bool(short for Boolean).
Answer: data type is for variables that store only values true or false.


◉ Binary operators.

,Answer: The relational operators and logical operators (except for !)
are binary operators.
Take two operands (from the left and right) and evaluate to true or
false.


◉ bitewise.
Answer: perform AND or OR on corresponding individual bits of the
operand.


◉ Mixing bitwise and logical operators.
Answer: x == 3 | y > 1 && z != 3
Answer= ((x == 3) || (y > 1)) && (z!= 3)


◉ Short circuit evaluation.
Answer: skips evaluating later operands if the result of the logical
operator can already be determined.


◉ Switch.
Answer: statement can more clearly represent multi-branch
behavior involving a variable being compared to constant values.


◉ case.

,Answer: whose constant comparison matches the value of the
switch expression, executes that case's statements, and then jumps
to the end.


◉ default case.
Answer: in no case matches, statements are executed


◉ break.
Answer: statement for a case will cause the statements within the
next case to be executed.


◉ Boolean.
Answer: refers to a quantity that has only two possible values, true
or false.


◉ bool.
Answer: for representing Boolean quantities


◉ index.
Answer: Each string character has a position number


◉ at().

, Answer: the notation someString. at (0) access the character at a
particular index of a string, in this case index 0.


◉ common error.
Answer: is to access an invalid array index, especially exactly one
larger than the largest index.


◉ exception.
Answer: is a detected runtime error that commonly prints an error
message and terminates the program.


◉ Good practice.
Answer: is to use .at() rather than brackets for accessing a string's
characters, due to .at()'s error checking.


◉ conditional expression.
Answer: condition ? exprWhenTrue : exprWhenFalse


◉ ternary operator.
Answer: A conditional expression has three operands and thus the
"?" and ":" together are sometimes referred to.


◉ epsilon.

Document information

Uploaded on
August 11, 2026
Number of pages
51
Written in
2026/2027
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.
TopGradeInsider
4.2
(13)
Sold
165
Followers
2
Items
55165
Last sold
22 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