Online Coding Test (1.5hour): Lang: C/C++
--------------------------------------------------------------------------------------------------------------
Problem 1: Given a singly linked list of integer values. You must remove all the values greater than a given integer N, maintaining the integrity and order of the list. From this function you need to return a pointer to head of the updated list.
Problem 2: Given an array of integer.Your task is to find number of duplicate elements. Duplicate is defined as two or more identical elements. For example in the array [1,2,2,3,3,3], the two twos are one duplicate and so are three threes. The number of duplicate is 2.
Problem 3: Write a function to add two floating point numbers. Determine the integer floor of the sum. The floor is the trunked float value, i.e. anything after the decimal point is dropped. For instance, floor(1.1 + 3.05) = floor(4.15)=4.
Problem 4: Find no of "distinct" pairs in an array whose sum is equal to a given number.
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
1st Technical Round (around 2 hours)
----------------------------------------------------------------------------------------------
OS Based Questions:
1. What is operating system?
2. What services a Operating System provides?
3. What are different scheduling algorithms?
4. What are synchronization techniques?
5. Difference between Mutex and Semaphores?
6. What is Deadlock?
7. What is fragmentation in OS?
8. What are pages in memory management?
9. What is Interrupt?
10. Given three processes A,B,C with 1,2,3 priority values respectively. Which one will run first and what will happen if a new process of higher priority is added after?
Q. How cache memory works?
Q. A few questions about embedded protocols.
Q. In detail discussion about some Linux tools.
C and OOPS based Questions:
1. What are Storage Classes and their use?
2. What is Polymorphism?
3. Write a program to Remove elements from a Linked List.
4. Write a program to arrange elements of a doubly linked list such that updated LL have data of even indexes at the beginning followed by data of odd indexes. I.e. Given Linked List: {A → B → C→ D→ E→ F….}, the output should be {A-->C-->E-->B-->D-->F….}.
--------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------
2nd Technical Round (around 2 hours)
--------------------------------------------------------------------------------------------------------
1. Write a program to find if a linked list is circular or not.
2. What is function pointer. What is the data type of function pointer? How to define it in C?
3. Given two binary numbers A and B. Write a program to find how many binary bits of ‘A’ needs to be flipped in order to get number ‘B’.
4. Write a program to find no. of ‘1’s in binary representation of a number?
5. What is ‘virtual’ keyword used for?
6. What is ‘static’ keyword in C?
7. What is the need of synchronizing mechanism such as Semaphore and Mutex? And why do we need OS support for implementing these two.
8. Given a singly linked list. You don’t have reference to head pointer. Given a node address that needs to be deleted from LL. Write a program to implement the same.
9. Write a strMove() function in C. Given the prototype of function as “void strMove(char* sourceAdd,char* destinationAdd);” how will you implement cases where overlapping is happening.
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
3rd Technical Round (around 2 Hours)
----------------------------------------------------------------------------------------------------
1. In which projects did you used C programming?
2. About College? (since my college was unknown to them)
3. About family background?
4. About my accomplishments.
5. Discussion about various training I attended.
6. Different subjects that I studied during my 4 years at college ?
7. They explained about kind of projects their teams are doing at Qualcomm. And asked if I am interested in them?
8. They asked about other offers I already have.
9. What are your future plans?
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------