Add office photos
Employer?
Claim Account for FREE

Xogene

3.8
based on 7 Reviews
Filter interviews by

HDFC Bank Interview Questions and Answers

Updated 26 Jun 2024

Q1. Python Data structures(difference between list and tuple)

Ans.

Lists are mutable, ordered collections of items, while tuples are immutable, ordered collections of items.

  • Lists are denoted by square brackets [], while tuples are denoted by parentheses ().

  • Lists can be modified after creation, while tuples cannot be modified.

  • Lists are typically used for collections of similar items that may need to be changed, while tuples are used for fixed collections of items.

  • Example: list_example = [1, 2, 3], tuple_example = (4, 5, 6)

Add your answer

Q2. Encapsulation with real life examples

Ans.

Encapsulation is the concept of bundling data and methods that operate on the data into a single unit.

  • Encapsulation helps in hiding the internal state of an object and only exposing necessary functionalities.

  • It allows for better control over the data by preventing direct access from outside the class.

  • Example: A car object encapsulates its properties like speed, fuel level, and methods like start, stop, accelerate.

  • Example: A bank account object encapsulates its balance, accoun...read more

Add your answer

Q3. Coding round - palindrome number

Ans.

Check if a number is a palindrome or not

  • Convert the number to a string

  • Reverse the string and compare with the original string

  • If they are the same, the number is a palindrome

Add your answer

Q4. Explain break, pass, continue

Ans.

break, pass, and continue are control flow statements used in programming to alter the flow of execution.

  • break: used to exit a loop or switch statement

  • pass: not a keyword in most programming languages, but can be used as a placeholder for future code

  • continue: used to skip the rest of the current iteration in a loop and start the next iteration

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

Q5. Remove duplicates from array

Ans.

Remove duplicates from array of strings

  • Create a Set to store unique strings

  • Iterate through the array and add each string to the Set

  • Convert the Set back to an array to get the unique strings

Add your answer

Q6. List and its methods/functions

Ans.

List is a data structure in Python that stores a collection of items in a specific order.

  • Common methods/functions for lists in Python include append(), remove(), sort(), and index().

  • Lists can contain different data types, such as strings, integers, and even other lists.

  • Lists are mutable, meaning you can change the elements within a list after it has been created.

Add your answer

More about working at Xogene

HQ - Englewood, New Jersey, United States (USA)
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at HDFC Bank

based on 1 interviews
Interview experience
3.0
Average
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Junior Software Developer Interview Questions from Similar Companies

3.7
 • 11 Interview Questions
View all
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

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