forked from blau_araujo/pbn
diretórios 8 e 13 de exemplos
This commit is contained in:
parent
62338a8185
commit
6fbe5f3a62
13 changed files with 820 additions and 0 deletions
14
curso/exemplos/08/exemplo.c
Normal file
14
curso/exemplos/08/exemplo.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
|
||||
int a = 123;
|
||||
char *b = "123";
|
||||
int *c = (int *)b; // Casting do valor no endereço 'b' para inteiro
|
||||
|
||||
printf("Inteiro a: %d\n", a);
|
||||
printf("String b: %s\n", b);
|
||||
printf("Inteiro c: %d\n", *c); // Imprime o valor no endereço 'c'
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue