80.6k views
1 vote
If a function does not return a value, which of the follow is correct?Group of answer choicesThe return type is a Swift optional type.The return type must be set to nil.The return type is omitted from the function declaration.

1 Answer

0 votes

Answer:

In swift programming language it is ok when a function does not return any value you are not necessarily required to set return type because it is optional so the correct answer is "The return type is omitted from the function declaration".

Step-by-step explanation:

If programing language is swift so we can omit return type from function declaration otherwise if language is C++ we can set return type "Void".

User Hugo Briand
by
5.1k points