c++

Mastering declarations in C - Part 1

This blog post is adapted from Expert C Programming - Deep C Secrets by Peter Van Der Linden If you've written C programs before you're already familiar with declarations

Playing With Bits in C

Let's say you have been tasked with rewriting the file API of C and so far you are nailing it! You've created a struct named file that contains all

What Exactly does ++a + ++a do in C?

This question was (and still is) one of the most favourite question of our professors - int a = 5; int b = ++a + ++a; /* What will be the value of a? */ And its variants

C++ is Not a Superset of C

You might have heard this phrase by your professors a lot - "C++ is a superset of C. Anything that works in C, works in C++." If you are in India,

Understanding C++ Casts

C++, being a strongly typed language, is strict with its types. And there are always cases when you need to convert one type into another, which is known as casting. Sometimes, the casting