Question:

What is the output of the program?

#include <iostream>

struct BS
{
  unsigned int color;
};

struct car : public BS
{
};

struct truck : public BS
{
};

struct city : public car, public truck
{
};

int main(int argc, char** argv) 
{ 
  city c;

  c.color = 3;

  std::cout << c.color << std::endl;

  return 0; 
}

Answers:


Keywords:

© 2017 QuizBucket.org