1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <iostream> using namespace std; void foo(int a) { std::cout << a << std::endl; } int main() { unsigned i = 20; std::cout << -i << std::endl; foo(-i); return 0; }
1 2
4294967276 -20