0 votes
in Swift by
How to compile and run a script in one step?

A

$ swift filename.swift

B

$ swiftc filename

C

$ swiftc filename.swift

D

$ swift filename.s

1 Answer

0 votes
by
Answer: A

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
...