i
HCLTech
Work with us
Filter interviews by
Use sorting to find the nth largest number in a jumbled array.
Sort the array in descending order.
Access the nth element in the sorted array to find the nth largest number.
Structure is a collection of variables of different data types while union is a collection of variables of same data type.
Structure allocates memory for all its variables while union allocates memory for only one variable at a time.
Structure is used when we want to store different types of data while union is used when we want to store only one type of data at a time.
Structure is accessed using dot (.) operator wh...
Program to find factorial of a number
Use a loop to multiply the number with all the numbers less than it
Handle the case when the number is 0 or 1 separately
Use recursion to find factorial of a number
Recursion is a process where a function calls itself until a base condition is met.
Recursion involves breaking down a problem into smaller subproblems and solving them recursively
It requires a base case to stop the recursion and prevent infinite looping
Example: Factorial function - n! = n * (n-1)!, where the function calls itself with n-1 until n=1
It is not possible to enter if and else at the same time in a programming language.
If and else are conditional statements that are mutually exclusive.
They are used to execute different blocks of code based on a condition.
To execute multiple blocks of code simultaneously, you can use nested if-else statements or logical operators.
The volatile keyword in C/C++ indicates that a variable may change unexpectedly, preventing compiler optimizations.
Used for variables that can be changed by external factors, like hardware or interrupts.
Prevents the compiler from optimizing code that accesses the variable, ensuring it reads the latest value.
Example: 'volatile int sensorValue;' for a variable updated by an interrupt service routine.
Commonly used in...
Different types of pointers, volatile variable, storage classes, Static and extern keywords, ISR
Pointers: Null pointer, void pointer, function pointer
Volatile variable: Used to indicate that a variable may be changed by external factors
Storage classes: auto, register, static, extern
Static keyword: Used to declare variables that are only accessible within the same file
Extern keyword: Used to declare variables that ...
Storage classes in C define the scope and lifetime of variables.
There are four storage classes in C: auto, register, static, and extern.
Auto variables are stored in the stack and have local scope.
Register variables are stored in CPU registers for faster access.
Static variables retain their value between function calls.
Extern variables are declared in one file and can be accessed in another file.
C programming memory structure involves stack, heap, data, and code segments.
Stack: Used for local variables and function call management.
Heap: Used for dynamic memory allocation.
Data: Contains global and static variables.
Code: Contains the program's executable code.
I applied via Recruitment Consulltant and was interviewed in Oct 2024. There were 2 interview rounds.
Blinking an LED using bare metal code involves directly manipulating hardware registers without an operating system.
Access the GPIO register for the specific pin connected to the LED
Set the pin as an output
Toggle the pin state at regular intervals to create the blinking effect
Different types of pointers, volatile variable, storage classes, Static and extern keywords, ISR
Pointers: Null pointer, void pointer, function pointer
Volatile variable: Used to indicate that a variable may be changed by external factors
Storage classes: auto, register, static, extern
Static keyword: Used to declare variables that are only accessible within the same file
Extern keyword: Used to declare variables that are d...
Use sorting to find the nth largest number in a jumbled array.
Sort the array in descending order.
Access the nth element in the sorted array to find the nth largest number.
I chose HCl for its versatility and effectiveness in various applications.
HCl is commonly used in industries such as pharmaceuticals, food processing, and chemical manufacturing.
It is a strong acid that can be used for pH control, cleaning, and as a catalyst in chemical reactions.
HCl is also used in the production of PVC, fertilizers, and dyes.
Its ability to dissolve metals makes it useful in metal cleaning and etching...
C programming memory structure involves stack, heap, data, and code segments.
Stack: Used for local variables and function call management.
Heap: Used for dynamic memory allocation.
Data: Contains global and static variables.
Code: Contains the program's executable code.
Storage classes in C define the scope and lifetime of variables.
There are four storage classes in C: auto, register, static, and extern.
Auto variables are stored in the stack and have local scope.
Register variables are stored in CPU registers for faster access.
Static variables retain their value between function calls.
Extern variables are declared in one file and can be accessed in another file.
I applied via Recruitment Consulltant and was interviewed before Nov 2022. There were 2 interview rounds.
I applied via Recruitment Consultant and was interviewed in Aug 2021. There were 3 interview rounds.
The volatile keyword in C/C++ indicates that a variable may change unexpectedly, preventing compiler optimizations.
Used for variables that can be changed by external factors, like hardware or interrupts.
Prevents the compiler from optimizing code that accesses the variable, ensuring it reads the latest value.
Example: 'volatile int sensorValue;' for a variable updated by an interrupt service routine.
Commonly used in embe...
Structure is a collection of variables of different data types while union is a collection of variables of same data type.
Structure allocates memory for all its variables while union allocates memory for only one variable at a time.
Structure is used when we want to store different types of data while union is used when we want to store only one type of data at a time.
Structure is accessed using dot (.) operator while u...
It is not possible to enter if and else at the same time in a programming language.
If and else are conditional statements that are mutually exclusive.
They are used to execute different blocks of code based on a condition.
To execute multiple blocks of code simultaneously, you can use nested if-else statements or logical operators.
Program to find factorial of a number
Use a loop to multiply the number with all the numbers less than it
Handle the case when the number is 0 or 1 separately
Use recursion to find factorial of a number
I applied via Naukri.com and was interviewed in Feb 2021. There were 3 interview rounds.
I applied via Naukri.com and was interviewed in Dec 2019. There were 5 interview rounds.
What people are saying about HCLTech
I applied via Naukri.com and was interviewed in Nov 2019. There were 3 interview rounds.
I'm seeking new challenges and opportunities for growth that align with my career goals and aspirations.
Desire for professional growth: I'm looking to expand my skill set and take on more leadership responsibilities.
Seeking a better cultural fit: My current company has a different work culture than what I thrive in; I value collaboration and innovation.
Interest in new technologies: I'm excited about working with cuttin...
I applied via Recruitment Consulltant and was interviewed before Apr 2021. There were 3 interview rounds.
Standard Aptitude questions
Based on strings and array
based on 5 interview experiences
Difficulty level
Duration
based on 19 reviews
Rating in categories
Software Engineer
24.9k
salaries
| ₹2.7 L/yr - ₹8.1 L/yr |
Technical Lead
22.8k
salaries
| ₹10.9 L/yr - ₹21 L/yr |
Senior Software Engineer
16.8k
salaries
| ₹5.7 L/yr - ₹15.5 L/yr |
Lead Engineer
16.4k
salaries
| ₹5.3 L/yr - ₹12.5 L/yr |
Analyst
15.8k
salaries
| ₹2.3 L/yr - ₹6.5 L/yr |
TCS
Wipro
Accenture
Cognizant