Skip to content

Tag Archives: cpp-operator

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
How to implement ternary operator in C++ without using conditional statements.In the following condition: a ? b: c If a is true, b will be executed. Otherwise,… Read More
Relational operators vs std::string::compare() Return Value: Relational operators return boolean value, while compare() returns unsigned integer. Parameters : Relational operators need only two strings to… Read More
Unary operators: are operators that act upon a single operand to produce a new value. Types of unary operators: unary minus(-) increment(++) decrement(- -) NOT(!)… Read More
Consider the following statement in C and predict its output. printf("%d %d %d", i, ++i, i++); This statement invokes undefined behavior by referencing both ‘i’… Read More
Given three integers a, b and c where c can be either 0 or 1. Without using any arithmetic, relational and conditional operators set the… Read More
In C++, we use sizeof() operator to find the size of desired data type, variables, and constants. It is a compile-time execution operator. We can… Read More
Scope resolution operator is for accessing static or class members and this pointer is for accessing object members when there is a local variable with… Read More
We have discussed Introduction to Operators in C where we got an overall idea of what types of Operators, C and C++ support, and its… Read More
Operators are the foundation of any programming language. Thus the functionality of C language is incomplete without the use of operators. Operators allow us to… Read More
  Sizeof is a much used operator in the C or C++. It is a compile time unary operator which can be used to compute… Read More
A Bitwise And operator is represented as ‘&’ and a logical operator is represented as ‘&&’. The following are some basic differences between the two… Read More
Predict the output of following program: Can % be used with floating point numbers in C++? #include <iostream> int main() {     float f = 9.9f,… Read More
In C, the following 6 operators are bitwise operators (work at bit-level)   The & (bitwise AND) in C or C++ takes two numbers as operands… Read More
Operator precedence determines which operation is performed first in an expression with more than one operators with different precedence.For example: Solve   10 + 20 *… Read More

Start Your Coding Journey Now!