A structure can be passed to a function through its object. Therefore, passing a structure to a function or passing a structure object to a function is the same because structure object represents the structure. Like a normal variable, structure variable (structure object) can be passed by value or by references / addresses. Similar to built – in data types, structures also can be returned from a function.
Output:
Enter Employee Id : 10
Enter Employee Name : Ajay
Enter Employee Age : 25
Enter Employee Salary : 15000
Employee Id : 10
Employee Name : Ajay
Employee Age : 25
Employee Salary : 15000