Student Q&A

I understand Programming Fundamentals lectures but cannot solve FAST exam questions. How can I improve?

Answer

Curated by FastianHub · Updated

This is probably the most common first-semester problem at FAST, and it's fixable. Understanding a lecture and producing a solution from a blank page are two different skills. Lectures train the first one. Exams test the second, and the only way to build it is to practise producing solutions yourself.

PF is built around problem-solving, not memorising code. Students who've been through it keep saying the same few things: stay consistent, do more questions, and don't let your early momentum fade. Having coded before helps less than people expect, because the quizzes and midterms humble a lot of students who arrive with experience. The topics also carry forward. Pointers and dynamic memory come back in OOP and recursion comes back in data structures, so weak PF basics follow you for a long time.

Here's a routine that works for most people. Before you write any code, read the question and write down the input, the required output and any constraints. Then explain the steps in plain words, as if you were telling a friend how to do it by hand. Only after that, turn the steps into code in the language your course uses. When you get stuck, name exactly where. Is it understanding the question, choosing an approach, turning the approach into code, or finding a bug? Each one has a different fix, and knowing which one it is saves hours.

Mix up your practice. Solve something from an empty page. Trace a short program line by line and write down what each variable holds at every step. Take a broken solution and explain why it fails before you fix it. If your exams are handwritten, practise on paper as well, then type it in afterwards, compile it and see what you got wrong. When you fix an error, make sure you can say why it was an error. Changing things until the output looks right teaches you nothing.

For extra questions, easy problems on sites like LeetCode or HackerRank are fine once the basics are in place. Past papers work best after you've got a grip on the concepts, as a test of what's still shaky rather than as your first resource.

You'll also find older PF assignment sets from Lahore (Fall 2022, theory course) on GitHub with student solutions. Use the questions selectively, check they match what your instructor has covered, and don't open the solutions until you've tried. They're old and student-written, they're not an answer key, and they're for theory, not labs.

A word on AI. Under FAST's rules, AI tools are generally off-limits in labs like PF, OOP and data structures unless your lab instructor explicitly allows them. Even where they are allowed, copying code you don't understand catches up with you at the first midterm. If you use an AI tool to explain a concept while studying, check what it told you, then close it and solve the problem again on your own.

Don't treat one bad result as the end of the story. A single lab exam or quiz is only part of the semester's marks, and plenty of students find the first lab exam rough. What helps is going to your instructor or TA with your attempted solution and one specific question. 'I don't see why this step works' gets a far better answer than 'I can't do PF'. The best measure of progress is what you can solve and explain without help, not how many videos you've watched.

Official policy references

Check the university's current rules and your course outline for requirements that apply to you.