Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
U2
#include <iostream> #include <type_traits> int main() { std::cout << std::is_same<char, signed char>{} << std::endl; std::cout << std::is_same<char, unsigned char>{} << std::endl; std::cout << std::is_same<signed char, unsigned char>{} << std::endl; std::cout << std::endl; signed char sc = -5; std::cout << ((0b10000000 & sc) ? 1 : 0) << std::endl; std::cout << ((0b01000000 & sc) ? 1 : 0) << std::endl; std::cout << ((0b00100000 & sc) ? 1 : 0) << std::endl; std::cout << ((0b00010000 & sc) ? 1 : 0) << std::endl; std::cout << ((0b00001000 & sc) ? 1 : 0) << std::endl; std::cout << ((0b00000100 & sc) ? 1 : 0) << std::endl; std::cout << ((0b00000010 & sc) ? 1 : 0) << std::endl; std::cout << ((0b00000001 & sc) ? 1 : 0) << std::endl; std::cout << std::endl; std::cout << (-128 + 0b1111011) << std::endl; }
run
|
edit
|
history
|
help
0
Code Rush Game Group 1
boost::geometry::distance performance overhead compared to a straightforward implementation
Last Class Quiz - Working with Hash Table
C++ Program to Print Binary
Throttle Example (Send two requests every two seconds)
user defined exception
program_4
Specialization on signed types
template specialization inheritance solution
using directives: qualified lookup rules are different from unqualified lookup rules