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
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

1. Using Visual C++ and your OpenGL configured environment, write an application that displays a “unique” graphical scene that you designed and coded for this course. What yo

Project Description: Currently seeking someone who can create me a software application (google chrome crx file_ that will auto add all shoe sizes to cart directly and if not av

Use the above problem and have the program print the biggest and smallest sales for each employee for everyday of the month. Program should also find the largest and

enter height of the shape: 1 3 5 3 1 3 5 7 5 3 5 7 9 7 5 3 5 7 5 3 1 3 5 3 1

Write a Program that illustrate Command Line Parameters? main(int argc, char *argv[]) { int i; for(i = 0; i printf("arg %d: %s\n", i, argv[i]); return 0; }

What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than a

Problem : Compiler Design - Limit the methods Rahul is a newbie to the programming and while learning the programming language he came to know the following rules: ·

Need FTP Upload and MySQL Project Description: We are in need of an executable application that will be execute as a scheduled task on Windows Server 2008 R2 and can perform

Objective of this Program: (a) To learn more about modularization of a program into independent modules, (b) To use arrays in a program, (c) To get some experience with us