in Swift by
Q:
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 Dec 4, 2019 in JAVA by rajeshsharma
0 votes
asked Nov 7, 2022 in Swift by Robin
0 votes
asked Nov 6, 2022 in Swift by rajeshsharma
0 votes
asked Nov 8, 2022 in Swift by SakshiSharma
...