The scenario is as follows... Player a has 3 cities and 2 knights, player B has 1 city and 1 knight, and player C has 1 city and no knights. The barbarians attack and given the state of the board, they have a strength of 5 but only 3 knights are activated. Player C obviously loses their city because they have the least amount of active knights but does player A also lose a city because they only have 2 knights to their 3 cities?
When the barbarians attack, they assume the strength of the total number of cities. Then we look at the total points of active knights on the board. When the knight points equal or surpass the barbarians strength, the Settlers are victorious. However, if there are more cities than knight points, the barbarians win. The actual difference does not matter after this point.
From the rulebook, Page 11 (completely dedicated to the barbarian attack):
If the barbarians win the battle, they pillage one or more cities. [...] The barbarians pillage one city belonging to the player who has the lowest total strength of active knights [...] If various players tie for having the lowest strength of active knights, each of those players loses 1 of his cities.
Additionally, if that city had a Wall, the Wall is also destroyed. If a city is a Metropolis, it cannot be destroyed by the barbarians. It is counted when they attack, though.
In your case, player C loses one city for not contributing any knights. If, for instance, player B had moved his knight on the previous turn and not re-activated it, players B and C were tied for least knight points (0) and both would have lost a city.