From Wikibooks, open books for an open world
Syntax#include <cstdlib> void *calloc( size_t num, size_t size);
The function calloc() allocates a block of memory that can store an array of num cells, each with a size size. Every cell of the array is set to value zero.
If the operation fails, calloc() returns "NULL".
EXAMPLE:
ptr = (float*)calloc(25, sizeof(float)); /* It would create an array of 25 cells, each one with a size of 4 bytes “(sizeof(float))”, all the cells initialized with value 0 */
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4