Sunday, March 10, 2013

Real Interview Questions set 1



C/C++/OS concept


Q1.  Brief me about yourself , skill and experience?
Q2 . Brief me about your experience related work?
Q3 . Why do you want to join Qualcomm?
Q4.  How much do you rate yourself in C,C++ , OS and Multimedia out of 10?
Q5. What are the storage classes? Tell the scope and life of each one?
Q6. What is the difference between static and global variable?
Q7. What is the use of volatile variable ? Give one example.
Q8.  What is the difference between Macro , Inline function and Template? Explain the advantages and disadvantages.
Q9.  Are you aware of RAM , ROM and Cache memory? Brief.
Q10. What is Segmentation fault. what are different segmentation fault?
Q11 . What do you mean by Paging . Why do we need it?
Q12 . What is fragmentation and How can you prevent this?
Q13 . What is virtual memory concept? Why do we need it.
Q14. What is difference between struct in C and C++?
Q15. What is function pointer? When do we use it? Give one example.
Q16. What is the difference between process and thread?
Q17. What is context switching? How does Scheduling happens?
Q18. What is Critical Section? How will you protect it?
Q19. What is difference between Mutex, Semaphore and Binary Semaphore?
Q20. What are different IPC mechanism? Explain each in short.
Q21. What do you mean shared memory among process? How will you implement it.

Q22. What is virtual function. How does pure virtual function different from it.
Q23 What is Abstract Class? How can we access the members of it.
Q24 What is friend function.
Q25. If A is base class and D is derived class . can we access the member of D using A's object .yes or no And how?
Q26. Explain ISR .Top/bottom halves mechanism
Q27. Difference between softirq , tasklet and workqueues.
Q28. What is Event Callbacks . Give one example.
Q29. What is a buffer . how does it gets allocation and maped to physical mem.
Q30. Explain System calls , how does it go from user space to kernel space.
Q31. What is Spin lock and how does it differ from mutex & semaphore.
Q32. Comparing int and unsignedint. what will be typecast.
Q33. What is Q-format. Where do we use it?
Q34. What is diff between floating and fixed point reference?
Q35. What is Static variable and function. Where do we use this. Explain Factory object model.

Programming Questions:
Q1.  Implement malloc of your own and explain in general how does it work.
Q2.  Implement memcpy ,memmove and memset.
Q3.  Reverse a given String in place
Q4.  Reverse a given single linked list and double linked list in place.
Q5.  Write a small program to find the endiannes of system. 
Q6.  Write a program to find palindrome word in a given string lets say My name is Nitin.
Q7.  Write a program to transpose a matrix 4x4.
Q8.  Write a program for matrix multiplication.
Q9 . Write a program to find the intersection of two linked list.
Q10. Implement Stack and Queue.
Q11. Write a program for Run Length Encoding in a given string.
Q12. Write a program to find a substring in a given string.
Q13. Write a program to enter the element in a sorted linked list.
Q14. Write a program to find loop in a linked list.
Q15. Write a program to replace s in given string by m  and m by s - "sy nase im sohit mingh"
Q16.  Determine whether linked list is circular or not.
Q17. Find the mid of linked list.
Q18. Give the ISR method signature and Write a small interrupt handler?
Q19. what does malloc(0) returns . is it NULL?
Q20. Write a multithreading program to print even and odd numbers till 100 using  two threads T1 / T2.
Where T1 will print  1 3 5 7 .... and T2 will print 2 4 6 ...

Bitwise questions:

Q1.  Swap Bit at mth and nth position from Right.
Q2. Toggle Bit at 6th position from Right.
Q3. Count number of 1's in given integer.
Q4. Swap bits from 0th to 2nd positon to 5th to 7th.

puzzles :

1. There is a long string of 15cm size . You need to cut them in minimum way and keep in such a way that you can generate any length string till 15 cm by tying them.

Use binary funda 1 2 4 8

- | -- | ---- | --------  , so there are only 3 cuts and you can generate any length string till 15 cm size.

2.  There are three boxes wrongly labeled as Apple, Orange and  Apple&Orange.You need to take out of one item from any of the one box and then tell the box label correctly in once chance.

[A]       [O]    [A&O] wrongly labeled

take out  one item from [A&O] box , if its apple then its Apple box , and [O] is wrongly labeled so it would be A&O , [A] would be Orange box . or similarly if its Orange out of the A&O box.

3. There are 10 cartoons of Cigar of 10 cigars in each of 10 grams each. In one of the cartoon 10 Cigars are packed of 11 gm each by mistake.  Find out the cartoon having 11 gm Cigars by measuring once.

place cartoon in a row , from left : pick one cigar from 1st cartoon  two from 2nd , three from 3rd and so on till 10 from 10th last one.

Weight them all , Ideally each Cigar weighs 10gm , so total weigh should be 10+20+30+40+50+...+100 =  550 gms

Now , If there is 11 gm Cigar in 1st cartoon from left then the above sum would have come as 551
if its in 2nd Cartoon from left then sum would have come as 552
3rd .....553
4th .....554
5th......555   .................if its in 10th then 560 gms


 ALL THE BEST
----------------------------------------------------- Thank You-------------------------------------------------------

No comments:

Post a Comment