lundi 5 décembre 2016

Why is the output of following is what is it in c++? I am unable to understand it

unsigned u = 10;
int i  = -42;
std::cout<<u+i<<std::endl; 

for a 32 bit integer it prints 4294967264 But I am not able to understand it how it works.

Aucun commentaire:

Enregistrer un commentaire