when to use extern c code example Example: when to use extern "C" extern "C"{ int printf(const char *format,...); } main() { printf("Hello World"); }