NEW: Learn SwiftUI with my free YouTube video series! >>

Arithmetic operators

Question 1/6: Which of these make result an integer equal to 5?

Hint: Click to show.

Option 1:

var result = 11 % 6

Option 2:

var result = 2 + 2 + 1.0

Return to Review Menu

Buy Testing Swift Buy Practical iOS 12 Buy Pro Swift Buy Swift Design Patterns Buy Swift Coding Challenges Buy Server-Side Swift (Vapor Edition) Buy Server-Side Swift (Kitura Edition) Buy Hacking with macOS Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with Swift Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code