Practice ยท 1 of 4
Fix: = vs ==
is_full(int used, int cap) below ALWAYS returns 1 โ the condition assigns instead of comparing. Fix it so it returns 1 exactly when used == cap.
``c
int is_full(int used, int cap) {
int r;
if (used = cap) r = 1; else r = 0;
return r;
}
``
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Warning Forensics