[algogeeks] memory allocation question

2011-09-03 Thread rohit
how many bytes are allocated by following code? #includealloc.h #define col 4 #define row 3 int main() { int(*p)[col]; p=(int(*)[col])malloc(row*sizeof(*p)); return 0; } please explain answer? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

[algogeeks] memory allocation

2011-08-31 Thread ravi maggon
What memory is allocated to a function, to a variable, to a object created at run time using new or malloc and to a function containing a object with run time memory allocation. -- Regards Ravi Maggon Final Year, B.E. CSE Thapar University -- You received this message because you are

Re: [algogeeks] Memory Allocation

2011-07-19 Thread Piyush Sinha
char a[] or any array refers to a block of memory (not a single memory location or variable). Analogy to this can be seen in the following fact :- The memory addresses of an array can't be changed, whereas the content of the pointer variables, such as the base memory address of the array it refers

Re: [algogeeks] Memory Allocation

2011-07-19 Thread Abhi
Yes, to a great extent. Thanks :) Obviously we can pass arrays across functions by declaring them static. Just saying. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] memory allocation

2010-07-25 Thread jalaj jaiswal
for this you shld make your own malloc function and while allocating memry count++ and while freeing count-- if count!=0 then there is memory leak . On Sat, Jul 24, 2010 at 11:38 PM, dreamer igolalal...@gmail.com wrote: Write a code that will check whether the memory allotted

[algogeeks] memory allocation

2010-07-24 Thread dreamer ................
Write a code that will check whether the memory allotted to the program at the initial and the memory returned to the system is same or not. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to