KPIT Technologies
Interview Questions and Answers
Q1. What is join and types of join?
Join is used to combine rows from two or more tables based on a related column between them.
Types of joins include inner join, outer join (left, right, full), cross join, self join.
Inner join returns rows when there is at least one match in both tables.
Outer join returns all rows from one table and matching rows from the other table.
Cross join returns the Cartesian product of the two tables.
Self join is used to join a table to itself.
Q2. Write a program to reverse the array in C
Program to reverse an array of strings in C
Declare an array of strings
Use a loop to swap elements from start to end
Print the reversed array
Q3. Write a program to reverse the string in C
Program to reverse a string in C
Use a loop to iterate through the characters of the string
Swap the characters from start to end of the string
Continue swapping until reaching the middle of the string
Q4. Tell me about friendly function?
A friendly function is a function that is not a member of a class but has access to the private and protected members of the class.
A friendly function is declared with the keyword 'friend' in the class that it is granting access to.
It can access private and protected members of the class it is declared as a friend of.
It is not a member of the class itself, but can be defined outside of the class.
Example: class A { private: int x; friend void display(A obj) { cout << obj.x; } ...read more
Q5. Tell me about inheritance?
Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.
Allows a class to inherit attributes and methods from another class
Promotes code reusability and reduces redundancy
Supports the concept of parent and child classes
Derived class can override methods from the base class
Example: Class 'Car' can inherit from class 'Vehicle'
Q6. What are Oops concepts ?
Oops concepts are the principles of Object Oriented Programming, including Inheritance, Encapsulation, Polymorphism, and Abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the necessary features.
Q7. 4 pillar of oop
Encapsulation, Inheritance, Polymorphism, Abstraction are the 4 pillars of OOP.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Inheritance: Allows a class to inherit properties and behavior from another class.
Polymorphism: Ability for objects to be treated as instances of their parent class.
Abstraction: Hides the complex implementation details and only shows the necessary features.
Q8. print 1st 10 prime number
Print the first 10 prime numbers
Start with 2 as the first prime number
Use a loop to check for prime numbers
Keep track of the count of prime numbers found
Top HR Questions asked in null
Interview Process at null
Top Associate Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month