C++ II Exam 1(Memory and Strings Portion)

0.0(0)
studied byStudied by 1 person
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

flashcard set

Earn XP

Description and Tags

Only study with the multiple choice option!

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

Which of the following statements A, B or C is false?

All of the above statements are true.

2
New cards

For programs that still require pointer-based, C++20 adds new features that help make your programs safer and more robust. Which of the following statements is false?

spans also work with std::array and std::vector, but spans cannot be used with standard library container-processing algorithms, such as accumulate and sort.

3
New cards

Which of the following statements is false?

Referencing a value through a pointer is called redirection.

4
New cards

Which of the following statements A, B or C is false?

The C++ Core Guidelines recommend for modern C++ always initialize pointers with NULL.

5
New cards

Which of the following statements A, B or C is false?

All of the above statements are true.

6
New cards

Which of the following statements is false?

A dereferenced pointer can be used as an rvalue in an assignment, but not as an lvalue in an assignment.

7
New cards

Which of the following statements A, B or C is false?

All of the above statements are true.

8
New cards

Which of the following statements is false?

Built-in arrays are never required.

9
New cards

Which of the following statements is false?

You need to take a built-in array's address (&) to pass it to a function.

10
New cards

Which of the following statements is false?

Pass-by-value copies an argument's value into a function's parameter. If the copy is modified in the called function, the original value in the caller changes as well.

11
New cards

Which of the following ways to declare a pointer provides the greatest level of access privilege?

Nonconstant pointer to nonconstant data.

12
New cards

Which of the following statements A, B or C is false?

Applying sizeof to a pointer returns the size of what the pointer points to.

13
New cards

Which of the following statements is false?

All of the above statements are true.

14
New cards

Which of the following statements A, B or C is false?

string_views are read-write views of C-strings or std::string objects.

15
New cards

Which of the following statements A, B or C is false?

All of the above statements are true.

16
New cards

Which of the following statements A, B or C is false?

std::string comparisons are performed alphabetically.

17
New cards

Which of the following statements A, B or C is false?

The result of a substr call is a view into an existing string object.

18
New cards

Which of the following statements A, B or C is false?

The strings being swapped must have the same length.

19
New cards

Which of the following statements A, B or C is false?

If a substring or character is not found, the string find-related functions return the constant null.

20
New cards

Which of the following statements A, B or C is false?

to_string is overloaded for the fundamental numeric types int, unsigned int, long, unsigned long, long long, unsigned long long, float, double and long double.