fork(7) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int retornaMediana(int *vetor, int tam){
  5. printf("TESTE: %d, %d, %d\n\n",vetor[0],vetor[1],vetor[2]);
  6. return tam;
  7. }
  8.  
  9. void main(){
  10. int vetor[] = {5,25,7,10,13,33,45,11,60};
  11. int len = sizeof(vetor)/sizeof(int);
  12.  
  13. int n = retornaMediana( vetor, len );
  14.  
  15. printf("TAMANHO = %d\n\n",n);
  16. printf("TAMANHO = %d\n\n",len);
  17. }
Runtime error #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
TESTE: 5, 25, 7

TAMANHO = 9

TAMANHO = 9