Strings in Swift

Strings in Swift

University

10 Qs

quiz-placeholder

Similar activities

S1 - Q1 - 9A

S1 - Q1 - 9A

9th Grade - University

10 Qs

Pre-tes Komputer dan Perangkat Penyusunnya

Pre-tes Komputer dan Perangkat Penyusunnya

10th Grade - University

10 Qs

Operating System(2)

Operating System(2)

10th Grade - University

10 Qs

M2_W2_Cloud_Computing

M2_W2_Cloud_Computing

University

15 Qs

เทคโนโลยี ม.2 2568-2

เทคโนโลยี ม.2 2568-2

6th Grade - University

10 Qs

KUIS BAB 3

KUIS BAB 3

7th Grade - University

10 Qs

Diploma in IT - Computer Savvy Quiz

Diploma in IT - Computer Savvy Quiz

University

15 Qs

PRETEST 8 (ANN)

PRETEST 8 (ANN)

University

10 Qs

Strings in Swift

Strings in Swift

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Shashidhara S

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?