C Strings Quiz

C Strings Quiz

12th Grade

10 Qs

quiz-placeholder

Similar activities

Problem Solving using Python and R - UNIT I STRINGS MCQS

Problem Solving using Python and R - UNIT I STRINGS MCQS

12th Grade

15 Qs

Python Variables

Python Variables

7th - 12th Grade

10 Qs

Quiz Bab 3 : Kod Arahan

Quiz Bab 3 : Kod Arahan

12th Grade - University

10 Qs

Java Strings

Java Strings

9th - 12th Grade

12 Qs

45. Programming 1 : Data Types and Casting

45. Programming 1 : Data Types and Casting

9th - 12th Grade

11 Qs

Chapter 3 Review

Chapter 3 Review

9th - 12th Grade

15 Qs

Python Fundamentals

Python Fundamentals

11th - 12th Grade

15 Qs

Topics 7 & 8 - Static Methods/Variables and Null Keyword

Topics 7 & 8 - Static Methods/Variables and Null Keyword

12th Grade

8 Qs

C Strings Quiz

C Strings Quiz

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Manoj R

Used 3+ times

FREE Resource

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

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?