SlideShare a Scribd company logo
Interview questions
1. What is different between String, String Buffer,
String Builder ?
 String is immutable whereas StringBuffer and StringBuider are mutable
classes.
 StringBuffer is thread safe and synchronized whereas StringBuilder is not,
thats why StringBuilder is more faster than StringBuffer.
 String concat + operator internally uses StringBuffer or StringBuilder class.
 For String manipulations in non-multi threaded environment, we should use
StringBuilder else use StringBuffer class.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
2. Define public, private & Protected.
 Access modifiers are keywords in object-oriented languages that set the
accessibility of classes, methods, and other members.
 Access modifiers are a specific part of programming language syntax used to
facilitate the encapsulation of components.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
3. What is Pointer ?
A pointer is a variable that stores the address of another
variable.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
4. What is friend function ?
• It is not member function of a class to which it is a friend.
• Friend functions are declared inside the class using the friend keyword
and then they are defined outside the class.
• Friend function can access any member of a class.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
5. What is Constructor ?
• It is a special method.
• It is used to initiate an objects.
• Once object is created, the constructor will be invoked.
• Class name = Constructor name.
• 2 types of constructor: no argument constructor, parameterized
constructor.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
6. What is operator overloading ?
• It is the process of providing object specific functionality for the base
operators.
• That is: + - * /
• It is the type of polymorphism in which an operator is overloaded to give
user defined meaning to it.
• Overloaded operator is used to perform operation on user-defined data
type.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
7. What is function overloading ?
• More than one function can have same name but with different
parameters. This different may occur on number of parameters, datatype,
empty parameter.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
8. What is inline function ?
• It is one of the important feature of C++.
• Inline function is a function that is expanded in line when it is called.
• When the inline function is called whole code of the inline function gets inserted
or substituted at the point of inline function call.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
inline return-type function-name(parameters)
{
// function code
}
9. What is Inheritance ?
• It is a mechanism where as a new class can derived from an existing class.
• Inheritance is a important pillar of OOPs concept.
• As a sub class, it inherit all the members from its base class.
• It can extend all the methods, objects of its parent class.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
10. What is Abstraction ?
• Abstraction is selecting data from a larger pool to show only the relevant
details to the object.
• It helps to reduce programming complexity and effort.
• In Java, abstraction is accomplished using Abstract classes and interfaces.
• It is one of the most important concepts of OOPs.
• It is a method which create without an implementation. But it can extend to
implement.
• Abstraction in Java can be achieved using Abstract Class and Abstract
Method.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
11. What is Encapsulation ?
• Encapsulation is the process of combining data and functions into a single
unit called class.
• As in encapsulation, the data in a class is hidden from other classes, so it is
also known as data-hiding.
• Encapsulation can be achieved by: Declaring all the variables in the class as
private and writing public methods in the class to set() and get() the values of
variables.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
12. What is Recursion ?
• A recursion function is a function in which a function calls itself directly or
indirectly.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
int fact(int n) {
if (n < = 1) // base case
return 1;
else
return n*fact(n-1); }
13. Define a Structure ?
• A structure is a user defined data type in C/C++. A structure creates a data type
that can be used to group items of possibly different types into a single type.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
14. What is nested structure ?
• Nested structure in C is nothing but structure within structure.
• One structure can be declared inside other structure as we declare structure
members inside a structure.
• The structure variables can be a normal structure variable or a pointer variable to
access the data.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
15. What is Pointer to Pointer ?
The first pointer is used to store the address of the variable. And the second pointer
is used to store the address of the first pointer. That is why they are also known as
double pointers.
TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
SUBSCRIBE FOR MORE

More Related Content

PDF
50+ java interview questions
PDF
Core java interview questions
PDF
Extreme Interview Questions
PDF
Best interview questions
PDF
9 crucial Java Design Principles you cannot miss
PPTX
Technical Interview
PDF
Java Interview Questions
PDF
Java interview questions
50+ java interview questions
Core java interview questions
Extreme Interview Questions
Best interview questions
9 crucial Java Design Principles you cannot miss
Technical Interview
Java Interview Questions
Java interview questions

What's hot (17)

