What is inline function, C/C++ Programming

Inline function:

It is a function without prototype. The function is defined above main. The function should  be  declared  above  main  function.                 

Declaring  the  function  as  inline  will  increase  the performance, but it is usually used for small functions.   It reduces the memory requirement. Inline function must have return statement in the function at the same it need not have return type. All other function sub program or must definition and prototype.

inline int f_ref(int x, int  y)

{ return (x+y); // Inline function can return statement without return type.

}

void main( )

{

int a, b;

f_ref(a, b);

}

 

 

Posted Date: 9/20/2012 7:46:53 AM | Location : United States







Related Discussions:- What is inline function, Assignment Help, Ask Question on What is inline function, Get Answer, Expert's Help, What is inline function Discussions

Write discussion on What is inline function
Your posts are moderated
Related Questions
create a flowchart that display the assume that there are 3 section each student ?

A constructor that accepts one argument of a dissimilar type.

find area uder the curve y=f(x) between x=a and x=b

program for factorial

Question : (a) One of the most common sorting techniques we have in programming is the ‘Bubble Sort'. This technique will be used to sort an array of elements in ascending or

A: BinarySearchTree.h ---------------------- #ifndef BINARY_SEARCH_TREE_H_ #define BINARY_SEARCH_TREE_H_ #include "dsexceptions.h" #include // For NULL // Binary

Classes and Objects A class is a vehicle to execute the OOP features in the C++ language. Once a class is declared, an object of that type can be explained. An object is said t


C Program for EVEN & ODD NO IN ANY MATRICES #include stdio.h> #include conio.h> void main() {           int a[100][100];           int i=0,j=0,r,c,even=0,odd=0;

Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum