C++ examples for Function:Function Creation
Demonstrate function definition preceding function calls
#include <iostream> using namespace std; //no function declaration void starline()/* w w w .j av a 2s .c o m*/ { for(int j=0; j<45; j++) cout << '*'; cout << endl; } int main() { starline(); cout << "Data type Range" << endl; starline(); cout << "char -128 to 127" << endl << "short -32,768 to 32,767" << endl << "int System dependent" << endl << "long -2,147,483,648 to 2,147,483,647" << endl; starline(); return 0; }