Visual C++ .NET is smiling to you, please return her smile  

Visual C++ .Net Programming Tutorials: Loops, Decision and Functions

 

Home

 

 

 

 

 

In the real programming there are many branch or conditional situations. During the program execution, program need to make a decision if more than one way of execution encountered. Program need to do a selection...

This module consists of two part: Program Controls and Functions. Nothing new if you already familiar with C or native C++ program controls and functions. In the loops module you will learn two types of program control that is selection and repetition. In selection you can use the if, if-else, if-else-if and switch-case-break constructs. For the repetition part, you can use while, do-while or for loop. The second part is Functions. It is similar as in C or native C++. Using functions, you can divide your program into a smaller pieces of program based on the specific task that need to be completed. This smaller program or a function can be put in separate files and it is reusable. The following are the topics for this Chapter.

  1. The if Statement: Making Decisions with the if Statement and Performing One-Way Tests

  2. The if-else and if-else-if: Performing Two-Way Tests and Performing Multiway Tests

  3. Nested if and switch-case-break: Performing Nested Tests, Making Decisions with the switch Statement and Defining Simple switch Statements

  4. The switch and while: Defining Fall-Through in a switch Statement, Using Fall-Through in a switch Statement, Performing Loops and Using while Loops

  5. The for and do-while: Using for Loops, Using do-while Loops, Performing Unconditional Jumps and Quick Reference

  6. Function 1: Why Use Functions?, Declaring Function Prototypes, Declaring a Simple Function Prototype, Declaring Parameters in a Function Prototype, Declaring the Return Type in a Function Prototype and Declaring Default Values for Function Parameters

  7. Function 2: Defining Function Bodies, Defining a Simple Function Body, Defining a Function Body That Uses Parameters, Defining a Function Body That Returns a Value, Calling Functions and Calling Functions in the Sample Application

  8. Function 3: Stepping Through the Application with the Debugger, Understanding Local and Global Scope, Overloading Functions and Quick Reference

 

 

 

 

Best viewed using FireFox 1.5.0 and above. Worst viewed using IE of any version

 

Webmaster contact: [contact[@]visualcplusdotnet.com]

Copyright 2009 © Visualcplusdotnet. All rights reserved.

Excellent hosting services provided by MochaHost - The Online Central

 

 

 

| About | Disclaimer | Privacy | Site Index & Project Download | Native C | Contact |

 
 

 

Custom Search