Technologist Trainee Interview Questions

4,798 technologist trainee interview questions shared by candidates

I hope this may be helpful for further process: I am listing down the questions which he asked me: 1. Implement class which contains a private char array and Copy constructor, move constructor, assignment operator, move assignment operator and parameterize constructor     I won't be able to complete the first task. I only implemented a single constructor and move.   2. Do you know DSA then i said yes you may ask then Do you know Multithreading  I said yes you may ask any question 3. There are two threads, how will you do synchronization?   I implemented code and added a synchronization logic which will work 100%, then he asked a few questions     a) What is the critical section for two threads?         I said whatever is shared between threads everything is critical and the region which covers this is always a critical section. But I feel somehow he has confused with the critical section and asking multiple questions. Why I use a mutex to protect the data? Are you creating a critical section with mutex? But it's obvious that if I am using mutex then the section is critical only and I am not creating that.    b) I said you can use lock_guard but I think he is not aware of that. I told it's similar to mutex but it releases the lock automatically.    c)  He gave me the below function and asked me to put synchronization logic.       void display()       {          //lock_guard<mutex> l(m);          cout << abc; // abc is global somewhere        }        I said synchronization won't work here and there is no logic to put the code because single line instruction will not produce any race condition then he forcefully told me to put the logic so i added a lock_guard. 4. A source code to print the global variable     a) what will print        I said 5.    b) how will you print the globally declared value       I said there are multiple ways to do that he asked me how. I said just use the curly braces and cover the {int value = 5} it will print the global value. then i don't know what happens to him, without waiting he put a scope resolution operator and asked me what will print then I said the global value then he said ok. #include <iostream.h> // Written by Interviewer. He thought and wrote this. I think he forgot the iostream header. int value = 10; int main () {    int value = 5;    court << value;  } Finished the interview...
avatar

Technologist I

Interviewed at Philips

3.8
Sep 1, 2020

I hope this may be helpful for further process: I am listing down the questions which he asked me: 1. Implement class which contains a private char array and Copy constructor, move constructor, assignment operator, move assignment operator and parameterize constructor     I won't be able to complete the first task. I only implemented a single constructor and move.   2. Do you know DSA then i said yes you may ask then Do you know Multithreading  I said yes you may ask any question 3. There are two threads, how will you do synchronization?   I implemented code and added a synchronization logic which will work 100%, then he asked a few questions     a) What is the critical section for two threads?         I said whatever is shared between threads everything is critical and the region which covers this is always a critical section. But I feel somehow he has confused with the critical section and asking multiple questions. Why I use a mutex to protect the data? Are you creating a critical section with mutex? But it's obvious that if I am using mutex then the section is critical only and I am not creating that.    b) I said you can use lock_guard but I think he is not aware of that. I told it's similar to mutex but it releases the lock automatically.    c)  He gave me the below function and asked me to put synchronization logic.       void display()       {          //lock_guard<mutex> l(m);          cout << abc; // abc is global somewhere        }        I said synchronization won't work here and there is no logic to put the code because single line instruction will not produce any race condition then he forcefully told me to put the logic so i added a lock_guard. 4. A source code to print the global variable     a) what will print        I said 5.    b) how will you print the globally declared value       I said there are multiple ways to do that he asked me how. I said just use the curly braces and cover the {int value = 5} it will print the global value. then i don't know what happens to him, without waiting he put a scope resolution operator and asked me what will print then I said the global value then he said ok. #include <iostream.h> // Written by Interviewer. He thought and wrote this. I think he forgot the iostream header. int value = 10; int main () {    int value = 5;    court << value;  } Finished the interview...

Viewing 501 - 510 interview questions

Glassdoor has 4,798 interview questions and reports from Technologist trainee interviews. Prepare for your interview. Get hired. Love your job.