wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Strings in Swift

Total questions: 12

Worksheet time: 9mins

Name
Class
Date
1.

A string is a sequence of characters.

a)

True

b)

False

2.

Which of the following is concatenation operator?

a)

*

b)

-

c)

+

d)

/

3.

What is the purpose of concatenation operator?

a)

It counts the number of characters in a string.

b)

It is used to combine strings.

c)

It is used to create multiline strings.

d)

It is used to compare two strings.

4.

What is the output of the shown program?

a)

11

b)

12

c)

14

d)

Social Media

5.

What is the output of the given program?

a)

8

b)

9

c)

11

d)

Processor

6.

Two strings are compared using

a)

For In Loop

b)

While Loop

c)

IF Statement

d)

Count Function

7.

What is the output of the given program?

a)

CAT

b)

CaT

c)

Both Strings Are Same

d)

Both Strings Are Different

8.

What is the output of the given program?

a)

Park

b)

PARK

c)

Both Strings Are Same

d)

Both Strings Are Different

9.

What is the output of the given image?

a)

VAN

b)

van

c)

Both Strings Are Same

d)

Both Strings Are Different

10.

What is the output of the given program?

a)

CBA

b)

CAB

c)

Both Strings Are Same

d)

Both Strings Are Different

11.

What is the output of the given program?

a)

Error

b)

P

c)
d)
12.

What is the output of the given program?

a)

Error

b)

R

c)
d)