Skip to content

Instantly share code, notes, and snippets.

Created June 18, 2009 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/132013 to your computer and use it in GitHub Desktop.
Save anonymous/132013 to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <stdio.h>
main(){
int *arreglo;
int i;
for(i=0;i<10;i++){
arreglo = (int *)malloc(sizeof(int));
arreglo[i]=i;
}
for(i=0;i<10;i++)
printf("%d\n",arreglo[i]);
}
imprime:
0
0
0
135073
8
0
0
0
0
9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment