Amazon written test
1 Answer
Amazon written test
| Flag | PURGE
What will be the output of the following C++ program ?
#include <iostream>
class A {
int x;
int y;
int z;
public:
A() : x(5), y(10), z(15) {}
A (A const & a) {}
int get_x(void) { return x; }
};
int main() {
A a;
A aa(a);
std::cout << aa.get_x() << std::endl;
return 0;
}
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
garbage value
- Shubham November 02, 2014