PPT
Java interview-questions-and-answers
DOCX
Hibernate3 q&a
PDF
Java j2ee interview_questions
PPTX
Dev labs alliance top 20 basic java interview question for sdet
PPT
8 most expected java interview questions
PPT
Design pattern
PDF
Java questions for interview
PDF
Bea weblogic job_interview_preparation_guide
PDF
Hibernate Interview Questions
PDF
Top 100 Java Interview Questions with Detailed Answers
PDF
Java interview question
DOCX
Java questions with answers
PDF
Top 10 Java Interview Questions and Answers 2014
PDF
Complete placement guide(technical)
PDF
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
PDF
Class notes(week 9) on multithreading
DOCX
Design pattern application
Java interview-questions-and-answers
Hibernate3 q&a
Java j2ee interview_questions
Dev labs alliance top 20 basic java interview question for sdet
8 most expected java interview questions
Design pattern
Java questions for interview
Bea weblogic job_interview_preparation_guide
Hibernate Interview Questions
Top 100 Java Interview Questions with Detailed Answers
Java interview question
Java questions with answers
Top 10 Java Interview Questions and Answers 2014
Complete placement guide(technical)
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Class notes(week 9) on multithreading
Design pattern application
Ad

Similar to Technical interview questions (20)

PDF
Data Structure Interview Questions & Answers
PDF
EEE oops Vth semester viva questions with answer
DOC
Question bank unit i
DOCX
Intervies
PPTX
OOP CHAPTER object oreinted programming using c++
PPTX
OOP interview questions & answers.
DOC
My c++
PPTX
Introduction to oop
PPTX
Unit - I Intro. to OOP Concepts and Control Structure -OOP and CG (2024 Patte...
PPTX
Python programming Concepts (Functions, classes and Oops concept
PPTX
PDF
Frequently asked tcs technical interview questions and answers
PDF
Unit_2.00000000000000000000000000000.pdf
PPTX
Principles of OOPs.pptx
PPTX
C++ & Data Structure - Unit - first.pptx
PDF
Tcs NQTExam technical questions
PPTX
Untitled presentation about object oriented.pptx
PPTX
Need of object oriented programming
Data Structure Interview Questions & Answers
EEE oops Vth semester viva questions with answer
Question bank unit i
Intervies
OOP CHAPTER object oreinted programming using c++
OOP interview questions & answers.
My c++
Introduction to oop
Unit - I Intro. to OOP Concepts and Control Structure -OOP and CG (2024 Patte...
Python programming Concepts (Functions, classes and Oops concept
Frequently asked tcs technical interview questions and answers
Unit_2.00000000000000000000000000000.pdf
Principles of OOPs.pptx
C++ & Data Structure - Unit - first.pptx
Tcs NQTExam technical questions
Untitled presentation about object oriented.pptx
Need of object oriented programming
Ad

More from Soba Arjun (20)

PDF
Java modifiers
PDF
Java variable types
PDF
Java basic datatypes
PDF
Dbms interview questions
PDF
C interview questions
PDF
Php interview questions with answer
PDF
Computer Memory Types - Primary Memory - Secondary Memory
PDF
Birds sanctuaries
PDF
Important operating systems
PDF
Important branches of science
PDF
Important file extensions
PDF
Java Abstraction
PDF
Java Polymorphism
PDF
Java Overriding
PDF
Java Inner Classes
PDF
java Exception
PDF
Java Methods
PDF
java Inheritance
PDF
Major tribes of india
PDF
Python Modules
Java modifiers
Java variable types
Java basic datatypes
Dbms interview questions
C interview questions
Php interview questions with answer
Computer Memory Types - Primary Memory - Secondary Memory
Birds sanctuaries
Important operating systems
Important branches of science
Important file extensions
Java Abstraction
Java Polymorphism
Java Overriding
Java Inner Classes
java Exception
Java Methods
java Inheritance
Major tribes of india
Python Modules

Recently uploaded (20)

PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Classroom Observation Tools for Teachers
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Complications of Minimal Access Surgery at WLH
PDF
Anesthesia in Laparoscopic Surgery in India
VCE English Exam - Section C Student Revision Booklet
Abdominal Access Techniques with Prof. Dr. R K Mishra
2.FourierTransform-ShortQuestionswithAnswers.pdf
RMMM.pdf make it easy to upload and study
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
A systematic review of self-coping strategies used by university students to ...
human mycosis Human fungal infections are called human mycosis..pptx
Module 4: Burden of Disease Tutorial Slides S2 2025
Chinmaya Tiranga quiz Grand Finale.pdf
Final Presentation General Medicine 03-08-2024.pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Classroom Observation Tools for Teachers
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Complications of Minimal Access Surgery at WLH
Anesthesia in Laparoscopic Surgery in India

Technical interview questions

  • 2. 1. What is different between String, String Buffer, String Builder ?  String is immutable whereas StringBuffer and StringBuider are mutable classes.  StringBuffer is thread safe and synchronized whereas StringBuilder is not, thats why StringBuilder is more faster than StringBuffer.  String concat + operator internally uses StringBuffer or StringBuilder class.  For String manipulations in non-multi threaded environment, we should use StringBuilder else use StringBuffer class. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 3. 2. Define public, private & Protected.  Access modifiers are keywords in object-oriented languages that set the accessibility of classes, methods, and other members.  Access modifiers are a specific part of programming language syntax used to facilitate the encapsulation of components. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 4. 3. What is Pointer ? A pointer is a variable that stores the address of another variable. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 5. 4. What is friend function ? • It is not member function of a class to which it is a friend. • Friend functions are declared inside the class using the friend keyword and then they are defined outside the class. • Friend function can access any member of a class. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 6. 5. What is Constructor ? • It is a special method. • It is used to initiate an objects. • Once object is created, the constructor will be invoked. • Class name = Constructor name. • 2 types of constructor: no argument constructor, parameterized constructor. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 7. 6. What is operator overloading ? • It is the process of providing object specific functionality for the base operators. • That is: + - * / • It is the type of polymorphism in which an operator is overloaded to give user defined meaning to it. • Overloaded operator is used to perform operation on user-defined data type. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 8. 7. What is function overloading ? • More than one function can have same name but with different parameters. This different may occur on number of parameters, datatype, empty parameter. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 9. 8. What is inline function ? • It is one of the important feature of C++. • Inline function is a function that is expanded in line when it is called. • When the inline function is called whole code of the inline function gets inserted or substituted at the point of inline function call. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER inline return-type function-name(parameters) { // function code }
  • 10. 9. What is Inheritance ? • It is a mechanism where as a new class can derived from an existing class. • Inheritance is a important pillar of OOPs concept. • As a sub class, it inherit all the members from its base class. • It can extend all the methods, objects of its parent class. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 11. 10. What is Abstraction ? • Abstraction is selecting data from a larger pool to show only the relevant details to the object. • It helps to reduce programming complexity and effort. • In Java, abstraction is accomplished using Abstract classes and interfaces. • It is one of the most important concepts of OOPs. • It is a method which create without an implementation. But it can extend to implement. • Abstraction in Java can be achieved using Abstract Class and Abstract Method. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 12. 11. What is Encapsulation ? • Encapsulation is the process of combining data and functions into a single unit called class. • As in encapsulation, the data in a class is hidden from other classes, so it is also known as data-hiding. • Encapsulation can be achieved by: Declaring all the variables in the class as private and writing public methods in the class to set() and get() the values of variables. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 13. 12. What is Recursion ? • A recursion function is a function in which a function calls itself directly or indirectly. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER int fact(int n) { if (n < = 1) // base case return 1; else return n*fact(n-1); }
  • 14. 13. Define a Structure ? • A structure is a user defined data type in C/C++. A structure creates a data type that can be used to group items of possibly different types into a single type. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 15. 14. What is nested structure ? • Nested structure in C is nothing but structure within structure. • One structure can be declared inside other structure as we declare structure members inside a structure. • The structure variables can be a normal structure variable or a pointer variable to access the data. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  • 16. 15. What is Pointer to Pointer ? The first pointer is used to store the address of the variable. And the second pointer is used to store the address of the first pointer. That is why they are also known as double pointers. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER