Interview Questions.

HCL Interview Questions


HCL Interview Questions

HCL interviews may be thru campus, employee referrals and different sources like placement groups, newspaper or on line commercials etc… Whatever is the supply, it takes about 2 weeks for the complete method to be over. Generally, while you observe, a person from their HR department calls you and schedules a telephonic interview.

Telephonic interview is a general one where a pre-determined set of simple questions are requested based on what you have stated for your resume. For instance, if you have mentioned HTML for your resume, they may ask you “What are HTML tags?” or when you have noted SQL, they might ask you “what is DBMS?”

HCL Interview Questions

Telephonic interview is like a screening spherical for the primary interview.

Once you clean the telephonic round, you will be known as for head to head interview. They count on you to be on time, well dressed and appearance presentable.

The interview may be three-four rounds relying upon the process name and customer necessities. The rounds can be –

Technical spherical 1

Technical round 2 (not usually)

HR round

Client interview round

The remaining one will be conducted if you are going to be decided on for a particular assignment.

The interview is straightforward and the interviewers are pleasant. They begin with the technical questions as soon as the primary pleasantries are exchanged, with out losing time with private questions (that’s the overall enjoy, your enjoy might be exclusive).

If you're a fresher, the interview may be based to your fundamental programming expertise like C, C++, Java, .NET, OOPS standards. The interviewers can also ask you approximately your final 12 months initiatives. If you are an skilled candidate, most of the questions could be out of your resume and former paintings experience – as an instance, Java, .NET, Python, SQL, HTML, Cloud and so forth. They may ask you a few questions on technology you could not have referred to – but that might be simply to make you a touch uncomfortable. Don’t be dissatisfied. Just say you do no longer recognize if you clearly do no longer!

The technical interview is an enriching experience and even in case you don’t get decided on, you'll research plenty. Here are a few generally asked questions that will let you crack the interview. Note that that is a comprehensive list of many interviews and no longer a single interview. Also, this is not an educational and if you want to study the basics about the subjects protected right here, go to our internet site which has masses of them for every subject matter!

Question: What are the basic OOPS concepts?

Answer: This is a commonplace query asked in an interview. You can give an explanation for in brief approximately inheritance, polymorphism, abstraction, and encapsulation. Watch this video to study all approximately OOPS.

Question: Name some languages that are based totally on OOPS standards.

Answer: C++, Java, Python, C# (you could point out any)

Question: How are you able to obtain more than one inheritance in Java?

Answer: Multiple inheritance isn't always feasible in Java through extending a couple of classes, however you can still implement as many interfaces as wanted.

Question: What are the unique working structures you've got labored with? Which one do you like most and why?

Answer: You can point out the ones you've got worked with – maximum probable Unix, Linux, and windows. You can point out few blessings of one in all them – for instance, Windows has a neat UI which allows you to truely see what’s occurring on the display while multitasking or Linux is speedy and green and so on.

Question: Can a class be very last?

Answer: Yes, magnificence may be very last. We can not create a subclass of a class this is final.

Question: Can a category be personal?

Answer: Only nested or internal instructions may be non-public because they may be accessed through the outer magnificence. A normal elegance cannot be very last due to the fact you cannot instantiate it (create object).

Question: What is Collection framework?

Answer: The series is used to shop and retrieve a collection of gadgets. Objects of a set can be easily modified, eliminated, searched, sorted, added and so forth… Some examples are List, Map, Set, and so on…

Tip – Unless requested for, don’t spend too much time answering a single question. For example, the above query. The interviewer will ask a observe-up question if needed.

Question: Can you give an explanation for how HashMap works?

Answer: Here you may begin with the fundamentals, but once in a while the interviewer might ask you about the internal operating of the collection (hashmap). In that case, you can have to write the code for the identical and show. Mention that hashmap works on the hashing precept (information structure).

When we call the get(key) approach, the hashcode method is referred to as and the hash price returned is then used to locate the bucket place of the key cost pairs which are stored as Entry gadgets. HashMap is not thread safe because it isn't always synchronized.

