Simulating try-catch block in C

Using try-catch blocks in any programming language provides a way to handle errors and deal with them in an elegant manner. Not only the code looks beautiful, it is also easy to write and comprehend. try-catch blocks are an integral part of

useful do while(0) trick

This article is about an useful programming trick to avoid writing clumsy and highly nested if-else conditions. The perfect example of this could be - "error handling code". Let me present you with a clumsy error - handling code which