Swift - Basics and Runtime
Which of the following is the correct way to define the main entry point in Swift using the
@main attribute?@main attribute?@main attribute must be applied to a type (struct, class, or enum) that contains a static main() method.@main struct App { static func main() { print("Hello") } } correctly applies @main to a struct with a static main() method.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions