title: program to store details of an employee in a structure
body: <p>This is a program to store details of an employee in a structure. Although the program runs it shows many errors, it does not give me a chance to enter address. Why is the program not running properly . Where am I going wrong ? </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  
  struct details
  {
   char name[30];
   int age;
   char address[500];
   float salary;
  };
  
  int main()
  {
   struct details detail;
   clrscr();
   printf("\nEnter name:\n");
   gets(detail.name);
   printf("\nEnter age:\n");
   scanf("%d",&amp;detail.age);
   printf("\nEnter Address:\n");
   gets(detail.address);
   printf("\nEnter Salary:\n");
   scanf("%f",&amp;detail.salary);
  
  
   printf("\n\n\n");
   printf("Name of the Employee : %s \n",detail.name);
   printf("Age of the Employee : %d \n",detail.age);
   printf("Address of the Employee : %s \n",detail.address);
   printf("Salary of the Employee : %f \n",detail.salary);
  
   getch();
  }
  </code></pre>
  
  <p>This is the output I get:</p>
  
  <p><img src="https://i.stack.imgur.com/AFMTz.png" alt="enter image description here"></p>