I tried to run a simple C code like this below in Clion ide ,and everytime i do compile ,it shows me this message :
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) C code :
#include <stdio.h> #include <string.h> int main(void) { char ch = 'A'; short s = ch; printf(s); printf("\n________________________\n"); short s2 = 67; char ch2 = s2; printf(ch2); return 0; }
printf(s);is undefined behaviour as isprintf(ch2);. Please see exit code 139 site:stackoverflow.com