Add office photos
Engaged Employer

PIT Solutions

4.4
based on 209 Reviews
Filter interviews by

TCI Foundation Interview Questions and Answers

Updated 12 Apr 2024

Q1. Explain inheritance with example

Ans.

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

  • Derived class can add its own attributes and methods or override existing ones

  • Example: Class 'Animal' can be a base class with attributes like 'name' and methods like 'eat'. Class 'Dog' can inherit from 'Animal' and add its own method 'bark'

Add your answer

Q2. Explain polymorphism in Java

Ans.

Polymorphism in Java allows objects of different classes to be treated as objects of a common superclass.

  • Polymorphism is achieved through method overriding and method overloading.

  • Method overriding allows a subclass to provide a specific implementation of a method that is already provided by its superclass.

  • Method overloading allows multiple methods with the same name but different parameters to coexist in the same class.

  • Polymorphism helps in achieving flexibility and reusabili...read more

Add your answer

Q3. Oops concepts in detail

Ans.

Oops concepts are fundamental principles of object-oriented programming like inheritance, polymorphism, encapsulation, and abstraction.

  • Inheritance: Allows a class to inherit properties and behavior from another class.

  • Polymorphism: Ability to present the same interface for different data types.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit.

  • Abstraction: Hiding the complex implementation details and showing only the necessary features.

Add your answer

Q4. Access modifiers in detail

Ans.

Access modifiers control the visibility and accessibility of classes, methods, and variables in object-oriented programming.

  • There are four types of access modifiers in Java: public, private, protected, and default.

  • Public: accessible from any other class.

  • Private: accessible only within the same class.

  • Protected: accessible within the same package and subclasses.

  • Default: accessible only within the same package.

  • Access modifiers help enforce encapsulation and prevent unauthorized ...read more

Add your answer
Discover TCI Foundation interview dos and don'ts from real experiences

Q5. Oops concept in Java

Ans.

Oops concept in Java refers to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.

  • Inheritance allows a class to inherit properties and behavior from another class.

  • Encapsulation involves bundling data and methods that operate on the data into a single unit.

  • Polymorphism allows objects to be treated as instances of their parent class.

  • Abstraction hides the implementation details and only shows the necessary features to the outsid...read more

Add your answer

Q6. Write a C program for obtaing an factorial of a number

Ans.

A C program to calculate the factorial of a number.

  • Use a loop to multiply the number with all the numbers from 1 to the given number.

  • Handle the case when the number is 0 or negative separately.

  • Use a variable to store the factorial value and update it in each iteration of the loop.

View 1 answer

Q7. write query for select second highest salary from table

Ans.

Query to select second highest salary from a table

  • Use ORDER BY clause to sort salaries in descending order

  • Use LIMIT to select the second row after skipping the first row

Add your answer

Q8. What is indexing,trigger,stored procedure

Ans.

Indexing, triggers, and stored procedures are database concepts used to optimize performance and automate tasks.

  • Indexing is a technique used to improve the speed of data retrieval operations in a database by creating indexes on columns.

  • Triggers are special types of stored procedures that are automatically executed in response to certain events on a table, such as insert, update, or delete operations.

  • Stored procedures are precompiled SQL statements that are stored in the datab...read more

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at TCI Foundation

based on 6 interviews in the last 1 year
Interview experience
4.5
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.9
 • 712 Interview Questions
3.8
 • 331 Interview Questions
4.0
 • 173 Interview Questions
4.2
 • 160 Interview Questions
4.3
 • 139 Interview Questions
View all
Top PIT Solutions Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter