Swift Kotlin Grammar Tests

Swift Kotlin Grammar Tests

University

11 Qs

quiz-placeholder

Similar activities

Biyoelementler-II

Biyoelementler-II

University

15 Qs

CSS Basics

CSS Basics

University

11 Qs

Chi Square Biology

Chi Square Biology

11th Grade - University

14 Qs

Arrays I

Arrays I

University

6 Qs

Atmosfēra-klimats

Atmosfēra-klimats

5th Grade - University

8 Qs

WVM - 10. Vorlesung (Ka1)

WVM - 10. Vorlesung (Ka1)

University

10 Qs

Kuis Metlit 22/23

Kuis Metlit 22/23

University

10 Qs

data_type

data_type

12th Grade - University

10 Qs

Swift Kotlin Grammar Tests

Swift Kotlin Grammar Tests

Assessment

Quiz

Science

University

Medium

Created by

Symbat Nurgaliyeva

Used 1+ times

FREE Resource

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following syntaxes is correct for creating a constant in Swift?

let constantName = "Value"

const constantName = "Value"

var constantName = "Value"

constant constantName = "Value"

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to declare an immutable variable in Kotlin?

const val variableName = "Value"

let variableName = "Value"

var variableName = "Value"

val variableName = "Value"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to check for null values in Kotlin?

== null

=== null

?.

!!

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of executing the expression "Hello".count() in Swift?

Compilation error

5

6

"Hello"

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to create a method in a class in Kotlin?

fun methodName() {}

method methodName() {}

def methodName() {}

function methodName() {}

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following syntaxes in Swift is used to declare an optional type?

var name: String?

var name: Optional(String)

var name: String!

var name: Optional<String>

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the !! operator mean in Kotlin?

Converts a nullable type to a non-nullable type, throwing an exception if null

Returns null

Checks the value for null

Sets a default value

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?