There's an interesting blend of confidence and ignorance that comes from a place of wisdom. It can be a useful position to take in oral exams and in writing.
I'm thinking about Socrates (or at least Plato's Socrates) who, in many of the dialogues, initiates his position by claiming that he is himself ignorant in some way. A very general position of Socrates is that he starts dialogues from the position of the questioner: he asks another to explain a thing that he does not understand (or claims not to understand). This sort of questioning does not come from a place of insecurity, but rather from a place of having his own strong and clear idea of what he believes, and yet recognizing that he does not know everything.
Academic situations beg for this sort of behavior. Certainly you, the student, have learned many things, but this does not mean that you're expected to know everything. An excellent position to take is the willingness to admit the gap in your knowledge, but then to supplement this with the insight that you can bring to the question.
In writing this may mean recognizing a gap in your scholarship, or a gap in your theory, but excusing that gap because of natural limitations of time: one cannot, after all, be expected to study everything, nor to discuss everything in a written work. One has to choose boundaries to limit any work, and these boundaries ought not be viewed as faults--though they can be viewed as such--rather they ought to be viewed as the natural limitations under which we all work. And yes, you can embrace the position that you ought to know more about the subject without actually knowing more or even promising to learn more in the immediate present.
In an oral exam this may mean admitting ignorance and then attempting to deconstruct the unanswerable question in terms of what you do know: "I don't know the precise answer to the question you're asking, but here's how I would handle the issues it raises."
Sometimes, of course, a questioner will expect you to have precise knowledge. Confident in your inevitable ignorance about some subject will not suffice to satisfy a questioner who insists that you know the precise answer. But for most cases, it is not the precise knowledge that will make the difference so much as it is the ability to use information and knowledge and questions in a meaningful way. The wise person, after all, is aware of the limits of knowledge--both personal and in the abstract. We cannot know everything.
The late Horst Rittel, a professor of Design Theories and Methods at the University of California, Berkeley, argued that there is a symmetry of ignorance: no one knows what information is necessary for the completion of a project. This applies to writing projects: when you start a writing project, you do not know exactly what information will need to be included (at least not if it is a big project) in the writing.
So, in short, be confident in yourself by accepting the limits of your knowledge. By acknowledging the limits, by being aware that we all are limited, you can enter the place of ignorance without fearing that ignorance is necessarily a failing. Sure, we all want to learn more, but no matter how hard we have studied, and no matter how long we have studied, we still will not know everything.
This should not be taken as a reason to stop trying to learn more or to get a better understanding of the scholarship in your field, but it is a reason that you need not fear gaps if you have been diligent in your efforts.
Beyond this question of the breadth of our knowledge is the question of what we do with it. My experience has been that some people have a far greater familiarity with a great body of scholarship than others, but that this familiarity does not guarantee using the material in a productive fashion.