fork download
  1. #include <stdio.h>
  2. void erase(int *tab, int i, int n)
  3. {
  4. int a;
  5. for(a =i-1 ;a<n-1;++a) tab[a] = tab[a+1];
  6. tab[n-1] = NULL;
  7. }
  8.  
  9. int main(void) {
  10.  
  11. int tab[5] = {2,3,4,5,7};
  12. erase(tab,2,5);
  13. int i ;
  14. for(i =0;i<5;++i) printf("%d",tab[i]);
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
24570