¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
How to assign length of Array through input, in C
2 Respuestas
+ 11
int size ;
scanf("%d", &size) ;
// 1D Dynamic Array
int *arr = malloc(size * sizeof(int)) ;
// Freeing memory
free(arr) ;
+ 1
nAutAxH AhmAd thanks👍