CSCI 1301 - Chapter 1

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

Value

cannot be simplified further and belongs exclusively to some type

(8 // this is the number 8

"Hello" // this is the string "Hello"

True // this is the Boolean value True)

2
New cards

Types

a defining shape of data, describes a set of valid values which follow a set of restrictions

(Boolean, Int, Char,

String)

3
New cards

Operators

describe computations which can be performed on a set number of values of a given type

(+, -, /, \*,%, &&, ||, ==, <=, >=, !=, !, +)

4
New cards

Expression

a set of values and operators which evaluate to become a single value

(11+ (33/3))

5
New cards

Boolean

represents the logical value true or false

6
New cards

Boolean Operators

NOT (!), AND(&&), OR(||)

(!true, true && true, false || !false && true || false)

7
New cards

Int (integer)

a whole number, who's value is between -2,147,483,648 and 2,147,483,647

8
New cards

uint (unsigned int)

a positive whole number which is a value between 0 and 4,294,967,295.

9
New cards

Addition

Add: (int,int)→int returns the sum of two integers.

10
New cards

Overflow

If the sum exceeds int.MaxValue, int wraps around to int.MinValue

11
New cards

Subtraction

(int,int)→int returns the difference between two integers

12
New cards

Underflow

If the difference is less than int.MinValue, int wraps around to int.MaxValue.

13
New cards

Multiplication

(int,int)→int returns the product of two integers.

14
New cards

Integer Division

(int,int)→int returns the quotient of two integers, discarding any remainder.

15
New cards

Division by Zero

results in a DivideByZeroException

16
New cards

Truncation

The fractional part of the division is discarded.

17
New cards

Modulo

(int,int)→int returns the remainder of a division between two integers.

18
New cards

Remainder

The result is always an integer between 0 (inclusive) and the absolute value of the divisor (exclusive).

19
New cards

Floating-Point Representation

defines a valid range for its whole value, along with a precision which determines what fractionals are possible.

20
New cards

double

a 64-bit floating-point number used to approximate real numbers (range of approximately ±1.7976931348623157E+308 and a precision of 15-16 decimal digits)

21
New cards

float

a 32-bit floating-point number used to approximate real numbers (a range of approximately ±3.4028235E+38 and a precision of 7 decimal digits)

22
New cards

decimal

a 128-bit floating-point number designed for precise representation of decimal fractions (range of approximately ±7.9228162514264337593543950335 and a precision of 28-29 decimal digits)

23
New cards

Comparison

an operation that takes two values and produces a boolean by checking their relationship.

24
New cards

Char

a 16-bit value type representing a single text character with a value between 0 and 65,535.

25
New cards

Character Addition

(char,int)→int returns the numeric result of adding a character's code and an integer

26
New cards

Strings

an indexed immutable collection of characters.

27
New cards

Concatenation

(string,string)→string returns a new string containing all characters from both inputs in order

28
New cards

ToUpper

string→string returns a new string with all characters converted to uppercase

29
New cards

ToLower

string→string returns a new string with all characters converted to lowercase

30
New cards

Length

string→int returns the number of characters in the string