Objective C nested if statements - Objective C

What are Objective C nested if statements?

It is always legal in Objective-C programming to nest if-else statements, which means you can use one if or else if statement inside another if or else if statement or statements.

Syntax:
The syntax for a nested if statement is as follows:

The else if...else can be nested in the similar way as you have nested if statement.

Example:

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

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

Objective C Topics