Financial Software Developer Interview Questions

679 financial software developer interview questions shared by candidates

read the following code and tell me the output, and is there anything wrong about it? #include <iostream> class A { public: A() { foo(); } virtual void foo(int a = 10) { std::cout << "A = " << a << std::endl; } }; class B : public A { public: B() { foo(); } virtual void foo(int b = 20) { std::cout << "B = " << b << std::endl; } }; int main() { A* aPtr = new B(); aPtr->foo(); delete aPtr; return 0; }
avatar

Financial Software Developer

Interviewed at Bloomberg

4
Jul 2, 2015

read the following code and tell me the output, and is there anything wrong about it? #include <iostream> class A { public: A() { foo(); } virtual void foo(int a = 10) { std::cout << "A = " << a << std::endl; } }; class B : public A { public: B() { foo(); } virtual void foo(int b = 20) { std::cout << "B = " << b << std::endl; } }; int main() { A* aPtr = new B(); aPtr->foo(); delete aPtr; return 0; }

Viewing 161 - 170 interview questions

Glassdoor has 679 interview questions and reports from Financial software developer interviews. Prepare for your interview. Get hired. Love your job.