Difference between sizeof(int *) and sizeof(int) in C/C++
sizeof()...
read more
Cascading of Input/Output Operators in C++
Prerequisite: Operator Overloading in C++, Types of Operator Overloading...
read more
Modulo Operator (%) in C/C++ with Examples
In C or C++, the modulo operator (also known as the modulus operator), denoted by %, is an arithmetic operator. The modulo division operator produces the remainder of an integer division which is also called the modulus of the operation....
read more
A comma operator question
Consider the following C programs....
read more
To find sum of two numbers without using any operator
Write a program to find sum of positive integers without using any operator. Only use of printf() is allowed. No other library function can be used....
read more
Conditional or Ternary Operator (?:) in C
The conditional operator in C is kind of similar to the if-else statement as it follows the same algorithm as of if-else statement but the conditional operator takes less space and helps to write the if-else statements in the shortest way possible. It is also known as the ternary operator in C as it operates on three operands....
read more
Bitwise Complement Operator (~ tilde)
Pre-requisite:Bitwise Operators in C/ C++Bitwise Operators in Java...
read more
Interesting Facts About C Language
C Programming language is a general purpose, case-sensitive, procedural programming language. It is one of the first and few high-level languages that is still popular among the coding community. It was developed by Dennis Ritchie and was first released in 1972....
read more
Bitwise Operators in C
In C, the following 6 operators are bitwise operators (also known as bit operators as they work at the bit-level). They are used to perform bitwise operations in C....
read more
Result of comma operator as l-value in C and C++
Using the result of the comma operator as l-value is not valid in C. But in C++, the result of the comma operator can be used as l-value if the right operand of the comma operator is l-value. For example, if we compile the following program as a C++ program, then it works and prints b = 30. And if we compile the same program as a C program, then it gives a warning/error in the compilation (Warning in Dev C++ and error in Code Blocks)....
read more
Order of operands for logical operators
The order of operands of logical operators &&, || are important in C/C++....
read more
Logical Not ! operator in C with Examples
! is a type of Logical Operator and is read as “NOT” or “Logical NOT“. This operator is used to perform “logical NOT” operation, i.e. the function similar to Inverter gate in digital electronics....
read more