#include <iostream.h>
#include <conio.h>
inline int square (int a) // inline function definition
{
return (a*a);
}
void main(void)
{
cout << "Square(10) = " << square(10);
cout << "\n Square(10+10) = " << square(10+10);
getch( );
}
Labels: C++ Codes, C++ Function Codes
Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies| |
---|
0 comments:
Post a Comment