HCL previously asked technical question

HCL previously asked technical question and answers.HCL Candidate experience with question and answers -HCL Placement papers

 

Over the past decade, HCL has been one of the fastest growing technology companies not only in India but in the world. Here are some of the questions asked in one of the recent recruitment drives conducted by HCL.
There is an online test which covers the following.
Technical papers included subjects like c,c++ and data structure.
C programming Questions:
1.   int a = 3;
int b = 31;
int c = 10;
double z =  b / c % a;
printf(“%f\n”, z);
a. -1
b. 1
c. 0
d. 3

Answer – c

2. The subscript of the first element of an array is 0.

  1. True
  2. False

Answer – True

3. The machine registers are also called

  1. Global variables
  2. Local variables
  3. constants
  4. Static variables

Answer – b

4. What will be output of following code
main()
{
int i=1;
printf(“%d%d%d”,i,++i,i++);
}

a. 1 2 2
b. 2 2 1
c. 1 3 3
d. 3 3 1

Answer – d

5. When do we get segmentation fault error?

a. Accessing an array out of its bounds
b. Trying to modify a read-only location
c. Dereferencing an uninitialized pointer
d. All of the above

Answer – d

Data structure Questions:

1. Which of the following operations are dependent on the length of the linked list if there are pointers to first and last nodes of a single linked list?

a. Delete the first element
b. Insert a new element as a first element
c. Delete the last element of the list
d. Add a new element at the end of the list

Answer – c

2. Key value pair is seen in

a.Hash tables
b.Heaps
c.Both a and b
d.None above

Answer – a

Leave a Reply0