Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Bit Magic Bit Magic

Smallest of three integers without comparison operators

Write a program to find the smallest of three integers, without using any of the comparison operators. Let 3 input numbers be x, y and z. Method 1 (Repeated Subtract...
Bit Magic C cpp-operator

What are the differences between bitwise and logical AND operators in C/C++?

A Bitwise And operator is represented as ‘&’ and a logical operator is represented as ‘&&’. Following are some basic differen...
Bit Magic C C++

Bitwise Operators in C/C++

In C, following 6 operators are bitwise operators (work at bit-level) & (bitwise AND) Takes two numbers as operands and does AND on every bit of two numbers. ...
Divide and Conquer Mathematical Mathematical

Write you own Power without using multiplication(*) and division(/) operators

Method 1 (Using Nested Loops) We can calculate power by using repeated addition. For example to calculate 5^6. 1) First 5 times add 5, we get 25. (5^2) 2) Then 5 ti...
Mathematical Chalk Studio Modular Arithmetic

Program to find remainder without using modulo or % operator

Given two numbers ‘num’ and ‘divisor’, find remainder when ‘num’ is divided by ‘divisor’. The use of modulo o...
Mathematical base-conversion Mathematical

Decimal to binary conversion without using arithmetic operators

Find the binary equivalent of the given non-negative number n without using arithmetic operators. Examples: Input : n = 10 Output : 1010 Input : n = 38 Output : 1001...
Mathematical School Programming Mathematical

Implement *, – and / operations using only + arithmetic operator

Given two numbers, perform multiplication, subtraction and division operations on them, using ‘+’ arithmetic operator only. Recommended: Please try you...
Stack Stack

Remove brackets from an algebraic string containing + and – operators

Simplify a given algebraic string of characters, ‘+’, ‘-‘ operators and parentheses. Output the simplified string without parentheses. Exa...

Subscribe to Our Newsletter