There used to be a series of book called "Learn code the hard way". It was basically exactly this, you would have a bunch of code, and you were expected to retype it. The examples would progressively increase in complexity.
It helped me learn C 10 years ago when I was a student. Sadly, I doubt it's still relevant nowadays.
It helped me learn C 10 years ago when I was a student. Sadly, I doubt it's still relevant nowadays.