Mega Code Archive
Categories
/
C
/
Code Snippets
Allocate memory
#include
#include
int main() { float *j; j = calloc(100, sizeof(float)); if(!j) { printf("Allocation Error\n"); exit(1); } return 0; }