What is printed from this code?

Advertisement

There are 2 different answer option(s) of this question, please select the right option(s).

vector<int> v(22);
bool b = (v[6]);
printf(“%d”, !b);

  • False
  • 0
  • 1
  • This code has an error.

or

int i = 0;
printf(“%d”, i++);
printf(“%d”, i–);
printf(“%d”, ++i);
printf(“%d”, –i);

  • 0,1,1,0
  • 0,1,0,1
  • 0,0,1,0
  • 1,0,1,0
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.