Self-referential Structure Tree

Hard
2 views 24 Jan 2026
Create a binary tree node (data, left pointer, right pointer). Manually create a tree of 7 nodes and traverse it (inorder, preorder, postorder)....

Bit-field Flags Demo

Hard
3 views 24 Jan 2026
Structure with 5 different status flags stored (isActive, isPaid, isVerified, etc.) using bit-fields. Memory saving calculated using vs normal approach....

Structure Array Sorter

Hard
2 views 24 Jan 2026
Create an array of student structures. Create a sorting function that sorts based on marks. Implement bubble sort with structure swapping....

Nested Structure Book Library

Hard
2 views 24 Jan 2026
Create book structure (title, author structure (name, country), year, price). Create array of books and implement search function by author name....

Structure vs Union Memory

Medium
2 views 24 Jan 2026
Create a structure and union the same members. Do sizeof(). In the union, set one member and read the other - what do you get and why?...

Employee Payroll

Medium
2 views 24 Jan 2026
Create structure of employee (id, name, basic_salary, allowances). Create a function calculateNetSalary() which will calculate the final salary by applying deductions (PF, tax)....

Linked List Insert

Medium
3 views 24 Jan 2026
Create Node structure (data, next pointer). Create Functions: insertAtBeginning(), insertAtEnd(), insertAtPosition(), display(). Proper pointer manipulation....

Date Comparator

Easy
2 views 24 Jan 2026
Create a date structure (day, month, year). Input two dates and decide which one is first. Handle edge cases: leap year, invalid dates, odd dates...

Structure Padding Calculator

Easy
5 views 24 Jan 2026
Create a structure with char, int, char, or double members. Use sizeof() to find the total size. Then calculate it manually, taking into account padding. Why does the compiler add padding?...

Student Database Manager

Easy
3 views 24 Jan 2026
Make the structure of the student (roll_no, name, marks). Create an array of 5 students. Create Functions: addStudent(), displayAll(), findTopScorer(), calculateClassAverage(). Poor mini-project....