With three children (Alice, Bob, and Carol), three red hats and two black hats, there are 7 different configurations possible (with knowable hats boxed):
$$\begin{array}{cccl}
\text{Alice} & \text{Bob} & \text{Carol} \\
\\ \hline
\text{red} & \text{red} & \fbox{red} & \text{(1)} \\
\text{black} & \text{red} & \fbox{red} & \text{(2)} \\
\text{red} & \text{black} & \fbox{red} & \text{(3)} \\
\text{black} & \text{black} & \fbox{red} & \text{(4)} \\
\text{red} & \fbox{red} & \fbox{black} & \text{(5)} \\
\text{black} & \fbox{red} & \fbox{black} & \text{(6)} \\
\fbox{red} & \fbox{black} & \fbox{black} & \text{(7)} \\
\end{array}$$
If Alice sees two black hats (7), she'll know the black hats have been exhausted and she is wearing a red one. Since Alice knows the colour of her hat, Bob and Carol will know that they are both wearing black hats, since this is the only configuration that allows Alice to know her hat's colour.
If Alice sees at least one red hat, she doesn't know the colour of her own hat and will state so. Now if Carol is wearing a black hat (5, 6), Bob will know the colour of his hat, since Alice has seen at least one red hat and Carol's hat isn't it, so his must be. When Carol hears that Bob knows the colour of his hat, she can deduce that her hat is black, or else Bob wouldn't have known.
If Carol is wearing a red hat (1, 2, 3, 4), Alice won't know the colour of hers and neither will Bob know the colour of his, because all he can see is that Carol is wearing a red hat, but he will not know whether Alice saw two red hats or just one.
As we can see, Carol will always know the colour of her hat, while Alice will almost never know.
Alternative table using the new Markdown table formatting. Knowable hats are in all caps.
Alice |
Bob |
Carol |
|
red |
red |
RED |
(1) |
black |
red |
RED |
(2) |
red |
black |
RED |
(3) |
black |
black |
RED |
(4) |
red |
RED |
BLACK |
(5) |
black |
RED |
BLACK |
(6) |
RED |
BLACK |
BLACK |
(7) |