Taro Logo

Software Development Engineer Interview Experience - London, United Kingdom

July 19, 2013
Negative ExperienceNo Offer

Process

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...

Questions

  1. How to achieve automatic type conversion from type X to type Y?

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

  1. What type of argument can the following function take :

Void foo();

a. any number or type of arguments b. a character c. an integer d. no an integer argument of any type

  1. Consider the following function declarations in a header file: void doit(char *, int); int doit(char *) ; float doit(float, float) ;

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) ;

  1. What is the output of the snippet below?

// 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

  1. For some class Data, what does the following code snippet do?

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

  1. Which of the following code snippets correctly implements a user-defined assignment operator declared as follows:

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; }

  1. What will be the output of the following:

unsigned int bmf = 48; cout << (bmf == 38) ?15 : 10);

a. 15 b. 10 c. 1 d. 0

  1. Consider the following program

#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

  1. Which of the following should be made private to prevent an object from being copied?

a. copy constructor b. assignment operator c. both of the above d. both of the above and also the default constructor

  1. Members of a class declared as protected are:

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

  1. Given the following code fragment, what output would be generated?

int i; for (int i = 0; i < 4; ++ i); std::cout << i << std::endl;

a. 0 b. 3 c. 4 d. undefined

  1. What is the result of executing the code fragment below?

// 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

  1. For some class Value, which of the following fragments is the preferred way of writing the declaration of the equality operator?

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; };

  1. Consider the following line of code:

C c1 = c2;

What method is called?

a. Assignment operator b. Copy constructor c. Both d. None of the above

  1. Consider the following code:

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

  1. The following line appears in the header file of class Node:

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

  1. Consider the following program

#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

  1. Consider the following program

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) ;

  1. Can you name the special functions a C++ compiler creates implicitly on a class?

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

Was this helpful?

Interview Statistics

The following metrics were computed from 3 interview experiences for the Amadeus Software Development Engineer role in London, United Kingdom.

Success Rate

33%
Pass Rate

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.

Experience Rating

Positive33%
Neutral33%
Negative33%

Candidates reported having mixed feelings for Amadeus's Software Development Engineer interview process in London, United Kingdom.