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