Question: What is the difference among Application context and bean manufacturing facility?

Answer: This is a very commonplace question requested approximately Spring framework. Spring framework presents  boxes for dependency injection – BeanFactory and Application Context. BeanFactory offers basic functions whereas Application Context can do greater and is function-wealthy. For actual-time applications, you must decide upon the latter. For example, to get the servlet context in a web application, we use WebApplicationContext which is a derivation of ApplicationContext. Same manner, software context supports internationalization (i18n).

Read this blog for extra spring interview questions.

Question: What is StringBuffer? How is it one-of-a-kind from String?

Answer: StringBuffer is a category used to create String gadgets that are modifiable. We can do plenty of string operations like concatenation, reversing, appending and so on... The use of StringBuffer elegance. String class is immutable while StringBuffer is mutable as we can carry out above operations on the same object. StringBuffer consumes much less memory than String and concatenation operations are quicker because the objects are stored in heap reminiscence.

Question: What is the distinction among hashtable and hashmap?


Hashmap is not thread-safe. We need to write

code to synchronize if we have to share the

hashmap between various threads.

Hashtable is thread-safe and synchronized.
Hashmap allows one null key and

multiple null values.

Hashtable does not allow null values.
Faster and preferred mode unless

synchronization is required.

It is slower since it is synchronized.

Question: Write a small software to opposite a string.

Answer: You can write the program in any language. Here I am displaying a C program which takes enter string from the person. In this system we are the usage of strrev method, if the interviewer says you need to write the program without the use of strrev, use while loop and a counter to test thru each detail of the string (char array).

With strrev

int main()
 char chrarr[100];
 printf("Enter the string \n");
 printf("Reverse of the entered string is \n%s\n", chrarr);
 return 0;

