This file contains hidden or 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> | |
| int main() { | |
| int years[] = {2016, 2017, 2018}; | |
| char *langs[] = {"PHP", "GO", "Rust"}; | |
| // Ponteiro genérico, recebe qualquer endereço sem ser importar com o tipo associado | |
| void *ptr; | |
| // "ptr" agora tem o endereço do primeiro ano |
This file contains hidden or 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> | |
| #define LENGHT 5 | |
| char *langs[LENGHT] = {"PHP", "GO", "C", "Rust", "JS"}; | |
| int main() { | |
| // Ponteiro | |
| char *pc; |
This file contains hidden or 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
| // Estudo sobre o básico de ponteiros e ponteiros de ponteiros lidando com inteiros. | |
| #include <stdio.h> | |
| #define LEN 5 | |
| int values[LEN]; | |
| int main() { | |
| int *ptr; // Ponteiro |