Category: C++

Size of Structures

In this programming tutorial we will see that 2 structures with the same elements but with different arrange of elements make a different size of structure. Look at these structures:struct st1{    bool b1;    int i1;    char c1;    bool b2;    int i2;}; struct st2{    bool b1;    bool b2;    char c1;    int i1;    int i2;}; st1 works the same as st2 in C/C++, but the size of these structures isdifferent, because of the size of the data packing. Look […]

Palindrome Detector using C++

The palindrome detector application will first clean and analyze a string and then inform you whether or not it is a palindrome. This is probably one of the strangest applications I built because the requirements forced me to not make use of any header files except iostream. Thus, instead of using a string object to manipulate the palindrome, […]

Back To Top