title: How to input value from user using structure pointer and display the value of structure members?
body: <pre><code>#include&lt;stdio.h&gt;
  #include&lt;string.h&gt;
  
  struct employee
  {
     int id;
     char name[20];
     float salary;
     char addr[];   
  }*emp;
  
  void get_emp(struct employee **record)
  {
  
     printf("\tplease enter details of employee:\n");
  
     printf("id= ");
      scanf("%d",(*record)-&gt;id);//code to get input value
  
     printf("Name= ");
     scanf(" %s",(*record)-&gt;name);
  
     printf("salary= ");
     scanf("%f",(*record)-&gt;salary);
  
  
  }
  
  int main()
  {
  get_emp(&amp;emp);
  printf("id=%d\n",emp-&gt;id); // code to display the value
  printf("Name=%s\n",emp-&gt;name);
  printf("salary=%f\n",emp-&gt;salary);
  
  
  return 0;
  }
  </code></pre>
  
  <p>I have a structure example and I want to pass structure pointer to the function without using normal variable but only pointer. Is the parameter(double pointer) in the function <strong>get_emp(struct employee **record)</strong> a correct way to do if not what changes should be made? Also how to get input value from users in the function <strong>get_emp(struct employee **record)</strong> and how to display the value?</p>