AIFA
C Editor
Coding Lab
C Home
Lesson
Courses
CHAPTER 23
C Dynamic Memory
Write C code and run it directly in the browser.
▶ Run Code
↻ Reset
Clear Output
C Source Code
#include <stdio.h> #include <stdlib.h> int main() { int *p = malloc(5 * sizeof(int)); if (p != NULL) { p[0] = 100; printf("%d", p[0]); free(p); } return 0; }
Ready
Program Output
Output will appear here...
AIFA C Compiler
← Previous
📖 Lesson
All Chapters
Next →