J'ai postulé via une agence de recrutement. J'ai passé un entretien chez Amadeus (Londres, Angleterre)
Entretien
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 d'entretien [5]
Question 1
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
2.
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
3. 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
4. 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) ;
5. 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
6. 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
7. 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;
}
8. 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
9. 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
10. 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
11. 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
12. 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
13. 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
14. 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; };
15. 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
16. Consider the following code:
struct A
{
int i;
};
class B
{
int j;
}
a. A::i is publicly accessible
b. B:i is publicly accessible
c. both the above are true
d. Neither the above are true
17. 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
18. 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
19. 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) ;
20. 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
First round was a coding OA, then I gave a quantitative aptitude test, then I attended an interview where they asked two coding questions and a lot of behavioural questions, this was an on campus process.
It was good with 3 round of interview. Solid questions of c++ and technical aspect. Questions was about critical thinking and details of c++. My prior experience was not mentioned at all.
J'ai postulé via un établissement d'enseignement supérieur ou universitaire. Le processus a pris 2 jours. J'ai passé un entretien chez Amadeus (Vellore) en août 2024
Entretien
The process was an on-campus recruitment drive for freshers. It has 2 online rounds, the 1st was a technical MCQ and DSA round. It has around 35 technical MCQs from various topics like Java, DBMS, OS, CN, Cloud, Ruby, R, Swift, Golang and 2 DSA easy questions.
The next online round was based on a shortlist from the above round and had only English aptitudes like passages, grammar and synonyms, antonym and a section of maths (mostly data interpretation).
The final was an HR plus technical interview and questions were based on the resume and core topics with a discussion and problem-solving of a few easy to medium-level DSA questions. Make sure to solve some puzzles from GFG as they also asked for puzzles and only selected applicants who could solve them.
Questions d'entretien [1]
Question 1
Which sorting algorithm is the fastest in term of TC ?