Sometimes when I run my code, a core dump file is generated when I terminate the program by Ctrl+\\. The file name is of the form core.*.
core.*
ctrl + \ sends signal SIGQUIT to the process. According to POSIX.1 standard, the default action for this signal is to generate a core.
SIGILL, SIGABRT, SIGFPE, SIGSEGV are other cases when system will generate a core.
Please refer "man 7 signal" on your system for more details.