Multiply any Number with 4 using Bitwise Operator | C ++ program to multiply a number with 4 using Bitwise Operator ; function the return multiply a number with 4 using bitwise operator ; returning a number with multiply with 4 using2 bit shifring right ; derive function
#include <bits/stdc++.h> NEW_LINE using namespace std ; int multiplyWith4 ( int n ) { return ( n << 2 ) ; } int main ( ) { int n = 4 ; cout << multiplyWith4 ( n ) << endl ; return 0 ; }