Technical Interview Questions and Answers

Most Asked Technical Interview Questions

This page is updated with commonly asked Technical Interview Questions and Answers.

What are Technical Interviews?

Why Technical Interviews are Conducted?

Technical Interviews are conducted to test various skills of a candidate including
  • Programming Skills
  • Technical Skills
  • Technical Knowledge
  • Critical Thinking
  • Problem Solving Skills
  • Pressure Performance

How to Prepare for Technical Interview?

Technical Interview Questions and Answers

Ques 1: State the difference between heap memory and stack memory.


Heap Memory :

  • It is used to store objects.
  • If heap memory gets filled then it returns java.lang.OutOfMemoryError.
  • Accessing this memory is slower when compared to stack.
  • Heap space is used throughout the applications.

Stack Memory :

  • It is used to store the order of method execution and local variables.
  • If stack memory gets filled then it returns java.lan.StackOverFlowError.
  • Accessing this memory is faster when compared to heap.
  •  Stack space is used for methods that are currently running.
Ques 2: Explain the concept of Reentrancy?


It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately. Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program. Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters. The temporary part associated with each activation is the activation record. Generally, the activation record is kept on the stack.
Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure.

Ques 3: Briefly explain the approaches to develop algorithms?


There are three major approaches to develop algorithms −

  • Greedy Approach − creating a solution by choosing the next best possible option
  • Divide and Conquer − diving the problem to a minimum possible sub-problem and solving them independently.
  • Dynamic Programming − diving the problem to a minimum possible sub-problem and solving them combinedly.
Ques 4: Difference between C and C++ ?


  1. C++ can be considered as a superset of C, most C programs except some exceptions, work in C++ and C.
  2. C programming is a little bit limited and is a procedural programming language, but C++ supports both procedural and Object-Oriented programming
  3. Since C++ supports object-oriented programming, it is capable of performing tasks like function overloading, templates, inheritance, virtual functions, friend functions. These features are not present in C.
  4. C++ supports exception handling at the language level, in C exception handling is done in the traditional if-else style.
  5. C++ supports references, C doesn’t.
  6. In C, scanf() and printf() are mainly used input/output. C++ mainly uses streams to perform input and output operations. cin is a standard input stream and cout is a standard output stream.
Ques 5: What are Static Binding and Dynamic Binding?


  • Static Binding is a binding in which the name can be combined with the class during collection time, and it is also called early binding.
  • Dynamic Binding is a binding in which name can be identified with the class during execution time, and it is also known as Late Binding.
Ques 6: What is database partitioning?

It (Database partitioning) is a process where a logical database is divided into different independent parts. The database objects like tables, indexes are subdivided and managed, and accessed at the granular level.

Ques 7: What is Software Configuration Management?

During the Software Development Life Cycle, Software Configuration Management is a method for routinely managing, organizing, and controlling modifications in manuals, protocols, and other organizations. In information engineering, the SCM process is abbreviated as SCM. The main aim is to improve productivity by making as few errors as possible.

Ques 8: Define Version Control System(VCS)?

A version control system is defined as a system that keeps all records of the changes made on a specific project, and also helps us to ensure whether all developers in a team are working on the same or not. It manages the history of all the activities done so, it gives a developer the confidence to fix a bug or make any changes or run a test so if anything goes wrong previous work can be restored anytime.

Ques 9: Write the Syntaxes for joins.


  • INNER JOIN: select column_name From table1 INNER JOIN table2 on table1.column_name = table2.column_name;
  • OUTER JOIN: select column_name From table1 OUTER JOIN table2 on table1.column_name = table2.column_name;
  • LEFT JOIN: select column_name From table1 LEFT JOIN table2 on table1.column_name = table2.column_name;
  • RIGHT JOIN: select column_name From table1 RIGHT JOIN table2 on table1.column_name = table2.column_name;
  • FULL JOIN: select column_name From table1 INNER JOIN table2 on table1.column_name = table2.column_name WHERE condition;
Ques 10: What is role of static keyword on class member variable?


Static is a keyword in C++ used to give special characteristics to an element. Static elements are allocated storage only once in a program lifetime in the static storage area. And they have a scope till the program’s lifetime. Static Keyword can be used with the following,

  1. Static variable in functions
  2. Static Class Objects
  3. Static member Variable in class
  4. Static Methods in class

A static variable does exit through the objects for the respective class are not created. Static member variables share a common memory across all the objects created for the respective class. A static member variable can be referred to using the class name itself.

Ques 11: What is the gc() method?


To invoke Garbage Collector, this gc() method is called. It is found in both system and runtime classes. It automatically releases the memory when an object is no longer used.

Example : public static void gc()

Ques 12: What do you mean by “Trigger” in SQL?


