User Tools

Site Tools


opus:fall2012:bkrishe3:datapart1

Data Structures Keyword

Void Pointers

Definition

The void pointer is a generic pointer type. A pointer to void can store an address to any non-function data type, and, in C is implicitly converted to any other pointer type on assignment, but it must be explicitly cast if dereferenced inline.

References

data Keyword 1 Phase 2

dynamic memory allocation (malloc/free)

Definition

dynamic memory allocation is the task of allocating a free chunk of memory specific to the size you predetermine in bytes, by using the malloc function. The chunk of memory is not always in the same location hence being “dynamic” instead of static. By using the “free” function, that will release the block of memory back to the system.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • wikipedia
  • class
  • Reference 3

Demonstration

Demonstration of the indicated keyword.

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    int array[10];
 
    return(0);
}
opus/fall2012/bkrishe3/datapart1.txt · Last modified: 2012/09/30 20:31 by bkrishe3