printf
help50
style50
check50
debug50 ./hello
- breakpoint
- step over: execute this line just once
- step into: look inside the function
- step out: jump out of the loop
valgrind ./hello
-?a command-line tool to run the program and check for any?memory leaks, or the memory we’ve allocated without freeing, which might eventually cause computers to run out of memory.
- Output:
? ? ? ? invalid write of size 1? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (write: change a value)
? ? ? ? invalid read of size 1? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (read: read / print a value)
? ??????HEAP SUMMARY:
? ? ? ? ? ? ????in use at exit: 4 bytes in 1 blocks
? ? ? ? ? ? ? ? total heap usage: 1 allocs, 0 frees, 4 bytes allocated
????????4 bytes in 1 blocks are definitely lost in loss record 1 of 1