The example says that C is unreachable, but there is the production S-> aBC so C is clearly reachable. This is an error right? or am I missing something.
2 Answers
Yes, that is an error, because C is reachable from S by using the production rule S->aBC and derives the string ababb using production rule C->abb and B->b. Hence C is reachable.
Just because C is a suffix of output of rule S -> aBC doesn't make C reachable from S, since aBC -> C is not necessarily reachable. Reachability from initial state is about reachability of strings of terminal symbols (denoted by strings containing only lower case letters). Nonterminals (the capital letters) are supposed to be expanded out at some point using the rules.