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

What's hot (17)

PPT
Java interview-questions-and-answers
bestonlinetrainers
 
DOCX
Hibernate3 q&a
Faruk Molla
 
PDF
Java j2ee interview_questions
ppratik86
 
PPTX
Dev labs alliance top 20 basic java interview question for sdet
devlabsalliance
 
PPT
8 most expected java interview questions
Poonam Kherde
 
PPT
Design pattern
Mallikarjuna G D
 
PDF
Java questions for interview
Kuntal Bhowmick
 
PDF
Bea weblogic job_interview_preparation_guide
Pankaj Singh
 
PDF
Hibernate Interview Questions
Syed Shahul
 
PDF
Top 100 Java Interview Questions with Detailed Answers
Whizlabs
 
PDF
Java interview question
varatharajanrajeswar
 
DOCX
Java questions with answers
Kuntal Bhowmick
 
PDF
Top 10 Java Interview Questions and Answers 2014
iimjobs and hirist
 
PDF
Complete placement guide(technical)
Karunakar Singh Thakur
 
PDF
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Arun Kumar
 
PDF
Class notes(week 9) on multithreading
Kuntal Bhowmick
 
DOCX
Design pattern application
gayatri thakur
 
Java interview-questions-and-answers
bestonlinetrainers
 
Hibernate3 q&a
Faruk Molla
 
Java j2ee interview_questions
ppratik86
 
Dev labs alliance top 20 basic java interview question for sdet
devlabsalliance
 
8 most expected java interview questions
Poonam Kherde
 
Design pattern
Mallikarjuna G D
 
Java questions for interview
Kuntal Bhowmick
 
Bea weblogic job_interview_preparation_guide
Pankaj Singh
 
Hibernate Interview Questions
Syed Shahul
 
Top 100 Java Interview Questions with Detailed Answers
Whizlabs
 
Java interview question
varatharajanrajeswar
 
Java questions with answers
Kuntal Bhowmick
 
Top 10 Java Interview Questions and Answers 2014
iimjobs and hirist
 
Complete placement guide(technical)
Karunakar Singh Thakur
 
Lulu.com.java.j2 ee.job.interview.companion.2nd.edition.apr.2007
Arun Kumar
 
Class notes(week 9) on multithreading
Kuntal Bhowmick
 
Design pattern application
gayatri thakur
 

Similar to Technical interview questions (20)

PDF
Frequently asked tcs technical interview questions and answers
nishajj
 
PDF
EEE oops Vth semester viva questions with answer
Jeba Moses
 
PDF
Google Interview Questions By Scholarhat
Scholarhat
 
PDF
C++ interview question
Durgesh Tripathi
 
PDF
Tcs NQTExam technical questions
AniketBhandare2
 
PDF
Technical_Interview_Questions.pdf
adityashukla939020
 
PPT
C, C++ Interview Questions Part - 1
ReKruiTIn.com
 
PDF
software engineer interview questions.pdf
RaajpootQueen
 
PDF
Data Structure Interview Questions & Answers
Satyam Jaiswal
 
DOC
Question bank unit i
Rasi Manivannan
 
PDF
25_important_OOPS_concept__1703700980.pdf
digambara64
 
DOCX
Tcs technical interview questions
Ashu0711
 
PDF
Module wise format oops questions
SANTOSH RATH
 
PDF
C interview questions
Soba Arjun
 
DOCX
Intervies
roopa manoharan
 
PPT
Object Oriented Technologies
Umesh Nikam
 
PDF
Core java interview faq
Kumaran K
 
PDF
C++ questions And Answer
lavparmar007
 
PDF
C++ Interview Question And Answer
Jagan Mohan Bishoyi
 
PPTX
C++ theory
Shyam Khant
 
Frequently asked tcs technical interview questions and answers
nishajj
 
EEE oops Vth semester viva questions with answer
Jeba Moses
 
Google Interview Questions By Scholarhat
Scholarhat
 
C++ interview question
Durgesh Tripathi
 
Tcs NQTExam technical questions
AniketBhandare2
 
Technical_Interview_Questions.pdf
adityashukla939020
 
C, C++ Interview Questions Part - 1
ReKruiTIn.com
 
software engineer interview questions.pdf
RaajpootQueen
 
Data Structure Interview Questions & Answers
Satyam Jaiswal
 
Question bank unit i
Rasi Manivannan
 
25_important_OOPS_concept__1703700980.pdf
digambara64
 
Tcs technical interview questions
Ashu0711
 
Module wise format oops questions
SANTOSH RATH
 
C interview questions
Soba Arjun
 
Intervies
roopa manoharan
 
Object Oriented Technologies
Umesh Nikam
 
Core java interview faq
Kumaran K
 
C++ questions And Answer
lavparmar007
 
C++ Interview Question And Answer
Jagan Mohan Bishoyi
 
C++ theory
Shyam Khant
 
Ad

More from Soba Arjun (20)

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

Recently uploaded (20)

PDF
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPTX
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PPTX
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Controller Request and Response in Odoo18
Celine George
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Horarios de distribución de agua en julio
pegazohn1978
 
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
How to Send Email From Odoo 18 Website - Odoo Slides
Celine George
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 

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