A trigger is a special type of stored procedure that executes automatically in place or after data changes. It allows e executing a batch of code when an insert, update, or any other query is executed against a specific table.

Ques 13: What is a software metric?


Software Metrics provide measures for various aspects of software processes and software products. They are divided into –

  1. Requirement metrics: Length requirements, completeness
  2. Product metrics: Lines of Code, Object-oriented metrics, design, and test metrics
  3. Process metrics: Evaluate and track budget, schedule, human resources.
Ques 14: What is Inheritance? Explain the use of Inheritance?


Inheritance is a concept where one class shares the structure and behavior defined in another class. Inheritance applied to one class is called Single Inheritance, and if it depends on multiple classes, then it is called multiple Inheritance.


  • For Method Overriding (so runtime polymorphism can be achieved).
  • For Code Reusability.
Ques 15: What is the difference between micro kernel and macro kernel?


Micro kernel: micro kernel is the kernel which runs minimal performance affecting services for operating system. In micro kernel operating system all other operations are performed by processor.

Macro Kernel: Macro Kernel is a combination of micro and monolithic kernel.

Ques 16: What are the advantages of passing this into a method instead of the current class object itself?


As we know, that this refers to the current class object, therefore, it must be similar to the current class object. However, there can be two main advantages of passing this into a method instead of the current class object.

  • This is a final variable. Therefore, this cannot be assigned to any new value whereas the current class object might not be final and can be changed.
  • This can be used in the synchronized block.
Ques 17: How does the throw keyword differ from the throws keyword?


While the throws keyword allows declaring an exception, the throw keyword is used to explicitly throw an exception. Checked exceptions can’t be propagated with throw only, but throws allow doing so without the need for anything else. The throws keyword is followed by a class, whereas the throw keyword is followed by an instance. The throw keyword is used within the method, but the throws keyword is used with the method signature. Furthermore, it is not possible to throw multiple exceptions, but it is possible to declare multiple exceptions.

Ques 18: What is the ACID property in a database?


To ensure that the data transactions are processed reliably in a database system we use the ACID property.

  • Atomicity: It states that each transaction is all or nothing. It states that the entire transaction fails if one part of the transaction fails and the database state is left unchanged.
  • Consistency: It ensures that the data must follow all validation rules. According to this a transaction never leaves your database without its state being completed.
  • Isolation: The main goal of providing isolation is concurrency control. This property ensures that the concurrent property of execution should not be met.
  • Durability: this property states that once a transaction has been committed, it remains committed, whatever the situation be, even power loss, crashes, or errors.
Ques 19: How will you take a sentence from a user in C?


In order to take a sentence from user(input), we have to use scanf(“%[^\n]%*c”,s)

Where, ^\n – takes input until a newline isn’t encountered.

%*c – reads new line character.

* – indicates new line character is discarded.

Ques 20: What is selection sort?


In the selection sort technique, the list is divided into two parts. In one part all elements are sorted and in another part the items are unsorted. At first we take the maximum or minimum data from the array. After getting the data (say minimum) we place it at the beginning of the list by replacing the data of first place with the minimum data.

Check Technical Interview Questions and Answers: Section-Wise

FAQ on Technical Interview Questions and Answers

What questions are asked in a technical interview?

In Technical Interview, interviewers ask questions from topics including:-

  • Programming Concepts
  • Technical Concepts
  • New Technologies
  • SDLC
  • Puzzles

How do you prepare for a Technical Interview?

Prepare basic coding questions, questions on programming language concepts like C, C++, JAVA, etc. Additionally, prepare questions from SDLC, Artificial Intelligence, Machine Learning, Cyber Security, etc.

What should I say in a Technical Interview?

In a Technical Round, you get the chance to showcase your technical/programming skills to the interviewer. In addition to that, Technical Interview also checks a candidate’s problem solving ability and critical thinking approach.

What is Technical Round?

Technical Round or Technical Interview is the first round of Interviews. It is one of the most important and difficult rounds of the entire recruiting process. In this round, the potential employers check the candidate’s technical skills.

How long is a Technical Interview?

Technical Interviews are conventionally 45-60 minutes long. But depending on the company and job profile it could vary.

Is Technical Round the same for all companies?

No, Technical Round depends greatly on the job profile and the company. For various profiles, the Technical Interview questions and difficulty level varies.

Example:- In Infosys for SE role the Technical Round will be easy to medium level while for DSE/PP it will be hard.

Join Our Interview Course Now to Get Yourself Prepared -

Join Our Interview Course Now to Get Yourself Prepared

Prepare for the interview process in both Service and Product Based companies along with Group Discussion, Puzzles, Resume Building, HR, MR and Technical Interviews.