GS Lab
Hindustan Adhesives Interview Questions and Answers
Q1. Difference in TCP & UDP? Which is used in which case?
TCP is a connection-oriented protocol while UDP is connectionless. TCP is used for reliable data transfer while UDP is used for real-time applications.
TCP provides reliable, ordered, and error-checked delivery of data while UDP does not guarantee any of these
TCP is used for applications that require high reliability and transmission speed, such as email, file transfer, and web browsing
UDP is used for real-time applications such as online gaming, video conferencing, and live s...read more
Q2. Prototypes of socket, bind, listen, accept & connect and their functionality
Prototypes and functionality of socket, bind, listen, accept & connect
socket() - creates a new socket
bind() - assigns a local address to a socket
listen() - puts a socket in a passive mode
accept() - accepts a connection on a socket
connect() - initiates a connection on a socket
Q3. diff between hashtable and concurrent hash map
Hashtable is not thread-safe while ConcurrentHashmap is thread-safe.
Hashtable is a legacy class while ConcurrentHashmap is a modern class.
Hashtable uses synchronized methods while ConcurrentHashmap uses lock striping.
ConcurrentHashmap allows multiple threads to read and write concurrently.
Hashtable is slower than ConcurrentHashmap in multi-threaded environments.
Q4. Coding questions - implement find function for a string in c++.
Implement find function for a string in C++.
Use the find() function from the string class in C++ to search for a substring within a string.
The find() function returns the position of the first occurrence of the substring, or string::npos if not found.
Example: string str = 'hello world'; int pos = str.find('world');
Q5. Handshaking mechanism in TCP communication
Handshaking mechanism in TCP communication is a process of establishing and terminating a connection between two devices.
TCP uses a three-way handshake mechanism to establish a connection.
The three steps involved in the handshake are SYN, SYN-ACK, and ACK.
During the handshake, the devices exchange information about the initial sequence numbers, window sizes, and other parameters.
The handshake ensures that both devices are ready to communicate and establishes a reliable connec...read more
Q6. Scenario based questions Realtime example of Oops
Realtime example of OOPs is modeling a car as an object with properties and methods.
Create a Car class with properties like make, model, year, and methods like start, accelerate, brake.
Instantiate multiple Car objects with different properties and call their methods.
Demonstrate inheritance by creating a subclass ElectricCar with additional properties and methods.
Q7. diff bet Sorting and ordering
Sorting is arranging data in a specific order based on a criteria, while ordering is arranging data in ascending or descending order.
Sorting involves arranging data based on a specific criteria such as alphabetical order, numerical order, or date order.
Ordering involves arranging data in either ascending or descending order based on a default criteria such as alphabetical order or numerical order.
Sorting can be customized to meet specific needs, while ordering is usually a de...read more
Interview Process at Hindustan Adhesives
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month