C Programming
Computer Programming

C Programming on Structure and Union

C Programming

» Write a program in C to create, declare and initialize structure
» Write a program in C read and print an employee's detail using structure
» Write a program in C to demonstrate example of Nested Structure
» Write a program in C to demonstrate example of structure pointer (structure with pointer)
» Write a program in C to demonstrate example structure pointer (structure with pointer) using user define function
» Write a program in C to declare and initialize union
» Write a program in C to demonstrate example of structure of array
» Write a program in C to add two distances in feet and inches using structure
» Write a program in C to extract individual bytes from an unsigned int using union
» C program for passing structures as function arguments and returning a structure from a function
» Write a program in C to calculate party expenses using structure
» Write a program in C to find the size of the union
» Write C program to accept the details of employee and display them using structure. Details consist of Employee ID, Name, Designation, Department, and Salary
» Write C program to read the details of two workers and calculate total payment of workers using structure
» Write C program to accept batting information of cricket team using structure. It contains player name and runs scored by player. Calculate total runs scored by cricket team
» C program to read information of student. It contains Name, Roll number, Birthday, admission date. Calculate age of student at the time of admission
» Write a C program to accept customer details such as: Account_no, Name, Balance using structure. Assume 3 customers in the bank. Write a function to print the account no. and name of each customer whose balance < 100 Rs
» Write a C program to accept details of 'n' employee(eno, ename, salary) and display the details of employee having highest salary. Use array of structure
» Write a menu driven program in 'C' which shows the working of library. The menu option should be
    i) Add book details
    ii) Display book details
    iii) List all books of given author
    iv) List the count of books in the library
    v) Exit

» Write a C Program to create a structure of student having fields roll_no, stud_name, mark1, mark2, mark3. Calculate total marks and average marks. Arrange the records in descending order of marks
» Write a C program to accept book details for 'n' books as book_title, author, publisher and cost. Assign the accession number to each book in increasing order. Display these details as
    1. Books of a specific author
    2. Books by a specific Publisher
    3. All Books costing Rs. 500 and above
    4. All Books

» Write a C program to create student structure having field roll_no, stud_name, class. Pass this entire structure to function and display the structure elements
» Write a menu driven program in C to create a structure employee having fields empid, empname, salary. Accept the details of 'n' Employees from user and perform the following operations using function
    1. Search by Emp-Id
    2. Display All
    Display Names of Employee having Salary > 10000

» Write a C program to create a student structure having fields stud_name and address. Accept the details of 'n' students, rearrange the data in alphabetical order of student name and display it