fork(2) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. typedef struct {
  4. int a;
  5. } Exemplo;
  6.  
  7. int main(void) {
  8. Exemplo *p = malloc(sizeof(Exemplo));
  9. p->a = 10;
  10. printf("valor = %d", p->a);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
valor = 10