Search Header Logo

CS172 - Strings Week 12

Authored by Mr. Martin

Other

12th Grade

Used 3+ times

CS172 - Strings Week 12
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

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

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

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

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

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

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

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

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

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

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

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

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is closest equivalent to the code below?

char str[] = "hello";

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";

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?