L&T Technology Services Ltd interview experience Real time questions & tips from candidates to crack your interview

C++ Developer

L&T Technology Services Ltd
upvote
share-icon
1 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: C, C++, OS, DBMS, Data Structures, Algorithms, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Other
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date7 Oct 2021
Coding problem5

Technical Interview round with questions on Core C concepts, OS mainly.

1. C++ Question

Difference between structure and union

Problem approach

The struct keyword is used to define a structure. The union keyword is used to define union.
When the variables are declared in a structure, the compiler allocates memory to each variables member. The size of a structure is equal or greater to the sum of the sizes of each data member. When the variable is declared in the union, the compiler allocates memory to the largest size variable member. The size of a union is equal to the size of its largest data member size.
Each variable member occupied a unique memory space in a struct. In a union, variables members share the memory space of the largest size variable.
Changing the value of a member in struct will not affect other variables members. In a union, changing the value of one member will also affect other variables members.
Each variable member will be assessed at a time in a struct. In a union, only one variable member will be assessed at a time.
We can initialize multiple variables of a structure at a time. In union, only the first data member can be initialized.

2. C Question

What is dynamic memory allocation in C?

Problem approach

Dynamic Memory Allocation is a process in which we allocate or deallocate a block of memory during the run-time of a program. There are four functions malloc(), calloc(), realloc() and free() present in header file that are used for Dynamic Memory Allocation in our system. It can also be referred to as a procedure to use Heap Memory in which we can vary the size of a variable or Data Structure (such as an Array) during the lifetime of a program using the library functions.

3. Operating System Question

What is a zombie process?

Problem approach

A zombie process is a process whose execution is completed but it still has an entry in the process table. Zombie processes usually occur for child processes, as the parent process still needs to read its child’s exit status. Once this is done using the wait system call, the zombie process is eliminated from the process table. This is known as reaping the zombie process.

4. C Question

Convert Big Endian to Little Endian

Problem approach
#include<stdio.h>
using namespace std;

//! Byte swap unsigned short
uint16_t swap_uint16( uint16_t val ) 
{
return (val << 8) | (val >> 8 );
}

//! Byte swap short
int16_t swap_int16( int16_t val ) 
{
return (val << 8) | ((val >> 8) & 0xFF);
}

//! Byte swap unsigned int
uint32_t swap_uint32( uint32_t val )
{
val = ((val << 8) & 0xFF00FF00 ) | ((val >> 8) & 0xFF00FF ); 
return (val << 16) | (val >> 16);
}

//! Byte swap int
int32_t swap_int32( int32_t val )
{
val = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF ); 
return (val << 16) | ((val >> 16) & 0xFFFF);
}

5. Operating System Question

What is IPC?

Problem approach

Inter-process communication (IPC) is a mechanism that allows processes to communicate with each other and synchronize their actions. The communication between these processes can be seen as a method of co-operation between them. Processes can communicate with each other through both:
Shared Memory
Message passing

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4898 views
0 comments
0 upvotes
company logo
Graduate Engineer Trainee
3 rounds | 10 problems
Interviewed by L&T Technology Services Ltd
1217 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6638 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3638 views
0 comments
0 upvotes