What does assert() do?

Answer Posted / akshay

assert() is mainly used for debugging the code. The expression is given in the brackets and if the expression becomes false the Assertion Failure takes place. Which simply terminates the application giving file name and line number.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the types of errors in c#?

478


what are nullable types in c#

522


What is immutable in C#?

589


Is null empty or whitespace c#?

499


Can I define a type that is an alias of another type (like typedef in c++)?

532






Is int reference type c#?

501


What is writeline?

477


What is default boolean value in c#?

480


How can I get around scope problems in a try/catch?

473


Are cao stateful in nature?

472


What is cshtml?

519


In which format you can pass the value in the sleep function?

541


Define the term immutable ?

616


Why abstract class is not instantiated in c#?

517


How to block a class from being inherited further?

479