Search Header Logo

Module 7: Strings

Authored by mic micdeJC

Computers

Professional Development

Used 1+ times

Module 7: Strings
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is a string in C?

A collection of integers

A data type to store multiple characters

A single character

A reserved keyword

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which character is used to terminate a C string?

Null character '\0'

Exclamation mark '!'

Question mark '?'

Asterisk '*'

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How do you declare and initialize a string in C?

Using double quotes like "Hello, World!"

Using a semicolon at the end of a character array

Using the keyword "string"

Using angle brackets like <string>

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of concatenating the strings "Hello" and "World" in C?

"HelloWorld"

"Hello World"

"Hello,World"

"Hello World!"

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In C, how do you modify a character in a string?

Use the strcat() function

Use the strncpy() function

Use an assignment statement like str[3] = 'X';

You cannot modify characters in a string

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?