Running the program
To run the program, just use:
(gdb) run
This runs the program.
If it has no serious problems (i.e. the normal program didn’t
get a segmentation fault, etc.), the program should run fine
here too.
If the program did have issues, then you (should) get some
useful information like the line number where it crashed, and
parameters to the function that caused the error:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000400524 in sum array region (arr=0x7fffc902a270, r1=2, c1=5,
r2=4, c2=6) at sum-array-region2.c:12
GDB Tutorial