Skip to main content

cs201 GDB 2016




For more discuss and ask question join this group
 
Solved  By : Tahir Siddiqui(Mani)






Answer:

"Inline functions should be your choice because.1.It avoid function calling overhead.2. variables push/pop on the stack overhead is avoided during function call3. No return call from a function to other function which is again an overhead4.no linker complaining happen when include at mutiple places."
-----------------------------------below is argument why normal functions are not choice .
"If any one interested and against the argument of using inline function of my previous reply let just see how normal function works.
For normal function call the program stores mem addr of instructions when u call a func. It loads the function into the memory then copies parameter values and jumps to the memory location of function you r calling.Now it run the function codes and stores the function return valu, and then jump back to the location from where function was invoked.This is huge much run time overhead of normal function.

Comments

Popular posts from this blog

MGT 602 Quiz #1 Solve

GT-602 Solved Quiz # 1 Question # 1 of 15 ( Start time: 11:15:51 AM )   Total Marks: 1   Government can help in forming new venture by providing:   Select correct option:     Finance   Technology   Infrastructure   Subsidiaries Question # 2 of 15 ( Start time: 11:16:50 AM )   Total Marks: 1   The entrepreneur was distinguished from capital provider in:   Select correct option:     18th century   17th century   19th and 20th century   Middle ages

CS401 Assignment#1 Solution Spring 2018

Assignment No. 1 Graded Semester Spring 2018 Computer Architecture and Assembly Language Programming– CS401 Total Marks: 15 Due Date: 10/05/2018 Question: 1                                                                                                                                        [15...