Courses / HEC NSCT – National Skill Competency Test: Complete Preparation for Computing Graduates

2.5 Code Tracing, Debugging and Good Practice

Area 2 – Programming (C++ / Java / Python) (10%) · 40 min read · 12 MCQs to check yourself

Output-prediction checklist

  1. Note the language – integer division and indexing rules differ.
  2. Build a trace table for loop variables.
  3. Watch for break/continue, switch fall-through and ++/--.
  4. In Python, remember mutable default arguments and that lists are passed by reference.

Good programming practice

Tracing code by hand (Chris Mayfield)

This lesson ends with a quiz of 12 MCQs. Open the lesson on PrepOasis to take it and save your progress.

Previous: 2.4 Memory Management and Exception Handling · Next: Area 2 Review, Checklist and Area Test

All lessons in HEC NSCT – National Skill Competency Test: Complete Preparation for Computing Graduates