#include iostream
#include conio.h
#include stdio.h
#include vector
//as this blogger tool doesnt allow some syntices ,so i consider here you will be doing it urself,we have to include vector header file besides some general i/o libraries...
using namespace std;int main()
{vector
int x =2000;
int collect;
int counter = 8*(sizeof(int));
for( int j=0;j
v.push_back(collect);
x >>= 1;
} for(int i=counter-1;i>=0;i--)
{ cout v[i];//i am not using the complete syntx due to restriction made
//by the blog editor
}
getch();
return 1; }
here i am reading the bit pattern of an int,,,applying little modifications..we can read for other data types too....hope this helped....