Describe a scenario in which a programmer might find it most appropriate to implement a for-loop.
Describe a scenario in which a programmer might find it most appropriate to implement a while loop.
Describe a scenario in which a programmer might find it most appropriate to implement a do while loop.
Describe a scenario in which a programmer might find it most appropriate to implement a for-loop.
Use for loop when you have the count to iterate.. like iterating
through the matrixes and list and arrays
we can use for loop as we will have the exact length
Describe a scenario in which a programmer might find it most appropriate to implement a while loop.
We use while loop when we dont exact count like reading files
and reading results sets and reading userinputs
validating userinputs
Describe a scenario in which a programmer might find it most appropriate to implement a do while loop.
we will use do while when we need to test condition at the end like
showing user menu etc..
Get Answers For Free
Most questions answered within 1 hours.