From 7091a74b9ee3d530659c5ce0ba24b1d96518a43f Mon Sep 17 00:00:00 2001 From: srdusr Date: Mon, 26 Jun 2023 16:11:03 +0200 Subject: Add Memory Allocation --- languages/c.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/languages/c.md b/languages/c.md index 58a309e..e80652b 100644 --- a/languages/c.md +++ b/languages/c.md @@ -182,3 +182,10 @@ int value = *pointerName;` - scanf("%d", &); // Reads input from the user - - - + +##### Memory Allocation: +- malloc(size); // Allocates a block of memory +- calloc(n, size); // Allocates an array of n elements, initialized to zero +- free(pointer); // Deallocates the memory block + +- - - -- cgit v1.2.3