Question:

What value gets printed by the program?

#include <iostream>

struct Foo
{
  Foo(int d) : x(d) {}
  int x;
};

int main() 
{ 
  double x = 3.14;

  Foo f( int(x) );

  std::cout << f.x << std::endl;

  return 0;
}

Answers:


Keywords:

© 2017 QuizBucket.org