mardi 3 novembre 2015

Suffix U at the end of value

Trying to figure out why is if statement false

int a,b,c;
a=-15;
b=34;
c=(a++<115U) ? ++b << 1: b-->>2;

printf("%d",c); 

Output is : 8

My question is:

  1. Why is (a++<115U) false ? the way i see it is -15<115U should be true

  2. What does this suffix U mean ? 115U

I know that we use U for unsigned int, but can someone explain me what this U represent here ?

Aucun commentaire:

Enregistrer un commentaire