i think ans is both (b) and (c) (b) : when a function is called the program will save its state, save the program counter, jump to the program routine , execute , after executing will retrieve its program counter and go back to the original location, retrieve its original state All this will take a lot of time Hence increasing the running time
(c) : when a function is called a pointer for the subroutine is saved which tells the program where the subroutine is located. Hence it will need some storage space to save the pointer, increasing the storage space Regards, Puneet On Mon, Aug 8, 2011 at 6:47 PM, hary rathor <[email protected]> wrote: > ans can be only c . > it can't ans b because of subroutine don't reduce the run time ... > cause it calling function require > extra push and pop operations. that's why we use inline function. > > so we can say that ans c is perfact > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- ----------------------------------------------------------------------- Puneet Goyal Student of B. Tech. III Year (Software Engineering) Delhi Technological University, Delhi ----------------------------------------------------------------------- -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
