Home » Learn C++

C++ Built-In Function

C++ Built-In Function
C++ Built-In Function: The functions that have already been defined and are part of the language and can be used in any program are called built-in functions. Accessing Built-in Functions: The built-in functions are accessed through header files. Each built-in function is defined in its related header file. If a built-in function is to he used in a program, its header tiles must be included in... 

C++ Function Templates

C++ Function Templates
C++ Function Templates: In functions overloading, more than one function with same name are declared and defined. This makes the program more complex and lengthy. To overcome this problem, function template is used. In a function template, a single type less function is defined such that arguments of any standard data type can be passed to the function. The general syntax of a function template is: template... 

C++ Functions Overloading

C++ Functions Overloading
C++ Functions Overloading: Declaring more than one function with the same name hut with different set of arguments and return data types is called functions overloading.             For example, three functions with same name “sum” and having different parameters are declared as:   int sum (int, int); int sum (int, int, int); double sum (double, double, double);                ... 

Inline Functions

Inline Functions
Inline Functions:             The inline functions are a special function used for small functions. It is a user-defined function hut in it the function prototype is omitted. The keyword “inline” is used in the decelerator on the function definition. The “inline” function is defined before the main function. When a compiler compiles the source code, it generates a special code at... 

C++ Command Line Arguments

C++ Command Line Arguments
C++ Command Line Arguments:             When a program in C++ is compiled an executable file is created. This executable file can he used to execute the program directly from the DOS prompt. The arguments can also he passed to the program from the DOS prompt during execution of the program. The arguments that are passed to a function at the DOS prompt are called command line arguments.            ... 

Default Arguments

Default Arguments
Default Arguments:             The arguments in which data is initialized during the function declaration arc called default arguments. If the values of the arguments are specified in the function declaration then the arguments of the function in the function call can be omitted. If the arguments are omitted in function call then the default values are automatically passed to the function... 

Local and Global Functions

Local and Global Functions
Local and Global Functions:             The functions that are declared inside the main function or inside any other function are called local functions. They can he called only in that function in which they are declared. The functions that are declared outside the main functions are called global functions. They can he called by any function. The function prototypes defined in the header... 

Static Variables

Static Variables
Static Variables:             Static variables arc special variables that are declared inside a function by using the keyword “static”. Like local variable, these can only be accessed in the function in which they are declared hut they remain in existence for the lifetime of the program. Another difference between local variables and static local variables is that the initialization... 

Global Variables

Global Variables
Global Variables:             The variables that are declared outside the main function or any other function are called global variables or external variables. These variables can he accessed in any function at any time during execution of the program. The global variables are used when variables are to he accessed by more than one function in a program. The global variables arc not normally... 

Local Variables

Local Variables
Local Variables:             The variables that arc declared inside the main function or inside any user-defined function are called local variables. These variables are also called the automatic variables. The keyword “auto” can he used to declare these variables. For example, auto int a, b, c;    The use of keyword “auto” is optional. The variables used inside the functions... 
Get Adobe Flash playerPlugin by wpburn.com wordpress themes
Copyright © 2010 Information Village. All rights reserved.