Wednesday, 28 January 2015

Macros - Features of C Preprocessor

Macros - Features of C Preprocessor

Welcome to Logically Proven Blog.This post teaches you one of the important features of C preprocessor - Macro Expansion.C preprocessor is a special program that processes source program before it is passed to the compiler. The preprocessor commands also known as directives. Each of these preprocessor directives begin

Tuesday, 27 January 2015

C Programming - Common mistakes while using the "if" statement

This post demonstrates common mistakes while using the if statement. The recent IDEs and compilers issues a warning if the code encounters such mistakes. One way to resolve such mistakes is to force the IDEs and compilers to show warnings as errors. This way you can build your

Monday, 26 January 2015

C/C++ programming - Difference between “int main()” and “int main(void)”

C/C++ programming - Difference between “int main()” and “int main(void)”

This post demonstrates the difference between int main() and int main(void) in C/C++. Consider the following two definitions of main() - int main() { /* */ return 0; }   and int main(void) { /* */ return 0; }   What is the difference? In C++, there is

Friday, 23 January 2015

What is 'C'? Why it is important to learn 'C' now-a-days?

What is 'C'? Why it is important to learn 'C' now-a-days?

This post demonstrates why it is important to learn C programming now-a-days before you learn any high-level programming languages (C++, Java, C#...). What is C?   C is a programming language developed by Dennis Ritchie at AT & T's Bell Laboratories of USA in 1972. In the late

Thursday, 22 January 2015

C Programming - Integer to Binary

C Programming - Integer to Binary

Convert an integer to binary irrespective of platform. The size of an integer varies from platform to platform. We assume the size of an integer either 32 bit or 64 bits in an application with respect to the working platform which leads to unexpected output. The ideal solution

Wednesday, 21 January 2015

C Programming - Switch statement - Interesting

C Programming - Switch statement - Interesting

This post demonstrates not well-known features of switch statement in any programming language that makes use of switch-case structure. Switch Statement - When the program encounters the situation to choose a particular statement among many statements, then the programmer decides to choose one block of statement depending on

Tuesday, 20 January 2015

A puzzle and a logic behind - C and C++ programming

A puzzle and a logic behind - C and C++ programming

Hi Friends. Today I am going to ask you the puzzle in 'C' programming. Of course I am going to explain the logic behind the puzzle. I doubt that most of them know the answer or partial answer to the puzzle. But friends it gives me immense pleasure

Monday, 19 January 2015

Swap numbers in a single statement

Swap numbers in a single statement

This post demonstrates how to swap numbers in a single statement without using a temporary variable. For your reference, representing all the forms of how to swap numbers without using a temporary variable. Using addition and subtraction operators - int main() { int a,b; a = 10; b
C Operator Precedence table with Associativity

C Operator Precedence table with Associativity

This post demonstrates the list of operators available and their precedence with associativity in C. What is Operator Precedence?   Operator precedence determines how operators are grouped, when different operators appear close by in one expression. For example, '*' has higher precedence than '+'. Thus, the expression a+b*c
Pages (13)123456

 
biz.