fork download
  1. #include <stdio.h>
  2.  
  3. int simpleArraySum(int array[6]) {
  4. int soma = 0;
  5. for (int i = 0; i < 6; i++) soma += array[i];
  6. return soma;
  7. }
  8.  
  9. int main(void) {
  10. printf("%d", simpleArraySum((int[]){1, 2, 3, 4, 10, 11}));
  11. }
  12.  
  13. //https://pt.stackoverflow.com/q/448758/101
Success #stdin #stdout 0s 4256KB
stdin
Standard input is empty
stdout
31