/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include #include #include #include int *criaVet(int ); void imprimeVet(int [], int); int maxVet(int *, int ); int main() { int tam; int *v; printf("tam=");scanf("%d",&tam); srand(time(NULL)); v = criaVet(tam); imprimeVet(v,tam); printf("\nmax=%d",maxVet(v,tam)); return 0; } int *criaVet(int n){ int *vet, i; vet = (int*) calloc(n,sizeof(int)); assert(vet); for(i=0; ivet[0]) return aux; return vet[0]; }