I want to create two functions, one is to fill a vector with random numbers. The other function is to display the contents of the filled vector. So I did this:
#include <stdio.h>
#include <stdlib.h>
int vetor[5];
void inicia(int v[5]){
int i;
for(i=0;i<5;i++){
v[i] = 1 + rand() % 20;
}
}
void mostra(int v[5]){
int i;
for(i=0;i<5;i++){
printf("%d", v[i]);
}
}
int main(){
void inicia(int vetor[5]);
void mostra(int vetor[5]);
return 0;
}
I wanted to understand why the "show" function is not printing the value.