Wednesday, March 25, 2009

Pointer, Malloc in C

Pointer
Is a programming language data type whose value refers directly to (or "points to") another value stored elsewhere
in the computer memory using addess. A pointer refereces a value stored elsewhere in memory, and obtaining
or requesting the value to which a pointer refers is called dereferencing. A pointer is a simple implementation of
general reference data type.

Malloc
Is a subrioutine provided in the C and C++ programing languages's standard libraries for performating dynamic memory
allocation. The C programming language manages memory either statically, automatically, or dynamically. Static-
duration variables are allocated in main (fixed) memory and persist for the lifetime of the program;
automatic-duration variables are allocated on the stack and come and go as functions are called and return.

No comments:

Post a Comment