Add office photos
L&T Technology Services logo
Employer?
Claim Account for FREE

L&T Technology Services

3.3
based on 4.9k Reviews
Video summary
Filter interviews by
C Developer
Clear (1)

L&T Technology Services C Developer Interview Questions and Answers

Updated 5 Feb 2024
Q1. What is the difference between a structure and a union in C++?
Ans.

Structures in C++ allow for multiple data types to be grouped together, while unions share the same memory space for all members.

  • Structures in C++ can hold multiple data types, each with its own memory allocation.

  • Unions in C++ share the same memory space for all members, allowing only one member to be active at a time.

  • Structures are used when different types of data need to be stored together, while unions are used when only one type of data needs to be stored at a time.

Add your answer
right arrow
Q2. What is dynamic memory allocation in C?
Ans.

Dynamic memory allocation in C allows for allocating memory at runtime, enabling flexibility in memory usage.

  • Dynamic memory allocation is done using functions like malloc(), calloc(), realloc() in C.

  • It allows for allocating memory as needed during program execution.

  • Dynamic memory allocation helps in managing memory efficiently by allocating and deallocating memory as required.

  • Example: int *ptr = (int*)malloc(5 * sizeof(int)); // Allocates memory for an array of 5 integers

Add your answer
right arrow
Q3. Convert a value from Big Endian format to Little Endian format.
Ans.

To convert a value from Big Endian to Little Endian format, reverse the order of bytes.

  • Iterate through the bytes of the value in reverse order

  • Swap the positions of each byte to convert from Big Endian to Little Endian

  • Example: Big Endian value 0x12345678 becomes Little Endian value 0x78563412

Add your answer
right arrow
Q4. What is a zombie process?
Ans.

A zombie process is a process that has completed execution but still has an entry in the process table.

  • Zombie processes occur when a child process finishes execution before the parent process can collect its exit status.

  • Zombie processes consume system resources and should be cleaned up by the parent process using wait() or waitpid() system calls.

  • Zombie processes can be identified using tools like ps command in Unix/Linux systems.

  • Example: When a parent process forks a child pr...read more

Add your answer
right arrow
Discover L&T Technology Services interview dos and don'ts from real experiences

Q5. 3. Write a class to debit, credit and balance check functionalities

Ans.

A class for debit, credit and balance check functionalities

  • Create a class with member variables for balance

  • Add member functions for debit, credit and balance check

  • Ensure proper validation and error handling

  • Consider using exception handling for errors

Add your answer
right arrow
Q6. What is IPC?
Ans.

IPC stands for Inter-Process Communication, which allows processes to communicate and share data with each other.

  • IPC enables processes to exchange data and information with each other.

  • Common IPC mechanisms include pipes, message queues, shared memory, and sockets.

  • Examples of IPC usage include communication between a parent and child process, or between different processes on a network.

Add your answer
right arrow

Q7. How to add external API to project

Ans.

To add an external API to a project, you need to first obtain the API documentation and credentials.

  • Obtain API documentation and credentials

  • Integrate API into project using appropriate libraries or frameworks

  • Test API functionality and handle errors appropriately

Add your answer
right arrow

Q8. Explain Abstract design pattern.

Ans.

Abstract design pattern is a way to define a blueprint for a group of objects with common characteristics.

  • It allows creating objects without specifying their concrete classes.

  • It promotes loose coupling between classes.

  • It is implemented using abstract classes and interfaces.

  • Example: Shape is an abstract class and Circle, Square, Triangle are its concrete subclasses.

  • Example: JDBC API uses abstract classes and interfaces to provide a common interface for different database vendo...read more

Add your answer
right arrow

Q9. 2. Convert string to integer.

Ans.

Convert string to integer in C++.

  • Use stoi() function to convert string to integer.

  • Include header file.

  • stoi() function throws an exception if the string is not a valid integer.

  • Use stol() or stoll() for long integers.

  • Use atoi() for C-style strings.

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top C Developer Interview Questions from Similar Companies

HCLTech Logo
3.5
 • 12 Interview Questions
View all
Recently Viewed
INTERVIEWS
Virtusa Consulting Services
No Interviews
INTERVIEWS
Virtusa Consulting Services
No Interviews
INTERVIEWS
Virtusa Consulting Services
No Interviews
INTERVIEWS
L&T Technology Services
No Interviews
INTERVIEWS
Ujjivan Small Finance Bank
No Interviews
INTERVIEWS
Virtusa Consulting Services
No Interviews
INTERVIEWS
L&T Technology Services
No Interviews
INTERVIEWS
L&T Technology Services
No Interviews
INTERVIEWS
L&T Technology Services
300 top interview questions
SALARIES
Sutherland Global Services
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 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