Here I am trying to convert h = 010 to h = 001 (via right shift operator) and then using the 'and' operator with 1, I wanna print yes, but I don't know why it is printing NO.
int h = 010;
h = h>>1;
if(h & 1){
cout<< "YES";
}
else{
cout << "NO";
}