Assert In C and Cpp

preview_player
Показать описание
JOIN ME
—————

COMPLETE PLAYLIST
————————————

INTERVIEW PLAYLIST
————————————

QUICK SHORT VIDEOS
————————————-

In this video we will learn how to use assert in c and cpp programming language.
Assert is used to check some condition shouldn't happen when program is under execution, and if that condition hits then we should stop the execution of the program. If this is the requirement then we use assert.

SYNTAX:
assert(condition);

And if condition returns false then it fails and program execution is stopped and terminated.

#assert #cprogramming #cpp #tutorial #computerscience #programming #interviewquestions
Рекомендации по теме
Комментарии
Автор

Note: NULL => C, nullptr => C++

ArjanvanVught
Автор

Good to know that assert can be removed from release, thank you!

kamalmoustafa
Автор

Hit like if you also write `dispaly` instead of `display`! lol

dmitry.shpakov