Login
Remember
Register
Ask a Question
How to compile and run a script in one step?
0
votes
asked
Nov 6, 2022
in
Swift
by
rajeshsharma
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
swift
script
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Nov 6, 2022
by
rajeshsharma
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
...