Advertisement
d3dx939dll

Aula38 - Argumentos com Funções

Jan 13th, 2021
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.66 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void){
  4.     void funcaoPrint(int x, int vetor[]);
  5.     int x = 10;
  6.     int vetor[3] = {10};
  7.  
  8.     funcaoPrint(x, vetor);
  9.     printf("= = = Main = = =\n");
  10.     printf("Variavel Int Na Main: %i \n", x);
  11.     printf("Vetor na Funcao Principal: %i \n", vetor[1]);
  12.  
  13.     return 0;
  14. }
  15. void funcaoPrint(int x, int vetor[]){
  16.     x = x + 10;
  17.     vetor[1] = 20;
  18.     printf("= = =Funcao = = =\n");
  19.     printf("Variavel Int na Funcao Print = %i \n", x);
  20.     printf("Vetor na Funcao print = %i \n\n", vetor[1]);
  21. }
  22.  
  23. //Sobre
  24.  
  25. //Aula: Comportamento de Argumentos com Funções (#38)
  26. //Video: youtube.com/watch?v=NS1LdXMyx3A
  27.  
  28. //Data: 14/01/2021
  29. //Autor: @d3dx939dll
  30. //Grupo: Heikoa
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement