
C Strings Quiz

Quiz
•
Computers
•
3rd Grade
•
Medium
priyanka it
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the correct way to declare a string in C?
char myString[] = "Hello";
char myString[6] = 'Hello';
string myString = 'Hello';
char myString = 'Hello';
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which function is used to find the length of a string in C?
strlength()
strlen()
stringlength()
len()
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How do you concatenate two strings in C?
strcat(string1, string2)
concat(string1, string2)
strncat(string1, string2, n)
append(string1, string2)
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which function is used to compare two strings in C?
strcmp()
add()
multiply()
divide()
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the correct way to input a string in C?
input()
print()
cin >>
scanf()
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which function is used to find the first occurrence of a character in a string in C?
findchar()
strrchr()
strchr()
index()
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the correct way to copy one string to another in C?
moveString(destination, source)
copyString(destination, source)
duplicateString(destination, source)
strcpy(destination, source)
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Java Strings

Quiz
•
1st Grade - Professio...
10 questions
Pseudo code Practice 1

Quiz
•
1st - 3rd Grade
10 questions
Programming - Basic String Manipulation

Quiz
•
2nd - 10th Grade
10 questions
Intro to Python

Quiz
•
KG - University
14 questions
Data Types in Python

Quiz
•
1st - 5th Grade
14 questions
Python

Quiz
•
3rd Grade
10 questions
CS50x.ni Y24C1 - 1S03

Quiz
•
3rd Grade
11 questions
Ulangkaji ASK Tingkatan 2

Quiz
•
1st - 3rd Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade