Add office photos
Engaged Employer

TCS

3.7
based on 84.1k Reviews
Filter interviews by

SenseHR Interview Questions and Answers

Updated 17 Nov 2024
Popular Designations

Q1. What is inheritance and type of

Ans.

Inheritance is a concept in object-oriented programming where a class can inherit attributes and methods from another class.

  • Inheritance allows for code reusability and promotes a hierarchical relationship between classes.

  • There are different types of inheritance such as single inheritance, multiple inheritance, multilevel inheritance, and hierarchical inheritance.

  • Example: Class B inheriting from Class A - 'class B extends A'

  • Example: Class C inheriting from Class A and Class B ...read more

Add your answer

Q2. What is class and how to create

Ans.

A class is a blueprint for creating objects in object-oriented programming.

  • Classes define the properties and behaviors of objects.

  • To create a class, use the 'class' keyword followed by the class name and curly braces.

  • Inside the class, you can define attributes (variables) and methods (functions).

  • Example: class Car { String color; void start() { //code here } }

Add your answer

Q3. What is poly morph sm

Ans.

Polymorphism is a concept in object-oriented programming where a single function or method can operate on different types of data.

  • Polymorphism allows for flexibility and reusability in code

  • There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding)

  • Example: a function that can calculate the area of different shapes (circle, square, triangle) based on the input type

Add your answer

Q4. What are the data type

Ans.

Data types are classifications that specify which type of value a variable can hold.

  • Data types include integers, floating point numbers, characters, strings, and booleans.

  • Examples of data types are int (for integers), float (for floating point numbers), char (for characters), and bool (for booleans).

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

Q5. What is join in sql

Ans.

Join in SQL is used to combine rows from two or more tables based on a related column between them.

  • Join is used to retrieve data from multiple tables based on a related column

  • Types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN

  • Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column

Add your answer

Q6. SWAP program for two variables

Ans.

A SWAP program exchanges the values of two variables without using a temporary variable.

  • Use XOR operation to swap two variables without using a temporary variable.

  • Example: a = 5, b = 10. After swapping, a = 10, b = 5.

  • Ensure to handle cases where the variables are the same.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
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