ramontricolor12

LISTA 08 - Exercício 05

Aug 9th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. /*CABEÇALHO
  2.     Arquivo: LISTA 08 - Exercício 05.c
  3.     Objetivo: Exiba todos os valores de um vetor usando ponteiros.
  4.     Autor(a): Ramon Borges.
  5. */
  6.  
  7. #include <stdio.h>
  8.  
  9. //PROTÓTIPO DE FUNÇÕES
  10. void exibeVetor(int *vet, int qtde);
  11.  
  12. int main()
  13. {
  14.     int vetor[13] = {1,5,3,8,7,12,13,1,9,7,5,43,1};
  15.     exibeVetor(vetor, 13);
  16. }
  17.  
  18. void exibeVetor(int *vetor, int qtde)
  19. {
  20.     int i;
  21.     for(i = 0; i < qtde; i++, vetor++)
  22.         printf("%d ", *vetor);
  23.     return;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment