The use of one loop inside another loop is allowed in Objective C programming language. Some of the examples are used to illustrate the concept.
The syntax for a nested for loop in C Programming is as follows:
The syntax for a nested while loop statement in Objective-C programming language is as follows:
The syntax for a nested do...while loop statement in Objective-C programming language is as follows:
Note: Any type of loop can be put inside of any other type of loop.
For example, a for loop can be inside a while loop or vice versa.
The following program uses a nested for loop to find the prime numbers from 2 to 100:
The above code is compiled and executed and produces the following result:
Objective C Related Interview Questions
|Python Interview Questions||DBMS Interview Questions|
|C++ Interview Questions||IPHONE APPS Interview Questions|
|C & Data Structures Interview Questions||IOS Interview Questions|
|Java Interview Questions||Go (programming language) Interview Questions|
|F Sharp (programming language) Interview Questions||C preprocessor Interview Questions|
|R Programming language Interview Questions||D Programming Language Interview Questions|
|Lua (programming language) Interview Questions||Embedded C Interview Questions|
Objective C Tutorial
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.