What does assert() do?

Answers were Sorted based on User's Feedback



What does assert() do?..

Answer / guest

In debug compilation, assert takes in a Boolean condition as
a parameter, and shows the error dialog if the condition is
false. The program proceeds without any interruption if the
condition is true

Is This Answer Correct ?    5 Yes 0 No

What does assert() do?..

Answer / 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

More C Sharp Interview Questions

What is a jagged array?

0 Answers  


Can dictionary have duplicate keys c#?

0 Answers  


In .NET how can you solve the DLL Hell problem?

0 Answers   Siebel,


What is int32 maxvalue?

0 Answers  


What is Abstraction?

8 Answers   Google, HCL, IBM, MAHINDRA, Tech Mahindra,






What is sorting in c#?

0 Answers  


What is the difference between as and is operators in c#?

0 Answers  


directcast(123.34,integer) - should it throw an error? Why or why not?

2 Answers   Wipro,


What is state c#?

0 Answers  


How many types of constructor are there in c#?

0 Answers  


Which config file has all the supported channels/protocol?

0 Answers  


What is constants in c#?

0 Answers  


Categories