..

FreePrograms


C programming Tutorial 

Free C Programs, C Programs Download


Embedded C lang & 8051(Embedded Products)


  CONTACT US   ABOUT US   PRIVACY  DISCLAIMER

FREE C PROGRAMS 

 C Tutorial for beginners
What is C C vs C++ vs Java Program Structure Data Types in C Basic Rules of C & C++
Functions in C If, Else Conditions Loops in C Switch Case Arrays
Pointers Structures in C Strings in C Command Line Arguments Type Casting
Linked Lists Recursion Binary Trees Inheritance Multiple Inheritance
Templates File I/O Object Oriented Programming  Data Structures in C C interview Questions

/*Arrays in CPP    C++/CPP Tutorial.*/


 

Above is a simple array declaration in which ages of a person are declared.

Lets see how we can print these type of arrays in CPP.

Here is another program in which marks of student are printed on screen.

#include <iostream.h>
int main()
{
short marks[4];
marks[0]=98;
marks[1]=99;
marks[2]=66;
marks[3]=79;
std::cout << marks[0] << std::endl; //prints 98
std::cout << marks[1] << std::endl; //prints 99
std::cout << marks[2] << std::endl; //prints 66
std::cout << marks[3] << std::endl; //prints 79
return 0;
}

COPYRIGHT 2009 ALL RIGHTS RESERVED FREECPROGRAMS.COM