Without strrev approach 

 char str[100], revstr[100];
 int cbegin, cend, count = 0;
 printf("Enter the string \n");
 //till string array has not reached end
 while (str[count] != '\0')
 cend = count - 1;
 // for each element of the char array str
 for (cbegin = 0; cbegin < count; cbegin++) {
 // copy contents of str into revstr in the reverse order
 revstr[cbegin] = str[cend];
 revstr[cbegin] = '\0';
 printf("%s\n", r);

Question: Can you implement linked listing?

Answer: This is an advanced query. Yes, we are able to put into effect a related listing via the Node magnificence. You will need to provide an explanation for how you'll enforce three main functionalities in linked listing –

insertion at begin position

insertion at cease position

insertion at the desired role

You can test the precise implementation in this hyperlink.

Question: What are threads?

Answer: In any OS, there are multiple techniques happening on the same time. For example, you could be writing a file, taking note of songs and browsing stuff on IE all on the identical time. These approaches are divided into small execution gadgets known as threads that allow for parallel processing accordingly making your device rapid. Threads have their own reminiscence area and sources for execution. Different types of thread are – person threads and kernel threads.

Question: What is skip by means of reference? How is it special from skip through pointer?

Answer: To provide an explanation for approximately pass through reference, it is right to realize approximately skip by way of value and bypass by using pointer. You can analyze all of the three from this excellent and distinctive weblog.

Question: What is the distinction among overloading and overriding?

Answer: The principles are the same in every programming language based totally on OOPS.

Overriding a method or a variable means that you are using the same name and signature(parameters). The name should be same but the signature should be different.
Example –
class Animal{
 public void run(){
 System.out.println(“I can run!”);
class Cheetah extends Animal{
 public void run(){
 System.out.println(“I can run fast!”);


Example –
class Animal{
 public void run(){
 System.out.println(“I can run!”);
class Cheetah extends Animal{
 public void run(float speed){
 System.out.println(“I can run fast at ” + float + "km/h!");


It is a run-time concept because

the object that needs to be instantiated is

decided at run time.

Overloading is checked during compile time itself.

Question: What is a feature pointer?

Answer: Function pointer is a pointer to a feature. Function suggestions factor to code unlike the normal guidelines that point to data. Function pointers are very useful if you have to skip the cope with of a function to another function or to implement callback mechanism.

Question: Can you give an explanation for approximately virtual functions?

Answer: Virtual functions are used in C++ as member functions which might be declared (and possibly defined) in the base class and (re)defined by way of the derived elegance. That is, a virtual feature can be overridden via the derived magnificence with its own implementation.

Question: If you have got a class TestSample, what number of constructors can you create?

Answer:There is no limit set to the range of constructors that can be created. However, they must have a distinct set of parameters. For TestSample magnificence, absolutely, the default constructor TestSample() and another constructors with the member variables blanketed may be defined.

Question: What is input-output (I/O) in C++?

Answer: Input stream is used to get inputs from the console (consumer). Output circulation is used to display effects of a few operations to the console (or output tool). Iostream represents preferred enter output circulate in C++. It includes the techniques like cin, cout and so on…

Question: What is the static keyword?

Answer: Static key-word is used when we need greater than object to reuse the same value of a variable. If a static variable is declared internal a class, it will become the variable of the class and not the object. That is, we need now not create an example of the elegance to use the variable. Example –

class MathVariables{
public static float PIE = 3.14;

When we need to use the above, we can use it as –


Question: Explain the unique kinds of information in C or provide an explanation for the variations among primary and derived statistics types in C.

Answer: This is a not unusual query and it is higher you understand approximately it in detail. Here is an in depth article that explains all of the data sorts.

Question: How is a constant variable distinctive from a international variable?

Answer: Global variables may be modified and are reachable by all of the capabilities in a program. Constant variables have a hard and fast value that can not be changed during this system.

Question: What are postfix and prefix operators?

Answer: The operators ++ and -- can be used as pre or postfix. The distinction is in the end result. For example,

++i will first increment the counter after which carry out the following action while i++ will perform the subsequent action and then increment the cost of i.

Question: What are SQL joins? Which is your preferred join?

Answer: Joins are used to fetch records from extraordinary tables as a unmarried file the use of overseas keys and not unusual columns. You can mention your preferred as the only you're most familiar with. If you don’t recognize but, take a look at out this loose academic and find out which one you like most!

Question: Write a question to fetch only first 3 information from database.

Answer: Knowledge of this is crucial mainly if you need to get into the records technology subject. In Oracle, you can fetch the primary three records the usage of the rownum keyword as –

select * from (select * from student order by student_id) where rownum <=3;

Same way in MySQL, you can use the keyword limit as –

select * from student order by student_id limit 3

Know more about SQL Command

Question: What is the disadvantage of an indexed sequential file?

Answer: The main disadvantage is that as the number of records increase, the performance goes down and the indexed files have to be reorganized so that deleted records are no longer included. Also, indexed files consume a lot of disk space.

Question: Is it possible to overload a procedure in a package?

Answer: Yes, it is possible to overload a procedure inside a package.

Question: What are nested classes?

Answer: We can define a class inside another class in OOP language. The enclosed class is called a nested class. A nested class is like another member of the outer class and has the same access rights as other members of the class.

Question: What is cloud computing? How is it useful today?

Answer: In cloud computing, data is stored, processed and managed in a shared network of remote servers over the internet, rather than storing it in local machines or servers. This way data is distributed and hence secure. Cloud computing finds its use in most of the domains today like banking, finance, logistics, etc…

Question: Tell us about the different cloud computing service models.

Answer: Cloud computing service models can be categorized as –

IaaS (Infrastructure as a Service)

PaaS (Platform as a Service)

SaaS (Software as a Service)

FaaS (Function as a service)

Visit this Wikipedia link which is quite informative for learning service models.

Question: What is the difference between a private cloud and a public cloud? Which is better?

Answer: If you have some experience in the cloud or are applying for the specific position, answer this question, otherwise, you can say that you don’t know the answer. However, knowing the basics of cloud computing will help you in the long run.

In a private cloud, all the data is protected by a firewall and resides on the company’s (client’s) hosted data center. It is a highly secure but expensive option.

With a public cloud, the data remains with your cloud service provider and they take care of the maintenance and management of the data center. This reduces a lot of overhead of testing and deployment for the client.

Though it is less secure than private cloud, a public cloud is still preferred as it is less expensive.

Question: Do you know about BigData?

Answer: If you do not know right now, do not worry. It is just large volumes of data. The data that we get from various platforms today is complex and huge and for traditional software to analyse and process, interpreting something meaningful from the data is next to impossible. Because of this huge volume of information gathered over the internet, big data is useful to solve a range of business issues from machine learning, customer experience, predictive maintenance and so on. This article will give you some key information on big data.

Question: What is a foreign key?

Answer: Foreign key is a database column is used to link two tables. Most of the times, a foreign key of one table is the primary key of another table.

For example, employee_id could be the primary key of employee table and for rewards table, it could be the foreign key. If we want to fetch details of the employee who was awarded certain rewards, we can join the two tables using this key (employee_id) to get the complete information.

Question: What are access specifiers?

Answer: Access specifiers or modifiers define the access of a particular class, method or variable to the other parts of the application. There are mainly 3 access specifiers – public, private and protected.

A public keyword means the variable, function or class is available for any other part of code for use.

A private keyword is usually used for member variables and sometimes functions of a class. This would mean only the particular class can access them. An inner class can be private.

A protected keyword means derived classes can use the methods or variables. Additionally, in languages like Java, classes within the same package can access protected members.

Question: Tell us the main differences between abstract class and interface.

We implement interface using the ‘implements’ keyword We can extend abstract class using the ‘extend’ keyword
Many classes can implement interface Only one class can extend the abstract class
Interface does not have any data members or constructors Abstract class can have member variables and constructors
All the methods of interface are public Abstract class can specify the access –

private, public or protected for its members

Question: How can you initialize a global variable?

Answer: It depends on the language. You can take one language and give the example. For example, in C, you have to provide an initial value to the global variable during declaration. Further, they should be initialized to a constant value and not as a return value of a function. For example,

int sum = 10;
int average = findavg();
int findavg()
// some lines of code
int main(){
// some lines of code

While the global variable sum won’t give any issues, the compiler won’t be happy with the average variable because there is no constant value assigned to it.

Question: Have you used C with command-line arguments? How many maximum arguments can you pass?

Answer: C supports at least 127 arguments. There is no maximum limit.

Question: Can you write a program to find the sum of digits of a number?

int main() 
int number,sum=0,digit; 
printf("Enter the number:"); 
printf("Sum is=%d",sum); 
return 0; 

Apart from these technical questions, in addition they ask you a few flair and tale problems that are the standard ones –

You have a 5l and a 3l bucket. How could you degree 7l?

Finding the heavier ball out of 8 equal balls the usage of a weighing scale in 3 moves. How do you do it?

HR questions

HR questions are subjective. It is a direct indication of your personality and your solution can be exceptional from a person else’s and there can be a couple of correct answer. For instance, your leadership strategy might be distinctive from someone else, your methods of getting work done might be distinctive and so forth. Some common questions requested inside the interview are –

What are your strengths and weaknesses? / How do you overpower your weaknesses the use of your strengths?

Why do you need to enroll in our employer?

What are your long time and brief-time period desires? /What do you need to acquire in existence?

Are you willing to relocate?

What are your profits expectations?

What is the first-class thing you have got discovered in your preceding work enjoy/project revel in?

What are the characteristics you look for in a terrific leader?


Slightly distinctive from other corporations like Infosys and TCS, HCL questions are problematic and you'll want to be thorough in what you've got mentioned on your resume. You may want to read approximately trending technologies to understand the fundamentals, even if you have by no means worked on them. For instance, when you have labored at the AWS cloud, the interviewer may nevertheless ask you about Azure. Go with exact guidance and a advantageous attitude, you may honestly crack it!