C++ Structures

Back To C++ Index


1. program to create a structure student with members rollno, name and marks. structure variable is initialized with values (1,abcdef,90) - Code
2. program to create a structure student with members (rollno, name,marks and clas) and input values from user and then display the values - Code
3. program to create a structure employee with members (ecode, ename,salary and designation) and input values from user and then display the values - Code
4. program to create a structure book with members (bookid, bookname,author and price) and input values from user and then display the values - Code
5. program to create a structure movie with members(movieid, moviename,star1,star2 and price) and input values from user and then display the values - Code
6. program to create a structure student and calculate percentage based on marks (example of array within a structure) - Code
7. program to create a structure student and creating array of structure of 3 variables (example of array of structure variables) - Code
8. program to create a structure to demonstrate complex number with members (real and imaginary) - Code
9. program to create a structure distance with members (feet and inches), two structure variables are created - Code
10. program to create a structure employee with members (ecode,ename ,salary and nested structure address) structure address has members (houseno,street,city and state)(example of nested structures)- Code
11. program to create a structure student with members (rollno, marks, class and nested structure name) structure name has members (firstname and lastname)(example of nested structures)- Code
12. program to create a structure employee with members (ecode, designation and two nested structures ename and salary ) structure ename has members (firstname and lastname) structure salary has members (basic,da,hra)(example of nested structures)- Code
13. program to create a structure employee with members (rollno, name and two nested structures clas and marks ) structure clas has members (cla and section) structure marks has members physics,chemistry and marks)(example of nested structures)- Code
14. program to create a structure marks with members (physics,chemistry,maths and total) array of structure marks is created and total marks are calculated for each student - Code
15. program to create a structure student with members (rollno,name,marks and clas) input values from user and pass the structure variable to function which prints the values of the members of the structure variable - Code
16. program to create a structure complex number with members(real and imaginary), creates two structure variables and passes these variables to function which calculates sum of two complex number structure variables - Code
17. program to create a structure complex number with members(real and imaginary), creates two structure variables and passes these variables to function which calculates sum of two complex number structure variables into a new structure variable and returns the variable - Code
18. program to create a structure student and create a reference to variable of structure student - Code