Verizon SDE 2 Embedded Software Developer Interview Experience
Round 1: Technical Interview 1 hour
Brief Introduction:I started with a brief introduction about my background, experience, and projects I have worked on.
Technical Questions:
What is a pointer? Why do we use pointers?
How is memory allocated statically in the stack and dynamically in the heap?
What is the size of a pointer in a 64-bit architecture?
Answer: 8 bytes
What will be the output of this snippet?
char* a;
void* b;
cout << sizeof(a) << " " << sizeof(b) << endl;
Output: 8 8
Write a program to reverse the digits in a number.
What is a thread?
What is a mutex?
How do you declare a pointer to a function?
What are unique pointers and shared pointers?
Create an array pointer of size 100 using a unique pointer.
std::unique_ptr<int[]> arr = std::make_unique<int[]>(100);
What is a reference?
What is the auto keyword?
What is an interface?
What is lambda capture?
Do arithmetic operations happen on a void pointer?
Answer: No
Have you led any part of your team?
The interviewer mainly wanted to assess my leadership skills.
Be ready to write code of above asked questions.
Round 2: Technical + Behavioral Interview
Discussion on Projects:
The interviewer asked in-depth questions regarding my past projects and the technologies used.
Coding Questions:
Delete a node from the middle, head, and tail of a linked list.
Implement the KMP algorithm for string pattern matching.(Brute, Better with Time& Space Complexity)
Scenario-Based Questions:
Create a char array of size 200 in both C and C++ (static and dynamic allocation).
char arr[200]; // Static allocation in C
char* arr = (char*)malloc(200 * sizeof(char)); // Dynamic allocation in C
char arr[200]; // Static allocation in C++
char* arr = new char[200]; // Dynamic allocation in C++
Why do we use delete[] for arrays, but free(ch) in C? Does delete internally use free?
delete[] is used for dynamically allocated arrays in C++ because it ensures the proper destructor calls, whereas free() in C is a simple memory deallocation function.
Yes, delete internally calls free() after invoking destructors.
If two threads t1 and t2 are running, and your manager asks you to pass data from t1 to t2, how will you do it?
Using shared variables, std::promise, and std::future.
What happens if your system crashes? What could be the possible reasons? How can you avoid it?
Possible reasons: Buffer overflow, dangling pointers, memory leaks.
Avoidance strategies: Proper memory management, smart pointers, bounds checking, and debugging tools.
Final Question:
The interviewer asked if I had any questions for them.
Round 3 HR
Behavioual Questions
Discussion of Salary Roles and Responsiblity.
Overall, the interview covered C++, Problem Solving memory management, threading, and leadership skills. The experience was engaging and required a solid understanding of system programming and problem-solving.