repl.it
@m_s__santos/

ponteiro-para-uma-estrutura

C

No description

fork
loading
Files
  • main.c
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "stdio.h"

typedef struct {
  int id;
  char * name;
} user;

int main(void) {
  user matheus, *p;
  matheus.id = 1;
  matheus.name = "Matheus Silva";
  p = &matheus;
  printf("%d - %s\n", p->id, (*p).name);
  static int order = 1 > 5;
  return 0;
}