Sunday, 29 April 2012

Program Of Shift Operators In C++

#include<iostream.h>
#include<conio.h>
main()
{
clrscr();
int a,b,c;
a=10;
b=a>>3;          // >> Shift Left
c=a<<3;           // << Shift Right
cout<<" a>>3="<< b;
cout<<"\n  a<<3="<< c;

getch();
}

No comments:

Post a Comment