fork(1) download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. unsigned int a=10;
  6.  
  7. printf("%x\n", a) ;
  8. a=~a;
  9. bitset <32> x ;
  10. x=a;
  11. cout<<x.to_string();
  12. printf("\n%x\n", a) ;
  13. printf("%d\n", a) ;
  14. printf("%u\n", a) ;
  15.  
  16.  
  17.  
  18.  
  19. a=0;
  20. printf("%x\n", a) ;
  21. a=~a;
  22. bitset <32> x ;
  23. x=a;
  24. cout<<x.to_string();
  25. printf("\n%x\n", a) ;
  26. printf("%d\n", a) ;
  27. printf("%u\n", a) ;
  28. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:22:13: error: redeclaration of ‘std::bitset<32ul> x’
 bitset <32> x ;
             ^
prog.cpp:9:13: note: ‘std::bitset<32ul> x’ previously declared here
 bitset <32> x ;
             ^
stdout
Standard output is empty