What is inline function, C/C++ Programming

Assignment Help:

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);

}

 

 


Related Discussions:- What is inline function

Program for metric conversions, Write a program called Converter that does ...

Write a program called Converter that does three types of metric conversions. Your program should prompt the user for the selection conversion, prompt for input data, and display t

#Luminous Jewels, #Byteland county is very famous for luminous jewels. Lumi...

#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. Ne

Xmugler, #solution for decode the code for smuglers

#solution for decode the code for smuglers

The use of the break and continue statements in a loop, Question: (a) ...

Question: (a) A bank has four types of accounts with annual interest rates as follows: Savings 8% Savings with Cheque Book 5% Current 4% Fixed deposits 10% Using

Algorithm, Write a algorithm to explain the processof wakingbup in morning

Write a algorithm to explain the processof wakingbup in morning

Array, how to do an array

how to do an array

Program for greatest common divisor – c++ program, Greatest Common Divisor ...

Greatest Common Divisor (GCD) - The greatest common divisor (GCD) of two integers is the largest integer that will evenly divide both integers. The GCD algorithm involves intege

Develope a program, Develop a program to meet the following requirements: ...

Develop a program to meet the following requirements: 1. Must use at least one function in addition to main (you can use more) 2. Must use selection 3. Must use deference/indire

Abstract class Employee , I have to add virtual void calculatePay and virtu...

I have to add virtual void calculatePay and virtual void displayEmployee. How to I implement that in Salaried and Hourly Employee?

Arrays, how to declare multi dimensional array

how to declare multi dimensional array

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd