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
Question: (a) Write down the class 'ListNode' to contain the following:- (i) variable data of type Object (ii) variable next of type ListNode (iii)

Problem: a) Give and Illustrate with the help of diagrams, four topologies for the Network Information System (NIS). b) Give methods for creating user accounts and groups.

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve betw   Solution:

submitting solutions in C language should not use functions from / as these files do not exist in gcc

C program to Print Fibonacci series upto n using recursion: int fibo(long int); void main() {                 long int a=0,n;                 printf ("how many term

how to create database of faculty database......... send me with program

Overloading Binary Operators Using Friend Function class SI {float i,p,n,r,a; public: SI(){}; SI(int gp,int gn, int gr); void putdata(void); friend SI operato

Classify computer system according to capacity. How they are different from computers according to the classification of technology. Provide comparative study also.

Define Automatic storage classes - computer programming? The Variables declared within function bodies are automatic by default and automatic variables are declared inside a fu

write a c++ program, that finds the minimum total number of shelves, including the initial one, required for this loading process.