Got interviewed for a development position in C++, not from Amadeus directly but from a secondary company. The first interview was held on the phone, then details were sent to my email.
I had to sustain a thought test in less than 30 minutes for advancing in the process, but didn't get a minimum score -- annoying that they don't tell that right away...
See below some stock questions...
a. X can define the member function operator Y() b. a) or b) can be used c. Y can define the constructor Y(const X&) d. none of the above
class Coordinate{ int x; int y;
public:
Coordinate(int a=0, int b=0)
{
x=a;
y=b;
};
};
What are the values for the following object: Coordinate point(10);
a. x=10,y=0 b. x=0,y=10 c. x=10,y=10 d. x=0,y=0
Void foo();
a. any number or type of arguments b. a character c. an integer d. no an integer argument of any type
Which of the following declarations cannot follow in the same header:
a. void doit(int, char *); b. int doit(int) ; c. float doit(char *) ; d. int doit(int, int) ;
// suitable #includes class A { public: void name() const { std::cout << "A::name" << std::endl;} virtual ~A() {} }; class B : public virtual A { public: void name() const { std::cout << "B::name" << std::endl;} };
int main(int, char *[]) { const A *x = new B; x->name(); return 0; }
a. A::name b. B::name c. A::name B::name d. none of the above
Data *p = new Data[10]; delete p;
a. destructs all 10 elements in the array pointed at by p, and releases all the memory b. destructs just the element pointed at by p, and releases all the memory c. it compiles, but the run-time behaviour is not well defined d. it fails to compile
Data& operator=(const Data &that)
a. { if (this != &that) { ... copy data ... } return this; }
b. { if (*this != that) { ... copy data ... } return *this; }
c. { if (this != that) { ... copy data ... } return this; }
d. { if (this != &that) { ... copy data ... } return *this; }
unsigned int bmf = 48; cout << (bmf == 38) ?15 : 10);
a. 15 b. 10 c. 1 d. 0
#include <iostream.h>
class Base{ protected: int a; public: void seta(int x) { a = x;}; void printa(void) {cout << a; }; };
class SecondClass : public Base { public: int b; };
void main (void) { Secondclass tmp; tmp.seta(12); tmp.printa(); }
Which of the following is true?
a. SecondClass.a is public b. SecondClass.a is private c. SecondClass.a is protected d. SecondClass.a is not accessible
a. copy constructor b. assignment operator c. both of the above d. both of the above and also the default constructor
a. accessible only by the compiler b. accessible only by the members of its own class c. accessible only by the members of its own class and classes inherited from it d. accessible by anything in the same scope as the class
int i; for (int i = 0; i < 4; ++ i); std::cout << i << std::endl;
a. 0 b. 3 c. 4 d. undefined
// suitable #includes class Text { public: Text(const std::string &text) : data(new char[text.size() + 1000]) { std::copy(text.begin(), text.end(), data); } ~Text() { delete [] data; } void print() const { std::cout << data << std::endl; } private: char *data; };
int main(int, char *[]) { Text outer("hello"); { const Text inner("world"); outer = inner; } outer.print(); return 0; }
a. prints "hello" b. prints "world", but there is a buffer overflow in the constructor c. prints "world", no problems anywhere d. none of the above
a. extern bool operator==(const Value &lhs, const Value &rhs); b. class Value { public: bool operator==(const Value &other); }; c. class Value { public: bool operator==(const Value *other); }; d. class Value { public: bool operator==(const Value &other) const; };
C c1 = c2;
What method is called?
a. Assignment operator b. Copy constructor c. Both d. None of the above
struct A { int i; };
class B { int j; }
a. A::i is publicly accessible b. B is publicly accessible c. both the above are true d. Neither the above are true
friend class Queue;
What does it give?
a. an instance of Queue the ability to construct a Node object b. an instance of Node the ability to construct a Queue object c. Queue member functions unrestricted access to private members of Node d. Node member functions unrestricted access to private members of Queue
#include <iostream.h>
int main(void) { int p[2] = {2,4}; (*p)++ ; cout << "Output : " << p[0] << endl; return 0; }
What will be the output?
a. output = 2 b. output = 3 c. output = 4 d. The program won't compile due to syntax error
int symmetricTrans(int x, const char c); float symmetricTrans(const char x, float f) ;
Which of the following correctly declares and initialises function pointers the overloaded function:
a. void *fp1 = symmetricTrans(int, const, char); void *fp2 = symmetricTrans(const char, float) ;
b. void *fp1 = &symmetricTrans ; void *fp2 = &symmetricTrans ;
c. int (*fp1)(int, const char) = &symmetricTrans ; float (*fp2)(const char, float) = &symmetricTrans ;
d. int (*fp1) = &symmetricTrans(int, const char) ; float (*fp2) = &symmetricTrans(const char, float) ;
a. the default constructor and default destructor b. the default constructor, copy constructor and assignment operator c. the default constructor, copy constructor and destructor d. all of the above
The following metrics were computed from 3 interview experiences for the Amadeus Software Development Engineer role in London, United Kingdom.
Amadeus's interview process for their Software Development Engineer roles in London, United Kingdom is fairly selective, failing a large portion of engineers who go through it.
Candidates reported having mixed feelings for Amadeus's Software Development Engineer interview process in London, United Kingdom.