0 votes
in Swift by

How to compile a script?

A

$ swift filename.swift

B

$ swiftc filename

C

$ swiftc filename.swift

D

$ swift filename.s

1 Answer

0 votes
by
Answer: C

Reason:  Scenario 1: To compile and run a script in one step, use swift from the terminal $ swift filename.swift Scenario 2: To compile and run separately in different steps we can use swiftc $ swiftc filename.swift $ ./filename
...