11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Library FunctionsCALLOCSynopsis#include void * calloc (size_t cnt, size_t size)DescriptionThe calloc() function attempts to obtain a contiguous block of dynamic memory which will hold cntobjects, each of length size. The block is filled with zeros.Example#include #include struct test {int a[20];} * ptr;/* Allocate space for 20 structures. */voidmain (void){ptr = calloc(20, sizeof(struct test));if(!ptr)printf("Failed\n");elsefree(ptr);}See Alsobrk(), sbrk(), malloc(), free()130

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!