C++

Assertion

The assert macro will terminate the program, often with a message about the assert statement, if its argument are false. #include #include int main(){int x = 10;int y = 2;assert(x==y);} The output of this snipped of code is: Assertion failed!Expression: x==yThis application has requested the Runtime to terminate it in

Find Compilation Time of any Code and Execution Time of any Command

This is C source code written in Gcc platform (Linux, Ubuntu) that finds the compilation time of any other source code (e.g. C, C++, Java & others). It also finds the execution time of any command of Ubuntu in three time units: nanosecond, microsecond and millisecond. Note: If you want

Generation of Equivalent Binary Code of Decimal Digits

This is C source code, written in gcc platform (Ubuntu, 14.04 LTS, Linux). Here is the process for generating the Equivalent Binary Code of a decimal digit. First, a palindrome number is being generated. If we Push n elements in the stack, it generates a palindrome number of length (2^n)