Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In this project, we maintain the details of all employees and their children using nesting of structures. Consider each employee has four children and all are studying same number of subjects in same class. These are the structure members of Employee, Children, and Subjects.
Employee         Children               Subjects
ID                name                   sub1
Name              age                    sub2
Age               gender                 sub3
Gender            struct subjects        total
Salary
Struct children

Here, You need to
1. List all employees whose children got 75% of total marks.
2. List children names of employees whose salary more than the average salary of all employees
3. Count the number of male and female children of all employees.
4. Sort children of all employees by their names and print it.

What I have tried:

i tried sir. but i am not understanding nested structures.sir now pls pls pls provide me with the code of the above sum.pls sir. pls sir.sir pls try to give it by sunday ie 30 th nov . pls sir.pls mail me to ***************
Posted
Updated 27-Oct-16 22:38pm
v6
Comments
Suvendu Shekhar Giri 28-Oct-16 1:36am    
First of all, share the correct structure.. what you have shared looks very confusing
[no name] 28-Oct-16 12:35pm    
Could you post the code that you have tried so for so that I can see what you are missing!

Quote:
i tried sir. but i am not understanding nested structures

Nested structures are structures inside other structures, nothing special.
For instance
C
struct Point
{
  double x,y;
};

struct Circle
{
  struct Point center; // here Point is nested in Circle
  double radius;
};

Try harder to solve your problem and post here just specific questions.
 
Share this answer
 
Thank you very much for your personal message, trying to get me to solve your problem.

However, this site does not provide a one-to-one solution service, and all answers should be public, so that everyone in a similar position can get help from it. In addition, replying directly to you would mean giving you my email address, and I receive quite enough emails on a daily basis already!

So my answer will also be public, and since it relates exactly to the question you posted here, I will answer it here:
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!

You should also be aware that your tutors are aware of sites like this, and will often come looking to see who is not doing their own work: you can fail the course by trying to cheat in this way.
 
Share this answer
 
Comments
Rahul VB 30-Oct-16 10:42am    
Again, my 5! well said.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900