Answer to Question #153737 in C for joy

Question #153737
  1. Explain all the lines
  2. /// Function + Array + Struct
  3. #include<stdio.h>
  4. struct Employee
  5. {
  6. char eName[20];
  7. int age;
  8. int exp_year;
  9. int salary;
  10. }empl[10];
  11. ///struct Employee empl[10];
  12. int i;
  13. void main()
  14. {
  15. emplinfo();
  16. printf("\n\n\n");
  17. return 0;
  18. }
  19. void emplinfo()
  20. {
  21. for(i=0; i<3; i++)
  22. {
  23. printf("\nInsert the Employee%d Name: ", i+1);
  24. scanf("%s", empl[i].eName);
  25. printf("\nEnter his/her age,exp_year and salary:");
  26. scanf("%d%d%d", &empl[i].age,&empl[i].exp_year,&empl[i].salary);
  27. }
  28. printf("\n\nThe struct information:\n");
  29. for(i=0; i<3; i++)
  30. {
  31. printf("\nThe Name of Employee%d: %s", i+1, empl[i].eName);
  32. printf("\nHis/her age: %d", empl[i].age);
  33. printf("\nHis/her exp_year: %d", empl[i].exp_year);
  34. printf("\nHis/her salary: %d", empl[i].salary);
  35. printf("\n\n");
  36. }
  37. }
  38. View assignment
1
Expert's answer
2021-01-04T01:36:33-0500
Dear joy, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS