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 to define an array in c, Program to define an array in c: Writ...

Program to define an array in c: Write a program to define an array and print the value of array. void main() { int a[10]={0,11,21,34,44,75,46,57,88,89},i,j,k; clr

Programming assignment, Introduction. In this assignment you are required t...

Introduction. In this assignment you are required to simulate a maze traversal using so called recursive backtracking (the algorithm is given below). The grid of #s and 0s in the f

Wap to print series from 1 to 10 & find its square and cube, WAP TO PRINT S...

WAP TO PRINT SERIES FROM 1 TO 10 & FIND ITS SQUARE AND CUBE # include stdio.h> # include conio.h> # include math.h>   void main () { int a=1,sqr=0,cube=0;

Luminous and jewels, Byteland county is very famous for luminous jewels. Lu...

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

Online tutor, Given an char variable last that has been initialized to a lo...

Given an char variable last that has been initialized to a lowercase letter, write a loop that displays all possible combinations of two letters in the range ''a'' through last. Th

Theory, recursive sub programs

recursive sub programs

Area under the curve, Write a program to find the area under the curve y = ...

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 between two points can b

Described the isa and hasa class relationships. , Described the ISA and HAS...

Described the ISA and HASA class relationships. How would you apply each in a class design? A: A specialized class "is" specialization of another class and, thus, has the ISA re

Largest clique, find largest clique present in graph

find largest clique present in graph

Program to create local shopping cart, Available, and the right kind of pro...

Available, and the right kind of programs. My son wants to stop using ice. He has organised detox a number of times, and is always successful. It is the next stage, rehab, where

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