Tag Archives: Article

10 cool bitwise operator hacks and tricks every programmer must know

Bitwise operators are used to manipulate data at its lowest level (bit level). Data in memory (RAM) is organized as a sequence of bytes. Each byte is a group of eight consecutive bits. We use bitwise operators whenever we need to manipulate bits directly. In this post I will show you some cool bitwise operator hacks and tricks. These hacks will boost your programming skill.

Continue reading 10 cool bitwise operator hacks and tricks every programmer must know

If…else…if vs switch…case, difference and usage?

if...else...if and switch...case both programming constructs has ability to take decision based on conditions. Both are almost similar in nature. However, there is always a debate among beginners which to use and when to use what?

In this post, I will compare both on various grounds. So let us begin.

Continue reading If…else…if vs switch…case, difference and usage?

Various declarations of main() function in C

main() is a special function in C programming language. Reasons that make it special are -

  • It defines starting point of the program.
  • main is the first executed function.
  • It controls all other child functions.
  • Behaves as both user-defined and pre-defined function.
  • Every software written in C must have a main function.

C is a popular programming language. There exist many compilers and standards for C. So exists many variants of main function declaration. In this post we will learn various declarations of main one by one. Later we will see the standard definition of the main function in C.

Continue reading Various declarations of main() function in C