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
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
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
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
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
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