Module 5 · Build your Study Planner and practise independently · Lesson 20 of 20
Return tomorrow: solve fresh problems and choose your next step
What can you still solve after closing the earlier examples? Ideally return in a later sitting. Predict all six answers on paper before checking any of them.
This is a check of the skills in this course. It has no countdown, automatic reminder or stored confidence score. Mark each prediction sure or guess. A correct choice with a clear explanation is more informative than a lucky choice.
1. Trace values and arithmetic
using System; int minutes = 7; int copy = minutes; minutes += 2; Console.WriteLine(copy / 2); Console.WriteLine(minutes);
What are the two output lines?
Show answer
Correct answer: C
copy retains 7; integer division 7 / 2 produces 3. minutes becomes 9.
Option A: Integer division does not round 3.5 up to 4.
Option B: minutes was increased by 2.
Option D: Both operands of copy / 2 are ints, so no fractional result is produced.
2. Trace a loop
using System;
int total = 0;
for (int day = 1; day <= 3; day++)
{
total += day * 5;
}
Console.WriteLine(total);What prints?
Show answer
Correct answer: B
The loop adds 5, 10 and 15, for a total of 30.
Option A: 15 is only the final addition, not the accumulated total.
Option C: The condition includes day 3.
Option D: day increases and eventually becomes 4, making the condition false.
3. Follow a copied object reference
using System;
StudyTask original = new StudyTask { Title = "Read" };
StudyTask other = original;
other.IsDone = true;
other = new StudyTask { Title = "Practise" };
Console.WriteLine(original.Title);
Console.WriteLine(original.IsDone);
class StudyTask
{
public string Title { get; set; } = "";
public bool IsDone { get; set; }
}What are the two output lines?
Show answer
Correct answer: D
The first mutation affects the shared object. Reassigning other later does not redirect original.
Option A: The new object is assigned only to other.
Option B: The earlier IsDone mutation did affect the original object.
Option C: original still reaches the object titled Read.
4. Choose a validation check
A task number must be between 1 and tasks.Count before indexing tasks[number - 1]. Which input is especially useful when checking the lower boundary?
Show answer
Correct answer: B
0 should be rejected; 1 should be accepted when at least one task exists. Together they test the boundary.
Option A: A huge number tests only the upper rejection path.
Option C: Text tests parsing, not the numeric lower boundary.
Option D: This is another upper-bound rejection case.
5. Distinguish text parsing from a data rule
int.TryParse reads -5 successfully. The application requires nonnegative study minutes. What should happen next?
Show answer
Correct answer: B
Parsing establishes that the text is an int. A separate rule rejects negative minutes.
Option A: Representable numbers can still be outside the application’s allowed range.
Option C: Silently changing the user’s meaning is not validation.
Option D: TryParse reports success or failure without a parsing exception for ordinary invalid text.
6. Keep a save failure visible
Saving the planner fails. Which behaviour helps the learner act correctly?
Show answer
Correct answer: C
An honest failure message avoids implying persistence succeeded, and retaining the list lets the user try again.
Option A: That would claim something the program did not achieve.
Option B: Losing the in-memory data makes recovery harder.
Option D: Silent failure leaves the learner believing work may have been saved.
Find the next useful practice
| If you missed… | Revisit | Then do this |
|---|---|---|
| 1 | Variables and calculations | Change the starting values and predict again. |
| 2 | Loops | Trace day and total after each iteration. |
| 3 | Objects and copying | Draw two variables and count the new objects. |
| 4 or 5 | Input and validation | Check parse failure, zero and both bounds. |
| 6 | Files and saving | Reproduce a handled save failure in a practice folder. |
A practical finish line
From a blank project, rebuild a small version of the Study Planner with add, list and quit. Add completion, then save/load. Use the checklist from the project lessons to check it. Explain one bug you found and the check that exposed it. Completion of these pages is useful progress; independent building is the stronger signal that the foundations are taking hold.
When you can rebuild and explain that planner, continue to C# Intermediate. It assumes these syntax and collection skills. You will protect state with object contracts, replace the report loop with deliberate LINQ queries, then introduce Task/await and cancellation. You do not need LINQ or async to finish Beginner. Advanced follows Intermediate and adds concurrent ownership, memory views and controlled failure checks.
If rebuilding still needs the completed answer beside you, revisit the relevant row above before adding those new concepts.
References: Microsoft — C# learning path and testing in .NET.
Quick reference
- Predict before running or revealing answers.
- Trace the state after each important line.
- Explain why an answer follows from the code.
- Revisit the specific missing skill, then try a changed example.
- Build a small application independently before moving to more advanced topics.
TechInterviewNotes Editorial Team · Updated 27 Oct 2026 ·