Technical Interview Questions and Sample Answers
Whether you have a technical interview or an HR interview, one thing is common: you should be answering the questions in a confident manner. Below are sample questions and answers; however, you should never rehearse the answers, as interviewers can easily recognize when you are doing so. Rather, use the samples as guides and improvise your answers accordingly.
Important: Though technical interviews are used for a vast number of jobs, this article focuses just on technical IT interviews.
- What are normalization and denormalization? Why do we have to denormalize under certain circumstances?
Removal of redundant data from a table in the database is known as normalization. Denormalization means allowing the storage of redundant data in a table. Denormalization is done while designing the database in order to make the data retrieval easier. This is because the number of joins used to retrieve a redundant data is lesser than that for the non-redundant data.
- What is the function of a bridge?
It is an intermediate component that connects two LANs of the same LAN protocol. It filters the IP address from one LAN and passes the data packets to another LAN.
- How does a router differ from a bridge?
A router can connect any two networks (similar or dissimilar), whereas a bridge can connect only similar networks. A router acts at the Layer 3 of the OSI model, whereas the bridge works at the Layer 2 of the OSI model.
- Can abstract classes be used in C++?
Yes, they can be used in C++.
- What is sed?
Sed is a UNIX tool for working with stream of text.
- How can just a few lines of the file be printed in UNIX?
This can be done using the sed tool. For example, sed 2q will give the first 2 lines, and sed 8q will give the first 8 lines.
- What is a daemon thread in Java?
It is a thread that can operate without the intervention of the user. JVM will exit whenever it encounters daemon thread.
At times, the interviewer(s) may ask a puzzle-like question to test your thinking process. A good example follows:
- There is a rickety bridge, and four people have to cross it in the nighttime. They have only one flashlight among them, and the bridge is narrow and can take only two people at a time. How will they cross the bridge in the least possible time if A requires 1 minute; B, 2 minutes; C, 5 minutes and D, 10 minutes to cross?
First A and C will cross the bridge together. This would take 5 minutes. Then A goes back, taking one more minute, totaling the time to 6 minutes. Now A brings D with him in 10 more minutes, so the total time is 16 minutes now. Then A goes back again, taking 1 more minute (the total is now 17 minutes). Finally, A and B cross in another 2 minutes. Thus, the total time taken becomes 19 minutes.