Contact Learn C
Copy

Program 346 : Addition and Multiplication by 2 using Bitwise Operations

Program 346 : Addition and Multiplication by 2 using Bitwise Operations
 
#include<stdio.h>
main()
{
 int a;
 printf("Enter a\n");
 scanf("%d",&a);

 printf("%d*2=%d \n",a,a<<1);
 printf("%d/2=%d \n",a,a>>1);
 
}
Explanation:
//Coming Soon

Output: 






 
Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide