Interview Question 3574
Created by admin on Sat, 17/11/2012 - 12:41
Explanation:
Asserts are used during debugging to make sure that certain conditions are satisfied. If assertion fails, the program will terminate reporting the same. After debugging use,#undef NDEBUG and this will disable all the assertions from the source code. Assertion is a good debugging tool to make use of..
Question:
int i,j;
for(i=0;i<=10;i++)
{
j+=5;
assert(i<5);
}
Language:
Answer:
Runtime error: Abnormal program termination. assert failed (i<5).