What is returned from strlen("test\n");
Strings

Quiz
•
Computers
•
University
•
Hard

Pavol Zajac
Used 6+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Similar Resources on Wayground
10 questions
Chương trình máy tính và dữ liệu

Quiz
•
University
10 questions
PROGRAMACION

Quiz
•
9th Grade - University
10 questions
Tes Awal AlPro Modul 6

Quiz
•
University
6 questions
Splitting, Concatenating, and Joining Strings in Python

Quiz
•
University
10 questions
Alghorithma

Quiz
•
12th Grade - University
10 questions
C Programming Lab Quiz

Quiz
•
University
10 questions
Input And Output in C

Quiz
•
University
10 questions
struktur data : tipe data dan string

Quiz
•
University
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade