Skip to content

Instantly share code, notes, and snippets.

@gerep
Created December 30, 2014 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerep/f883662236514a09c53a to your computer and use it in GitHub Desktop.
Save gerep/f883662236514a09c53a to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
void test(int *vet)
{
printf("depois %lu\n", ( sizeof(vet)/ sizeof(vet[0])) );
}
int main(int argc, char const *argv[])
{
int vet[]={1,2,3,4,5};
printf("antes %lu\n", ( sizeof(vet)/ sizeof(vet[0])) );
test(vet);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment