Skip to content

Problem Set 3: Structures and Algorithms

Complete these three tasks in order:

  1. Student Lookup — simple
  2. Sorted Student Directory — moderate
  3. Class Gradebook — moderate

All tasks use arrays of structures. The first practices storing related values and performing a linear search. The second continues the same problem with selection sort and binary search. The third combines structures with input validation, statistics, and sorting.

Write all three programs in standard C. Keep the program logic inside main; custom functions are not required for this problem set.

Folder Structure

Organize your source files as follows:

cs105-week-3/
├── student-lookup/
│   └── student_lookup.c
├── sorted-student-directory/
│   └── student_directory.c
└── class-gradebook/
    └── gradebook.c

Do not include compiled executables in your submission.

Before You Submit

Check that:

  • all three source files are present;
  • each program compiles without warnings or errors;
  • all three programs use a struct to keep related values together;
  • the lookup works for existing and missing IDs;
  • the sorted directory swaps complete records and uses binary search;
  • the gradebook correctly calculates the average and highest score;
  • the gradebook sorts complete student records rather than scores alone;
  • you tested the edge cases listed on each task page; and
  • indentation and variable names are consistent.

How to Submit

  1. Create a public GitHub repository named cs105-week-3.
  2. Upload or push the three folders shown above to the repository.
  3. Open the repository link in a private/incognito browser window to confirm that it is publicly accessible.
  4. Email the repository link to odina.kholiqov@dii.tj.
  5. Use the subject CS105 Week 3 — Your full name and include your full name in the email.

Do not attach a ZIP file or compiled executables.

Return to the Week 3 notes.