Purchase Solution

Nesting in a Program

Not what you're looking for?

Ask Custom Question

I am in the process of learning C programming and would like to know when nesting makes a program peform better and when it could make it worse?

Purchase this Solution

Solution Summary

This solution provides a detailed, step-by-step explanation to the given problem.

Solution Preview

Hi,

Nesting is a form of putting functions within a function. This enables a program to do multiple combination of functions to run within a single function.

An advantage of nesting is it makes the program more powerful. For example, nested IF statements like comparing numbers:

if (num != 0) {
if (value > 0)
printf("%d is greater than zero" num);
else
out.println("%d is greater than zero " ...

Purchase this Solution


Free BrainMass Quizzes
C++ Operators

This quiz tests a student's knowledge about C++ operators.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Javscript Basics

Quiz on basics of javascript programming language.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Networking Questions

This quiz consists of some basic networking questions.