Implementing ternary operator without any conditional statement
How to implement ternary operator in C++ without using conditional statements. In the following condition : a ? b : c If a is true,… Read More » The post Implementing ternary operator without any...
View Article# and ## Operators in C
Stringizing operator (#) This operator causes the corresponding actual argument to be enclosed in double quotation marks. The # operator, which is generally called the… Read More » The post # and ##...
View Articlearray::operator[ ] in C++ STL
Array classes are generally more efficient, light-weight and reliable than C-style arrays. The introduction of array class from C++11 has offered a better alternative for… Read More » The post...
View ArticleLeft Shift and Right Shift Operators in C/C++
<< (left shift) Takes two numbers, left shifts the bits of the first operand, the second operand decides the number of places to shift. Output:… Read More » The post Left Shift and Right Shift...
View Articledelete() in C++
Delete is an operator that is used to destroy array and non-array(pointer) objects which are created by new expression. Delete can be used by either… Read More » The post delete() in C++ appeared first...
View ArticlePre-increment and Post-increment in C/C++
Pre-increment operator: A pre-increment operator is used to increment the value of a variable before using it in a expression. In the Pre-Increment, value is… Read More » The post Pre-increment and...
View ArticleAddition of two number using ‘-‘ operator
The task is to Add two number using ‘-‘ operator. Examples: Input : 2 3 Output : 5 Input : 10 20 Output : 30… Read More » The post Addition of two number using ‘-‘ operator appeared first on...
View ArticleC++ program to find the type of the given iterator
Given a program that uses an iterator, the task is to find the type of iterator used. Examples: Input : vector.begin() Output : Random_Access Iterator… Read More » The post C++ program to find the type...
View ArticleC++ | Nested Ternary Operator
Ternary operator also known as conditional operator uses three operands to perform operation. Syntax : op1 ? op2 : op3; Nested Ternary operator: Ternary operator… Read More » The post C++ | Nested...
View ArticleTypes of Operator Overloading in C++
Operator Overloading: C++ provides a special function to change the current functionality of some operators within its class which is often called as operator overloading.… Read More » The post Types...
View ArticleAssignment Operators in C/C++
Assignment operators are used to assign value to a variable. The left side operand of the assignment operator is a variable and right side operand… Read More » The post Assignment Operators in C/C++...
View Article