Add office photos
Engaged Employer

OLX

3.8
based on 645 Reviews
Filter interviews by

HDFC Bank Interview Questions and Answers

Updated 5 Feb 2024

Q1. Design a database schema for a chat application where user can send message to an individual or in group

Ans.

Design a database schema for a chat application with individual and group messaging.

  • Create a 'users' table with unique user IDs

  • Create a 'messages' table with message IDs, sender and receiver IDs, message content, and timestamp

  • Create a 'groups' table with unique group IDs and group names

  • Create a 'group_members' table with group ID and user ID to track group membership

  • Use foreign keys to link tables together

  • Consider indexing frequently queried columns for performance

Add your answer

Q2. Write sql to retrieve all unread messages when user sign in

Ans.

SQL query to retrieve all unread messages upon user sign in

  • Use a JOIN statement to combine the messages and user tables

  • Filter the results to only show messages that have not been read by the user

  • Use the user's sign in information to identify which messages are unread

Add your answer

Q3. How much is the web traffic on your site etc

Ans.

Our website receives an average of 10,000 unique visitors per day.

  • Our website has a steady flow of traffic with a consistent number of unique visitors per day.

  • We use Google Analytics to track our web traffic and analyze user behavior.

  • Our peak traffic times are during weekdays from 9am to 5pm.

  • We have noticed an increase in mobile traffic over the past year.

  • Our website's traffic is primarily driven by organic search and social media.

Add your answer

Q4. Array of first n numbers.One number is missing.Find missing number?

Ans.

To find missing number in an array of first n numbers.

  • Calculate the sum of first n numbers using formula n*(n+1)/2

  • Calculate the sum of given array using loop

  • Subtract the sum of array from sum of first n numbers to get the missing number

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

Q5. Difference between include_once and require_once?

Ans.

include_once and require_once are PHP functions used to include files. The difference is in how they handle errors.

  • include_once will only include the file once, and will not throw a fatal error if the file is not found

  • require_once will also only include the file once, but will throw a fatal error if the file is not found

  • Both functions are used to include files that contain functions or variables that are needed in the current script

Add your answer

Q6. sessions vs cookie. Detailed discussion

Ans.

Sessions and cookies are both used for maintaining user state, but sessions are server-side and cookies are client-side.

  • Sessions store user data on the server, while cookies store data on the client's browser

  • Sessions are more secure than cookies because the data is not accessible to the client

  • Cookies can be used for tracking user behavior and preferences

  • Sessions are typically used for authentication and authorization purposes

  • Cookies can be set to expire after a certain amount...read more

Add your answer

Q7. Indexes in mysql

Ans.

Indexes in MySQL are used to improve query performance by allowing faster data retrieval.

  • Indexes are created on one or more columns of a table.

  • They work by creating a separate data structure that allows for faster data retrieval.

  • Indexes can be created using the CREATE INDEX statement.

  • Indexes can also be dropped using the DROP INDEX statement.

  • Indexes can be used to speed up SELECT, UPDATE, and DELETE statements.

  • Indexes can also be used to enforce uniqueness on a column or set ...read more

View 1 answer

More about working at OLX

#15 Best Small Company - 2021
#2 Best Internet Company - 2021
HQ - Gurgaon,Haryana, India
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

Top Software Developer Interview Questions from Similar Companies

4.0
 • 110 Interview Questions
3.9
 • 86 Interview Questions
3.8
 • 78 Interview Questions
3.5
 • 37 Interview Questions
3.8
 • 16 Interview Questions
3.7
 • 10 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
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