It's Asimov. Don't remember the title of the story. And you've mixed it up a little bit.
In a future every one gets basic skills (reading, writing, arithmetic) instantly, as a child. But when they grow up, their potential skills are determined, by analyzing their brains, and that's become their profession. All knowledge is sort of implanted in their brain. They function but not quite capable of learning new concepts.
The hero goes through that "job skills" analysis and subsequently finds himself in sort of a psychiatric clinic. Then he learned that he does not have any particular skills, he's not capable of doing anything, so he'll spend the rest of his life locked in that institution. He rebels, tries to run away, gets captured after some misadventures and eventually learns that people like himself iare the real core of the whole system, people who are creative and imaginative and don't want to conform to the rules of the society, and among other things, they are those who create educational programs that gets implanted into the brains of those "with specific skills". Locking him up was testing him, his attempt to rebel meant he passed that test.
PPJr.