1. Two-Dimensional Array Manipulation in C++
By: Ignatius : 2012-03-16
Description: This simple C++ program shows how to manipulate a two dimensional array. In this case it will traverse through the array and print its contents.
Read the full article
 
2. Calculate average using Two-Dimensional Array in C++
By: Ignatius : 2012-03-16
Description: This simple C++ program illustrates the use of two-dimensional arrays. This program calculates the average of all the elements in the integer array named x. For this, the program uses two nested for loops. The outer loop with index i provides the row subscript. The nested for loops therefore accesses each element of the array and the inner loop with index j provides the column subscript.
Read the full article
 
3. Compute the square root of the sum of the squares of an array in C++
By: Ignatius : 2012-03-16
Description: This simple C++ program computes the square root of the sum of the squares of all the positive elements in array named x. It uses the header file math.h since it contains the mathematical functions pow() (for taking the power of a number) and sqrt() (for taking the square root of a number)
Read the full article
 
4. Matrix using nested for loops in C++
By: Ignatius : 2012-03-16
Description: This simple C++ program illustrates the use of three nested for loops. The program multiplies matrix x and y and stores the resulting matrix product xy in matrix z. Both x and y must be compatible for multiplication that means, the number of columns of x must be equal to the number of rows of y
Read the full article
 
5. Sorting an array of Strings in C++
By: Ignatius : 2012-03-16
Description: This simple C++ program sorts the elements of an integer array and prints them.
Read the full article
 
6. Calculating total based on the given quantity and price in C++
By: Jeffrey : 2012-03-16
Description: This simple C++ program shows how to calculate total based on the given quantity and price.
Read the full article
 
7. Compiling and Linking Multiple Source Files in C++
By: B. Lippman : 2011-03-18
Description: To produce an executable file, we must tell the compiler not only where to find our main function but also where to find the definition of the member functions defined by the Sales_item class. Let's assume that we have two files: main.cc, which contains the definition of main, and Sales_item.cc, which contains the Sales_item member functions. We might compile these files as follows:
Read the full article
 
8. Enumerations in C++
By: Stanley B. : 2011-03-12
Description: Often we need to define a set of alternative values for some attribute. A file, for example, might be open in one of three states: input, output, and append. One way to keep track of these state values might be to associate a unique constant number with each. We might write the following:
Read the full article
 
9. Program to add two numbers in C++
By: Stanley B. : 2011-02-19
Description: Using the IO library, we can extend our main program to ask the user to give us two numbers and then print their sum:
Read the full article
 
10. Comments in C++
By: Stanley B. : 2011-02-19
Description: There are two kinds of comments in C++: single-line and paired. A single-line comment starts with a double slash (//). Everything to the right of the slashes on the current line is a comment and ignored by the compiler.
Read the full article
 

     Next