A C program that crashes will offer no information about the error:
#include <stdio.h> int main(int argc, char *argv[]) { int a[10]; int i = -872625577; a[i] = 1234; printf("i = %d\n", i); printf("a[i] = %d\n", a[i]); } |
DEMO: /home/cs255001/demo/tmp/demo.c
|
DEMO: /home/cs255001/demo/tmp/demo.c
Online resource to learn GDB: