0
0
Cprogramming~5 mins

Reusability and maintenance - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does reusability mean in programming?
Reusability means writing code that can be used again in different parts of a program or in other programs without rewriting it.
Click to reveal answer
beginner
Why is maintenance important in programming?
Maintenance means fixing bugs and updating code easily. Good maintenance saves time and keeps programs working well over time.
Click to reveal answer
beginner
How do functions help with reusability in C?
Functions let you write a block of code once and call it many times, so you don’t repeat the same code everywhere.
Click to reveal answer
intermediate
What is the role of header files (.h) in C for maintenance?
Header files store function declarations and constants. They help keep code organized and make it easier to update or fix parts without changing everything.
Click to reveal answer
beginner
Name one way to improve code maintenance in C.
Using clear variable names and comments helps others understand the code, making it easier to fix or improve later.
Click to reveal answer
What is a key benefit of writing reusable code?
ACode uses more memory
BCode runs faster
CCode becomes harder to read
DYou write less code and save time
Which C feature helps you reuse code easily?
AFunctions
BComments
CVariables
DMacros
What does maintenance NOT include?
ADeleting the whole program
BAdding new features
CFixing bugs
DImproving code readability
How do header files (.h) help with maintenance?
AThey increase program size
BThey make code run faster
CThey store function declarations separately
DThey hide all code from the user
Which practice improves code maintenance?
AUsing unclear variable names
BAdding comments to explain code
CAvoiding code formatting
DWriting long, complex functions
Explain how writing functions in C improves reusability and maintenance.
Think about how you can use the same code multiple times without rewriting it.
You got /3 concepts.
    Describe two ways to make C code easier to maintain.
    Consider how others can understand and fix your code later.
    You got /4 concepts.