2023 2024 Student Forum > Management Forum > Main Forum

 
  #2  
3rd December 2014, 12:02 PM
Super Moderator
 
Join Date: Apr 2013
Re: HCL Written Test Paper

As you want I am here providing you the Written Test Paper of the HCL placement.

Sample HCL Placement paper:
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.


True
False


Answer – True

3. The machine registers are also called

Global variables
Local variables
constants
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


Quick Reply
Your Username: Click here to log in

Message:
Options

Thread Tools Search this Thread



All times are GMT +5. The time now is 03:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
SEO by vBSEO 3.6.0 PL2

1 2 3 4