What is the output of this piece of code?

Advertisement

int8_t a=200;
uint8_t b=100;
if(a>b)
std::cout<<“greater”;
else
std::cout<<“less”;

  • There is no output because there is an exception when comparing an int8_t with a uint8_t.
  • greater
  • less
  • There is no output because there is a compiler error.
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend