This repository has been archived on 2023-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
VSMechatronics/C16/alloc_example_1.c
2022-04-08 16:12:38 +01:00

17 lines
285 B
C

#include <stdio.h>
#include <stdlib.h>
int main(void)
{
// Declare an integer array and an integer pointer
int *pData;
// Using malloc
pData = malloc ( 10000 * sizeof (int));
// Using calloc
pData = calloc ( 10000 , sizeof (int));
return 0; // Exit
}