Search Header Logo

C Strings Quiz

Authored by Manoj R

Computers

12th Grade

Used 4+ times

C Strings Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a string in C?

char str = 'Hello';

char str[] = "Hello";

string str = 'Hello';

int str = 'Hello';

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to output a string in C?

print()

display()

printf()

printline()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to compare two strings in C?

compareStr()

strcomp()

strcmp()

stringCompare()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you concatenate two strings in C?

concat(string1, string2)

strcat(string1, string2)

strconcat(string1, string2)

strjoin(string1, string2)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the significance of the strcmp() function in C?

It is used to concatenate two strings in C.

It is used to find the length of a string in C.

It is used to convert a string to uppercase in C.

It is used to compare two strings in C.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Describe the role of strcat() function in C string manipulation.

The role of strcat() function in C string manipulation is to concatenate two strings.

The role of strcat() function is to split strings.

strcat() function reverses the order of strings.

strcat() function compares two strings.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the return type of strlen() function in C?

int

char

size_t

void

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?