CSE 1348 Final

0.0(0)
studied byStudied by 0 people
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

What does it mean that C++ is a compiled language?

Translates code base; then executes pre-translated version

2
New cards

What are library imports? What do they allow?

commands in C++ that allow access to pre-written code in libraries, enabling the use of functions, classes, and objects defined elsewhere.

3
New cards

How is C++ delimited? What is a delimiter?

symbols such as semicolons, braces, and parentheses, which define the boundaries of statements, code blocks, and expressions. A character or sequence of characters that separates distinct parts of the code.

4
New cards

What does explicitly typecast mean?

declare what data type a variable is

5
New cards

What are the six built-in data types in C++ (and declare them)

integer (int)
character (char)
boolean (bool)
floating point (float)
double floating point (double)
wide character (wchar_t)

6
New cards

What is a data type identifier?

a name assigned by the user for a program element such as variable, type, class, function, or namespace

7
New cards

What are strings? Are they included by default?

sequences of characters used to represent text, and they are not included by default in C++. To use them, you must include the <string> library.

8
New cards

What do chars actually hold? (ASCII code)

holds a single, unicode character

9
New cards

Be able to:

Identify the library needed; complete an example line for can and cout

10
New cards

is whitespace automatically added for output statements?

No

11
New cards

What Determines what data type your input is?

pre-defined/pre-declared variable

12
New cards

Why can you do math with chars?

Because they have ASCII values that represent numerical values; it ranges -128 to 127 or 0 to 265

13
New cards

C++ must be organized into what?

Functions

14
New cards

What is the function that must exist and is called by default?

“main” funtion

15
New cards

What are the basic comparisons and what do they mean?

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

16
New cards

How do you structure a condition statement— singular and compound, and/or? [if else]

enclosed within parentheses
if (number == 0)
compounded condition -> and="&&" /or="||"
else if (number > 0 && number < 10

17
New cards

Comparisons (can and cannot)

Can:

int and floats

ints and chars

floats and char

Cannot:

strings and anything else

18
New cards

what is a switch statement?

statements that allows you to test equality of a single variable for multiple options

19
New cards

how are switch options defined

cases (*?)

20
New cards

what does switch test for?

equality

21
New cards

what is a default case?

triggers if no other case did; similar to an else in an if/else statement

22
New cards

how should you end every case? why?

break;

if true stops the program from checking other programs

23
New cards

can you have compound comparisons in a while loop?

yes

24
New cards

how do you have a variable local to a condition / loop? what does that mean?

the local variable is inside the loop; meaning it cannot work outside of the loop

25
New cards

be able to:

Properly trace a condition statement
Construct the for loop
Construct a compound comparison while loops that isn't infinite

26
New cards

Arrays

Stores a fixed-size sequential collection of element of the same type of data; must have a set / predetermined size Built into c++

27
New cards

vectors

Dynamic array; can hod multiple items: NOT built into C++ can only hold one predetermined data type

28
New cards

Be able to:

Declare Array and Vectors
Declare Character Array
Identify/before before/after given certain functions

29
New cards

How can you get a string? How is this different for cin?

getline(stream,variable)

get line(cin,name)

it stores the entire line of input the user types

30
New cards

what is a function

group of statements what a name that can be repeatedly called