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

Related questions

0 votes
0 votes
asked Jul 2, 2022 in Handlebars by Robindeniel
0 votes
asked Nov 8, 2022 in Swift by SakshiSharma
...