Search Header Logo
CHAPTER 19 - C++

CHAPTER 19 - C++

Assessment

Presentation

Instructional Technology

8th Grade

Easy

Created by

Klea h

Used 6+ times

FREE Resource

24 Slides • 26 Questions

1

media

2

media

3

media

4

Multiple Choice

Which game is not coded in C++?

1
The Sims
2

GTA5

3
Minecraft
4

PubG

5

media

6

Multiple Choice

Which of the following is NOT commonly created using C++?

1

Operating Systems

2

Video Games

3

Smart Contracts

4

Databases

7

media

8

Multiple Choice

C++ is __________ sensitive.

1

keyword

2

case

3

time

4

syntax

9

Multiple Choice

What is mandatory in every C++ program?

1

Class definition

2

Skeleton program

3

Public inheritance

4

Static methods

10

Multiple Choice

In C++, every statement must end with a __________.

1
comma
2
semicolon
3
period
4
exclamation mark

11

media

12

Multiple Choice

In C++, the operator << is known as:

1
stream output operator
2
stream insertion operator
3
stream redirection operator
4
stream display operator

13

media

14

Multiple Choice

Which code will output "HelloWorld" without a space between words?

1

cout << "Hello" << "World";

2

cout << "Hello" << endl << "World";

3

cout << "Hello " << "World";

4

cout << "Hello" << endl; cout << "World";

15

Multiple Choice

What is the effect of inserting << endl in C++ output?

1

It adds a tab space

2

It deletes previous output

3

It moves to the next line

4

It prints a special symbol

16

media

17

Multiple Choice

Which is an example of a single-line comment in C++?

1
# comment
2
/* comment */
3
// comment
4
//

18

Multiple Choice

Block comments in C++ are enclosed by:

1
# and #
2
// and //
3
/* and */
4

19

media

20

Fill in the Blanks

21

media

22

Multiple Choice

Which of the following is a valid C++ variable declaration?

1
int myVariable;
2

integer myVariable;

3

charactor myVariable;

4

int myVariable

23

media

24

Multiple Choice

Which variable name is invalid in C++?

1
c) 2ndPlace
2

distance_covered

3
amount$
4
total_value1

25

media

26

Multiple Choice

Which is a correctly written constant in C++?

1
const int 100 = MAX_VALUE;
2
const int MAX_VALUE = 100;
3
int const MAX_VALUE = 100;
4
const MAX_VALUE : int = 100;

27

Multiple Choice

Which keyword is used to define a constant in C++?

1

class

2

Constant

3
final
4
const

28

media

29

media

30

Multiple Choice

Which command is used for standard input in C++?

1
cin
2
scanf
3
cout
4
printf

31

media

32

Multiple Choice

Which function is used to read an entire line, including spaces?

1

readLine(cin, var)

2

getLine(cin, var)

3

input(cin, var)

4

scanLine(cin, var)

33

Task: Write a program that asks the user for their name, age and grade, then prints a greeting.

Requirements:

✅ Use cout to ask for the user's name, age, and grade
✅ Use cin to receive input from the user
✅ Display a message to welcome them to Computer Lab.
✅ Add
at least one single-line comment explaining a line of code
✅ Add
one multi-line comment describing what the program does at the beginning
✅ Share the link of your program via Quickschools

34

media

35

Multiple Choice

Which operator is used for multiplication in C++?

1

x

2

**

3

mult

4
*

36

media

37

Multiple Choice

C++ does NOT have an exponent (power) operator

1

True, you cannot do exponent calculations in C++

2

False, C++ uses the ^ operator for exponentiation.

3

I have no idea what exponent is

4

True, but it provides a method from Math library

38

media

39

Multiple Choice

  • Which relational operator means "not equal to" in C++?

1

!=

2

!==

3

><

4

=!

40

Multiple Choice

Which relational operator checks for greater than or equal to?

1

=>

2

>=

3

=>=

4

>==

5

=<=

41

media

42

Multiple Choice

In C++, which operator represents logical AND?

1
||
2
&
3
and
4
&&

43

Multiple Choice

Which symbol is used for logical OR in C++?

1
&&
2
|
3

OR

4
||

44

media

45

Multiple Choice

Which is a correct if statement syntax in C++?

1
if (condition) // code to execute }
2
if condition { // code to execute }
3
if { condition } // code to execute
4

if (condition) {

// code to execute

}

46

media

47

Multiple Choice

Which keyword must immediately follow if, if you ned to add 2 other conditions?

1

elif

2

else if

3
while
4

else

48

Multiple Choice

In C++, else without an if block is:

1
valid syntax
2
optional syntax
3
invalid syntax
4
conditional syntax

49

media

50

media
media

Show answer

Auto Play

Slide 1 / 50

SLIDE