In this lesson, we will learn about the various relational and logical operators in c++ and how they are used in forming expressions. One thing common to both these operators is that they evaluate to either a true or a false value. A true value is denoted by 1 and a false value is denoted by 0 in C++.
1. Relational Operators
Let’s begin with relational operators. They are used to determine the relation...

So far we have gone through the following operators in C++:
Arithmetic Operators
Increment and Decrement Operators
Relational Operators
Logical Operators
Conditional Operator
Assignment Operators
Now let’s first understand what is meant by an expression. An expression is a sequence consisting of variables, constants and operators which specify a computation. That is, an expression can be evaluated to...

This lesson focuses on expressions consisting of mixed data types. The C++ compiler has a way to deal with expressions that contains variables or constants which have different data types. So if we have two different types of variables/constants in an expression, they can be converted to one single type (either by the compiler or explicitly by the programmer). This process is known as type conversion in C++.
For...

There is a special operator called conditional operator in C++ programming language, denoted by ?: symbol. It is way different from the other operators in C++ programming language and provides a convenient way to take an action depending on the truth or falsity of a condition.
Lets see how this operator works.
First thing we need to know is that condition operator is a ternary operator. This means it takes...

Previously we had seen the various arithmetic operators in C++. Now let us have a look at two new operators called the increment (++) and decrement (- -) operators.
Both these operators are unary operators. That means they work only on one operand.
They can be used in two ways :
1. Prefix form
2. Postfix form
Let us see each of these operators in both the forms stated above.
1. INCREMENT OPERATOR (++)
The increment...

Now that we know the various data types used in C++ language, let us see how we can modify these data types to provide more versatility to our code.
We have the following four data type modifiers in C++ :
signed
unsigned
long
short
First let us discuss some imporant points about these modifiers.
If we use ‘signed’ before a variable declaration, it means that the variable can hold both positive...

Spamming is a common issue with online web-based applications these days. Especially in those applications and websites which are open to the public, it is hard to find and fight spam. Even big websites such as GitHub have been suffering from such issues.
Hence, it is mandatory to use some form of mechanism to avoid and fight spam in an automated manner. The globally accepted mechanism to fight spamming is CAPTCHA...

String and StringBuilder are yet another concept in C# which often goes neglected. Everytime a programmer has to save some string into a variable, they simply declare a string in their program and use it. But in the long term and in big projects, it often leads to high memory consumption. In this article, we will explain why this happen and how to avoid it using StringBuilder.
The difference between string and...

C++ programming language provides us with various types of operators for performing different tasks. One such class of operators is arithmetic operators.
These are used for performing arithmetic calculations in a program.
Following is a list of the C++ arithmetic operators:
Addition operator: ‘ + ‘
Subtraction operator: ‘ – ‘
Multiplication Operator: ‘ * ‘
Division...

A variable is an entity whose value can vary in a program. But sometimes, we need to fix the value of a variable for some purpose.
For example, to calculate the area of a circle, we can store the value of PI which is 3.14 in a variable. However we need to make sure that this value is not altered in the program otherwise we may get wrong results.
So to fix the value of a variable, we use the keyword const before...