Monday, March 21, 2016

Few questions to help for interviews

Below are few questions shared by my friends since 4 years. These are not ordered correctly. Many questions are repetitive. I have not cleared yet.
Skill set: C,C++,linux, gdb, telcom, networking(l2/l3/l7), sip etc.

1) Design patterns used in project.
2) Troubleshooting skills. How do you troubleshoot.
3) If there is an issue reported at site and manager is out of office, then how do you handle the situation.
4) Explain observer design pattern and polymorphism.
5) what is conitnues integration testing.
6) which automation testing tools used for unit testing.

1) what are the difference between semaphore and mutex.
2) Can we use these to ipc
3) what are the default functions given by c++
4) override default constructor
5) difference between message queue and pipe
6) how hash table works
7) can mutex will be shared to other processes.

how copy constructors are created, use pointers .. read the stuff
how singleton classes implemented, use pointers and static methods
difference between sctp and tcp
header about tcp, 3 way handshake. use seq numbers, ack etc

1) difference between point code and global title.
2) which link used for ss7(dialogic)
3) what is segmentation violation.
4) what is stack unwinding.
5) what is vtable.
6) vtable with example.
7) Difference between deep copy and shallow copy.

1) how to set/reset a particular bit on the number.
2) what is the size of structure -
   struct a
   {
      uint32_t a;
      uint_8 b;
   };
   the size is 8 bytes.
3) how to add ip address using the command.
4) how to check the ip address in windows.
5) what is L2 switch. what is vlan. study basics.
6) what is fragmentation. Explain flags and procedure.
7) worked on tcp or not.

1) how traceroute is implemented.
2) IF the packet is looping between 2 routers, when this packet will be discarded.
3) what is the field to identify L3 in ethernet frame.
4) what is deadlock and how to avoid.
5) simple example for raising segmentation violation.
6) if there are 1000 rooms and I want to find the person correctly, which data structure you will use.
7) what is volatile variable.
8) what are different segements to store the data in program.
9) what will be stored in function calls.
http://www.tenouk.com/Bufferoverflowc/Bufferoverflow2a.html
10) what will be stored in context switch.
11) which data structures used.
12) If there are 3 threads writing message Q and 1 thread reading, which synchronization will be used.


what are the 4 basic concepts of oops, explain with example.
what is polymorphism used in your project
what is deadlock and how to prevent.
How semaphores worked
what are message queues
what are the problems with shared memory segments
what are different types of IPCs
what are different kind of design patterns used. Singleton, command, factory.
Explain the design patterns used. Logger, configuration reading etc. Factory class examples.
how data will be shared between 2 threads.
what are different kind of mechanism for synchronization
what are the difference between mutex and semaphore.
How to detect memory leaks and what are the tools used. (mdb, dbx, valgrind, gdb)
what is memory pool. where this pool will be used. Normally we can use tdynHash functions(Hash table data structure) to store the messages. States will be stored.
How to manage the dynamically allocated memory.
what are message queues...

what are threads.
When threads will be used.
why threads are required, not the difference between thread and process.
What is parellel processing.
If I have 2 cores, and 2 threads, then threads will help here. Basically how wanted to know how threads will be used.
what is buffer size of tcp.
If I have 2 GB bytes of data, then who will manage the chunks of data either in application(socket) or IP layer will do this.
what is MTU size. Read more about this
How to store the elements from the container which is having duplicate elements. What is time complexity.
Singleton class implementation with thread safe.
What is atomicity and how it is different from synchronization.

how to detect memory corruption. He has given hint as watch point. Not sure how it will be used.
what are the difference between fib and rib
what are the difference between is-is, rip, ospf.
explain semaphore, mutex and binary semaphore
what are static functions


programs
Reverse a linked list
count the number of bits in the number
delete linked list
swap nibbles in a byte
swap even/odd positions

what are static functions
what are volatile variables.
have u used linux internals
difference between semaphore and mutex.
different kinds of IPC's used
priority for threads
bit operations
order even and odd numbers
count the number of 1's
 detailed level packet flow from router1 to router2.

tcp/ip connection/termination details in detail
mmap usage
sockets example call flow
linked list to detect loop and startting point
stack overflow example : call main within main()
detect starting point of loop, below description
Step1: Proceed in the usual way u'll use to find the loop. ie. Have two pointers, increment one in single step and other in two steps, If they both meet in sometime, there is a loop.
Step2: Freeze one pointer where it was and increment the other pointer in one step counting the steps u make and when they both meet again, the count will give u the length of the loop.(This is same as counting the number of elements in a circular link list.)
Step3: Reset both pointers to the start of the link list, increment one pointer to the length of loop times and then start the second pointer. increment both pointers in one step and when they meet again, it'll be the start of the loop. (This is same as finding the nth element from the end of the link list.)

what happens if there are 2 routes for ospf?
how fragmentation works.. explain the fields



1) is it possible to reassmeble the packet at host? from IP fragmentation
2) how to control congestion in tcp networks
3) what is 3 way hand shake?
4) does ospf can travel within subnet
5) create hash function which accepts string as an argument
6) delete last node of linked list
7) what is static variable and where it is stored? same for static functions
8) what happens to thread if try to lock the locked mutex.
9) what is segmenation violation and how to detect.
10) ipcs: message queue? how it is different from other ipc mechanism.
11) a function pointer pointing to static function? can we access this variable.
12) what is piggy backing?



1) what are different types of lsa
2) how bfd helps
3) which data structure used to construct lsa
4) can balanced tree become unbalanced
5) LMP(longest match prefix) which ds use
6) what happens if main program exits (it created 5 threads)
7) scaling: Have you faced any problems in scalability. How to improve.
8) Lots of questions of scalling.
9) Does router lsa floods the routes?
10) Does bfd is L2/L3 protocol.
11) what are the issues fixed in code.
12) What are the operations done on data structures? tree.. and how these are used in ospf software.





No comments:

Post a Comment