C Strings Quiz

C Strings Quiz

12th Grade

10 Qs

quiz-placeholder

Similar activities

Data Type Review

Data Type Review

KG - Professional Development

12 Qs

UAS Praktikum: Logika dan Algoritma Pemrograman

UAS Praktikum: Logika dan Algoritma Pemrograman

1st Grade - University

10 Qs

Mastering Python String Techniques

Mastering Python String Techniques

9th - 12th Grade

10 Qs

String Methods

String Methods

9th - 12th Grade

10 Qs

PROGRAMMING IN C - UNIT 3 MCQS

PROGRAMMING IN C - UNIT 3 MCQS

12th Grade

15 Qs

Șiruri de caractere - funcții

Șiruri de caractere - funcții

10th Grade - University

15 Qs

Practice for 8th AP Java Quiz

Practice for 8th AP Java Quiz

10th - 12th Grade

14 Qs

Hello World - Quiz

Hello World - Quiz

9th - 12th Grade

13 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?