Program to shift inputted data by three bits to the left.

इस प्रोग्राम में हम सीखेंगे कि किस प्रकार C प्रोग्रामिंग में left shift (<<) ऑपरेटर का प्रयोग करके इनपुट किये गये डाटा को 3 विट लेफ्ट शिफ्ट कर सकते है इसके लिए हम यूजर से कोई नंबर इनपुट करा लेगे और left shift (<<) ऑपरेटर का उपयोग करके रिजल्ट प्राप्त कर लेंगे |

#include<stdio.h>
#include<conio.h>
void main()
{
  int x,y;
  clrscr();
  printf("Read the integer from keyboard :- ");
  scanf("%d",&x);
  x<<=3;
  y=x;
  printf("\nThe left shifted data is = %d ",y);
  getch();
}

Output:
Read the integer from keyboard :- 5
The left shifted data is = 40


error: Content is protected !!