what is inline function?

Answer Posted / vishnu

Inline fuction is one which has one line of defination.
If function definiation is more than two lines of
defination it will be treated as normal fuction.
since it will be replaced at compile time it is good to use
inline function if your code is of one line

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #error and use of it?

666


Is array name a pointer?

594


Where can I get an ansi-compatible lint?

632


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

662


Is register a keyword in c?

623






Explain how are 16- and 32-bit numbers stored?

773


The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.

1623


What is the difference between procedural and functional programming?

510


Which is an example of a structural homology?

768


A set of N billiard balls are set on a one-dimensional table. The table is 1 meter long, set north-south with two pockets at either side. Each ball has zero width and there is no friction so it is moving with a fixed velocity of either northward or southward and bounces back in a perfect elastic collision from other balls it encounter on its way (or drop into one of the pockets). Your job is to keep track of the balls movements. Task Please write a program that gets the initial place, speed and direction of all the balls and gives the position of a specific ball after t seconds. Input The first line contains the number of scenarios. Each one of the other lines in the input contains a scenario: The first number, N, is the number of balls; followed by N pairs of numbers: the distance in centimeters from the south end of the table and the speed (positive speed meaning it moves northward); the last two numbers are the number i of the target ball you should track and the time T in seconds. Output The output is a single number for each line which is the place (distance in centimeters from the south end of the table) of the tracked ball after T seconds. Note: There is no new line character at the end of the result. Sample Input 5 1 50 1 1 1000 1 50 1 1 6 1 60 -2 1 6 2 10 1 95 -1 2 30 2 10 1 95 -1 2 60 Sample Output 100 56 48 65 70

2121


Can we declare a function inside a function in c?

574


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

647


How do I get a null pointer in my programs?

608


What is difference between structure and union with example?

584


Explain main function in c?

614