Using Assert in C to Make Debugging Better

preview_player
Показать описание
In this video, I introduce a helpful statement for testing your code in C. This helpful piece of code is the assert function. It works similarly to an if statement, where it checks if a condition is true or false. If the condition is true, then the assert statement does nothing. However, if the condition is false, then the code halts at the assert statement. Additionally, the file and line number of the assert statement are outputted in the terminal, and the condition itself is outputted as well.

I hope you enjoy!
Рекомендации по теме
Комментарии
Автор

thank you!! very helpful and easy to understand

wc
join shbcf.ru