[algogeeks] Re: Static variable

2011-08-31 Thread Abhishek Mallick
The recursion will run 10 times printing nothing. Then ones it returns on the 10th one. It will start printing from 0 to -8 (As i is static). On Aug 31, 6:33 pm, ravi maggon wrote: > Ans would be 00, keep in mind that i is static variable. > > On Wed, Aug 31, 2011 at 6:59 PM, rohit wrote

[algogeeks] Re: memory allocation

2011-08-31 Thread Abhishek Mallick
heap memory is allocated using new/malloc. memory from stack is allocated for local variables/objects for a function. Correct me if I am wrong. On Aug 31, 6:37 pm, ravi maggon wrote: > What memory is allocated to a function, to a variable, to a object created > at run time using new or malloc and

[algogeeks] Re: probability question

2011-08-31 Thread Abhishek Mallick
0.8 On Aug 31, 6:37 pm, swetha rahul wrote: > In a railway station, there are two trains going. One in the harbour line > and one in the main line, each having a frequency of 10 minutes. The main > line service starts at 5 o'clock and the harbour line starts at 5.02A.M. A > man goes to the statio

Re: [algogeeks] Interview Question

2011-04-07 Thread Abhishek Mallick
@ your name last name : please read the question carefully. * * * * On Fri, Apr 8, 2011 at 12:11 AM, your name last name wrote: > Moving the data is unnecessary if in case the whole pointer shifting is > meant for the entire node and not for individual elements of the node. > temp ->next = ( temp

Re: [algogeeks] Print Hello infinite..................

2011-03-11 Thread Abhishek Mallick
#include int main() { while(printf("Hello")); return 0; } On Thu, Mar 10, 2011 at 11:58 AM, Nishant Agarwal < nishant.agarwa...@gmail.com> wrote: > #include > void print1(); > void print2() > { > printf("Hello\n"); > print1(); > } > void print1() > { > printf("Hello\n"); > print2