
Strings in Swift

Quiz
•
Information Technology (IT)
•
University
•
Hard
Shashidhara S
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which property of the string is used get number of characters?
length
length()
count
count()
2.
MULTIPLE SELECT QUESTION
45 sec • 3 pts
which method/methods is/are used to find the substrings in a given string?
hasPrefix()
contains()
prefix(n)
getChars(n)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
We can have an empty character
True
False
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
let name = "Ethan Hunt"
print(name.first)
output is ?
E
Ethan
optional(E)
compiler error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
let pokemon = "poke\u{0301}mon"
print(Pokemon.count)
output is ?
7
8
14
none
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
let kid = "Miles Morales"
print(kid[kid.index(kid.startIndex, offsetBy:3)]
output is ?
e
Optional(e)
l
optional(l)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
let scarlet = "Wanda Maximoff"
print(scarlet.substring(to:scarlet.firstIndex(of:" ")!)
output is :
Wanda
W
Maximoff
Compiler Error
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
CMDP2063 Unix and C Programming

Quiz
•
University
12 questions
Review loops

Quiz
•
8th Grade - University
10 questions
REVISION CITS CSA

Quiz
•
University
10 questions
Quiz on Basics of C

Quiz
•
University
11 questions
CodeQuest TechTopia 2025-26

Quiz
•
University
12 questions
SOAL IE

Quiz
•
University
15 questions
Quiz Pemrograman Arduino

Quiz
•
10th Grade - University
9 questions
G12- Python Strings Quiz

Quiz
•
12th Grade - University
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
12 questions
Civil War

Quiz
•
8th Grade - University
18 questions
Parent Functions

Quiz
•
9th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
19 questions
Primary v. Secondary Sources

Quiz
•
6th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
20 questions
Disney Trivia

Quiz
•
University