Question: what is undefined reference error in c?
Answer: Put simply, the “undefined reference” error means you have a reference (nothing to do with the C++ reference type) to a name (function, variable, constant etc.) in your program that the linker cannot find a definition for when it looks through all the object files and libraries that make up your project.