Added book examples
This commit is contained in:
14
C16/alloc_example_2.c
Normal file
14
C16/alloc_example_2.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
||||
// Declare an integer array and an integer pointer
|
||||
int *pData;
|
||||
|
||||
pData = calloc ( 10000 , sizeof (float)); // No warning
|
||||
pData = (float *)calloc ( 10000 , sizeof (float)); // Warning
|
||||
|
||||
return 0; // Exit
|
||||
}
|
||||
Reference in New Issue
Block a user