Search Header Logo

C Programming: Arrays and Strings Quiz

Authored by Ed Sepulveda

Computers

9th - 12th Grade

Used 2+ times

C Programming: Arrays and Strings Quiz
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

30 sec • 1 pt

What function is used to find the length of a string in C?

sizeof()

strcpy()

strcat()

strlen()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the first element of an array in C?

arr[1]

arr[0]

arr[first]

arr[-1]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What character is used to terminate all strings in C?

'\n'

'\a'

'\t'

'\0'

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to concatenate two strings in C?

strcat()

strlen()

strcomp()

strcpy()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if you try to access an array element at an index greater than the length of the array?

The program will automatically resize the array

The program will print an error message

The program will behave unpredictably

The program will terminate normally

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?