We can replace any code that uses a for loop with a while


1. Discuss various counter controlled repetitive control structures.

2. The if...else is suitable for simple program but switch...case is a better construct, which is suitable for more complex problems? Do you agree with this or not? Discuss with suitable examples.

3. We can replace any code that uses a for loop with a while loop. Would not it be simpler to get rid of the for loop and use the while for everything? Do you think this would be a good idea? Why or why not?

4. Write a program using equality and assignment operator with their symbol. Which type of error is generated, using them incorrectly? Discuss the results.

5. Write the example that demonstrates different techniques of passing arguments: by value, by reference, and as pointers. Discuss the three methods.

Solution Preview :

Prepared by a verified Expert
Dissertation: We can replace any code that uses a for loop with a while
Reference No:- TGS01243775

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)