for(i=0;i<4096;i++){ sprintf (tmp, "%d",buf[i]); buf[i] =atoi(tmp); }