Last active
May 23, 2018 02:34
-
-
Save ganobrega/90b8e164098953739085e6f3dfec79bc to your computer and use it in GitHub Desktop.
Linguagem C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
void exemplo(int *a, int *b, int *c){ | |
*a = 3; | |
*b = 4; | |
*c = 5; | |
} | |
void exemplo2(int a, int b, int c){ | |
a = 6; | |
b = 7; | |
c = 8; | |
} | |
int main(){ | |
int a = 0; | |
int b = 1; | |
int c = 2; | |
printf("-------- EXEMPLO PONTEIRO --------\n"); | |
exemplo(&a, &b, &c); | |
printf("A: %d \n", a); | |
printf("B: %d \n", b); | |
printf("C: %d \n", c); | |
printf("-------- EXEMPLO NORMAL --------\n"); | |
exemplo2(a, b, c); | |
printf("A: %d \n", a); | |
printf("B: %d \n", b); | |
printf("C: %d \n", c); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment