CS172 - Strings Week 12

CS172 - Strings Week 12

Assessment

Flashcard

Other

12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

11 questions

Show all answers

1.

FLASHCARD QUESTION

Front

A _________ is a data type typically used to hold a collection of printable characters such as words, sentences, or longer sequences.

Back

string

2.

FLASHCARD QUESTION

Front

When a literal value is assigned to a string, it should be surrounded by double _________.

Back

quotes

3.

FLASHCARD QUESTION

Front

To find the length of a string (number of characters), we can use the function.

Back

length

4.

FLASHCARD QUESTION

Front

It is also possible to use the arithmetic operator + with strings to _________ the two strings.

Back

concatenate

5.

FLASHCARD QUESTION

Front

This means you start at the beginning of a string, select each character in turn, do something to it, and continue until the end.

Back

traversal

6.

FLASHCARD QUESTION

Front

In order to use strings in your program you must first include the string _________.

Back

library

7.

FLASHCARD QUESTION

Front

Which of the following is closest equivalent to the code below?
char str[] = "hello";
Options:
char str[10] = "hello";
char str[10] = {'h','e','l','l','o',\0};
char str[10] = {'h','e','l','l','o'};
char str[6] = "hello";

Back

char str[6] = "hello";

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?