My professor at college stated that it is important to always initialize a function type because if you don't it creates a security vulnerability. He said that it is better to initialize it as zero and then let the programmer/user manipulate that value later on.
So my question is: Why is this a security vulnerability within the program?
It is not a security vulnerability. At least directly.
However it is a good idea to initialize variables at the time of declaration or right after. This helps to avoid using uninitialized variable which could lead to vulnerability.
A). (The most likely): Your professor is fear-mongering or exaggerating to instill the practice of correctly initializing your variables.
B) (Far FAR less likely): Your professor may be referring to a certain type of read after deletion exploit which requires a half dozen other things to line up just right (not to mention the use of a debugger) in order to be viable. Not that I question your instructors ability you understand, it would just be a very odd and specific thing to mention in what appears to be an introduction to programming class.