fork download
  1. // #include <stdio.h>
  2.  
  3. // void print (int N, int v[])
  4. // {
  5.  
  6. // printf("Vector: \n");
  7.  
  8. // int i;
  9. // for (i=0; i<N; i++)
  10. // {
  11. // printf("%d ", v[i]);
  12. // }
  13.  
  14. // printf("\n");
  15.  
  16. // return;
  17. // }
  18. #include <stdio.h>
  19.  
  20. void print (int v[]);
  21.  
  22. int main(){
  23. int v[10];
  24. int i;
  25. for (i = 0; i < 10; i++) { v[i] = 0;}
  26. print(v);
  27. return 0;
  28. }
  29.  
  30. void print (int v[]){
  31. int i;
  32. printf("Indexes = ");
  33. for (i = 0; i < 10; i++) {
  34. printf("%3d ", i);
  35. }
  36. printf("\n");
  37. printf("Values = ");
  38. for (i = 0; i < 10; i++) {
  39. printf("%3d ", v[i]);
  40. }
  41. printf("\n");
  42. }
Success #stdin #stdout 0s 5536KB
stdin
Standard input is empty
stdout
Indexes =   0   1   2   3   4   5   6   7   8   9 
Values =   0   0   0   0   0   0   0   0   0   0