O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Technical interview questions

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
50+ java interview questions
50+ java interview questions
Carregando em…3
×

Confira estes a seguir

1 de 17 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (19)

Semelhante a Technical interview questions (20)

Anúncio

Mais de Soba Arjun (20)

Mais recentes (20)

Anúncio

Technical interview questions

  1. 1. Interview questions
  2. 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. 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. 4. 3. What is Pointer ? A pointer is a variable that stores the address of another variable. TECHNICAL INTERVIEW QUESTIONS WITH ANSWER
  5. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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
  17. 17. SUBSCRIBE FOR MORE

×