Announcement

Collapse
No announcement yet.

Realloc

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Realloc

    PHP Code:
    #include <st***.h>
    #include <stdlib.h>


    int main void ) {

    int n;
    int i,j;
    int dati=NULL;

    printf("Inserire Numero\n");
        
    scanf("%d",&n);

    for (
    i=1;n!=(-1);i++){
        
        
    dati realloc dati,sizeof(int));
        
        *(
    dati +(i-1))=n;
        
        
    printf("Inserire Numero\n");
        
    scanf("%d",&n);

    }
    i--;

    for (
    j=0;j<i;j++){
        
    printf("%d\n",*(dati j));
    }


     return 
    0;

    | VFX Artist, C++ Programmer, HW Overclocker | Web: xgiovio.com Email: xgiovio@gmail.com Twitter: @xgiovio
Working...
X

Google Profile


My name is Giovanni Di Grezia, but people call me xgiovio.

Here is my homepage:.

I'm a VFX Artist and Software Developer.

Giovanni Di Grezia