fork download
  1. #include <stdio.h>
  2.  
  3. typedef struct {
  4. unsigned int emp_id;
  5. char * name;
  6. } emp_t;
  7.  
  8. emp_t emp1 = {3,"Parth"};
  9.  
  10.  
  11. int main(void) {
  12.  
  13. emp_t * emp_ptr = &emp1;
  14. scanf("emp id %d",&emp1.emp_id);
  15. printf("employ id : %d\n",emp_ptr->emp_id);
  16. printf("employ name: %s\n",emp_ptr->name);
  17. // your code goes here
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0.01s 5268KB
stdin
2
stdout
employ id : 3
employ name: Parth