
Call 1800-123-2003
c++ function |
Functions are the named unit of a group of program statements. Functions are of two types, they are pre defined functions and user defined functions. Pre defined functions : Predefined functions are functions that are built into C++ Language to perform some standard operations. The functions that are stand alone used for general purposes and that are not depended on any classes are stored in the Standard Function Library. Some of the pre defined functions are as follows :
float distance(float x, float y) // Returns the distance of (x, y) from origin { float dist; //local variable dist = sqrt(x * x + y * y); return dist; } |