Objective C break statement - Objective C

What is break statement in Objective C?

The uses of break statement in Objective C is as follows:

  • When the break statement is encountered inside a loop, the loop is immediately terminated and program control resumes at the next statement following the loop.
  • It is used to terminate a case in the switch statement.
  • The execution of the break statement is stooped in the innermost loop when nested loops are used. The immediate line of code after the block starts executing.

The syntax for a break statement in Objective C is as follows:

Flow Diagram

Objective C break statement


When the above code is compiled and executed, it produces the following result:

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Objective C Topics