1.

State the control transfer statements present in ios Swift.

Answer»

The control transfer statements present in ios Swift are as FOLLOWS:

  • Continue: The continue statement skips the current iteration of a loop and directs the program's control flow to the next iteration.
  • BREAK: When the break statement is FOUND, a loop is immediately terminated.
  • Return: In Swift, the return statement is used in functions and methods to return VALUES that MEET our needs. In the Swift programming language, we can return values from functions/methods based on our requirements by utilising the return keyword.
  • Fallthrough: The fallthrough keyword merely directs code execution to the statements contained in the following case (or default case) block.


Discussion

No Comment Found