Strings in Swift

Strings in Swift

University

10 Qs

quiz-placeholder

Similar activities

CMDP2063 Unix and C Programming (Revision)

CMDP2063 Unix and C Programming (Revision)

University

15 Qs

Quiz - Hardware & Software

Quiz - Hardware & Software

University

10 Qs

CMDP2060 Programming Design and Implementation (W04 - W06)

CMDP2060 Programming Design and Implementation (W04 - W06)

University

5 Qs

Quiz Pemrograman Python

Quiz Pemrograman Python

10th Grade - University

15 Qs

Operating System(2)

Operating System(2)

10th Grade - University

10 Qs

Codean - JavaScript Variablel & Function

Codean - JavaScript Variablel & Function

University

15 Qs

TOPIC 3: SEQUENTIAL LIST

TOPIC 3: SEQUENTIAL LIST

University

15 Qs

Quiz Pemrograman Arduino

Quiz Pemrograman Arduino

10th Grade - University

15 Qs

Strings in Swift

Strings in Swift

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?