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
.arch armv6 | |
.eabi_attribute 28, 1 | |
.eabi_attribute 20, 1 | |
.eabi_attribute 21, 1 | |
.eabi_attribute 23, 3 | |
.eabi_attribute 24, 1 | |
.eabi_attribute 25, 1 | |
.eabi_attribute 26, 2 | |
.eabi_attribute 30, 6 | |
.eabi_attribute 34, 1 |
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
// file: hello.c | |
#include <stdio.h> | |
int main() { | |
printf("Hello World!"); | |
return 0; | |
} |
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
void foo ( Lista *p ) { | |
// modifica p | |
} | |
int main () { | |
Lista a; | |
// passa "a" como referência | |
foo ( &a ); | |
return 0; |
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
void foo ( Lista p ) { | |
// modifica p | |
} | |
int main () { | |
Lista a; | |
// passa "a" como valor | |
foo ( a ); | |
return 0; |
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
double tempo = 0.0; | |
// declara e inicializa | |
double *ptr = &tempo; | |
// valor | |
printf ("%p\n", ptr); | |
// Saída: 0xff53... | |
// endereço |
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
Lista adicionar (Lista lst, Registro reg) { ... } | |
Lista nova = adicionar (lista, registro); |
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
int num = 7; | |
printf ("Endereço de num: %p\n", &num); | |
/* Saída: | |
Endereço de num: 0x7ffee3733b3c | |
*/ |
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
bool adicionar (Lista *lst, Registro reg) { ... } | |
Lista lista; | |
Registro registro; | |
registro.chave = 31; | |
adicionar (lista, registro); |
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
typedef struct | |
{ | |
int chave; | |
// outros membros | |
} Registro; |
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
// aqui o asterisco significa: | |
// "isso aqui é um ponteiro" | |
int *ptr = # | |
// aqui significa: "pega o valor | |
// que está neste endereço" | |
int x = *ptr; |