Cpp, Debugging, Profiling, Programming, Technology.
int num = 5; std::cout << "Factorial of " << num << " is " << factorial(num) << std::endl; return 0; } To debug this program with GDB, follow these steps: Compile the Program with Debugging Information: g++ -g -o factorial factorial.cpp Start GDB: gdb ./factorial Set a Breakpoint at the factorial