C++ Write First Program

Earlier you learned about C++ program structure. In this article, you will learn to write about your first C++ program and program elements in detail.The meat of the C++ is in main function, and before main we need to declare the header files.Simple C++ ProgramLet us consider an example program and then we discuss the … Read more

C++ Unary Operators

The unary operators take a single argument in C++ language. Some of the operators you have already seen in previous articles are unary operators.Here is the list of unary operators. Unary Operators Description * Dereference operator & Address Of operator – Minus sign ! Not  operator ~ Complement ++ Increment operator — Decrement operator type … Read more

C++ Bitwise Operators

Most high-level language does not allow a bitwise operation because it is a machine level task. The bit is manipulated in memory to get the desired results using bitwise operators.The list of bitwise operators are as follows Bitwise Operators Description & Bitwise AND | Bitwise OR ^ Bitwise XOR << Bitwise left shift >> Bitwise … Read more

C++ Equality Operators

In C++ programs sometimes we need to check for equality of two variables or two expressions. The result of which is a boolean value such as true or false. The equality operators help us compare two numbers or expressions.This will change the flow of the program in different directions. There are two equality operators: Equality … Read more

C++ Relational Operators

The C++ relational operators used to compare two numbers and check which one is larger or smaller than the other. The result is a boolean value – true or false.There are four relational operators listed here. Relational Operator Description < Less than > Greater than <= Less than or equal to >= Greater than or … Read more

C++ Identifiers

C++ identifiers are names that identify program elements such as variables using alphabets, numbers, and underscore.Here is the list of characters for: Alphabets: Numbers: Underscore: Any other character from your keyboard that does not fall under the above category is called a special character. The uppercase and lowercase are distinct characters. They have different numeric … Read more

C++ Logical Operators

The C++ needs logical operators to control the flow of the program. The expressions involving logical operators evaluate to boolean value – true or false. Then the program makes decisions based on the outcome.There are three types of logical operators. Logical Operators Description && Logical AND || Logical OR ! Not Note that there is … Read more

C++ Assignment Operators

The assignment operators assign new values to the variable. The variable may already be holding a value ,but the assignment will change the current value to a new one.It can appear anywhere within an expression, with the sole purpose of assigning the right-hand-side (RHS) value to the left-hand-side (LHS) value.Here is the list of valid … Read more

C++ Arithmetic Operators

Arithmetic operators carry basic arithmetic operations in a C++ program. These operators are used in simple mathematical expressions. They are also known as binary operators because each operator requires at least two operands.Here is a list of arithmetic operators. Arithmetic Operators Description + Addition – Subtraction * Multiplication / Division % Modulo The operators plus … Read more

C++ Operator Classification

The C++ programming language offers different types of operators. These operators are used in expressions that evaluate to a single value. Sometimes the operator is used in decision making that changes the flow of the program.Here is the diagram that classifies C++ operators into different categories.Arithmetic Operators Operator Description + Addition operation – Subtraction operation … Read more

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Exit mobile version