
Strings
Authored by Pavol Zajac
Computers
University
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is returned from strlen("test\n");
4
5
6
7
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given char buffer[81], which statement correctly reads a single line into buffer?
gets(buffer);
fgets(buffer, 81, stdin);
scanf("%s", buffer);
scanf("%80s", buffer);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given char buffer[81], which statement correctly reads a single word into buffer?
gets(buffer);
fgets(buffer, 81, stdin);
scanf("%s", buffer);
scanf("%80s", buffer);
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which expression is true, if pointer test points to string with content "test"?
test == "test"
strcmp(test, "test") == 0
strcmp(test, "test")
strstr(test, "test") == 0
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
We have char str[81] = "test". How do we concatenate it with "string"?
strcat(str, "string");
strcpy(str, "string");
str += "string";
str = "teststring";
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Let
char *test = "teststring";
char *ptr = strstr(test, "str");
What is the value of ptr - test?
Undefined.
0
4
5
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Tes Awal AlPro Modul 6
Quiz
•
University
10 questions
Knowledge Management Quiz
Quiz
•
University
10 questions
J277 - 2.2 - Understanding Data Types in Programming
Quiz
•
10th Grade - University
10 questions
Cableado estructurado
Quiz
•
University
10 questions
CNET251 - Ch 6 -Risk Management- Assessing Risk
Quiz
•
University
10 questions
Unit 24 - Java Basics
Quiz
•
University
10 questions
Choose the level of Bloom’s Taxonomy
Quiz
•
University
10 questions
Pengantar Coding
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade