HCL Solved Placement Papers
Sample HCL Technical Questions With Answers
HCL placement papers generally give substancial weightage to technical questions, especially from C and basic computer science related concepts. A good knowledge in C is very important and can help you a lot in acheiving your dream.
Sample HCL Freshers Placement Questions
Below let us see some important sample HCL questions for you to practice.
HCL Sample Questions - Solved
1) The letters P, Q, R, S, T, U and V, not necessarily in that order represents seven
consecutive integers from 22 to 33.
• U is as much less than Q as R is greater than S.
• V is greater than U.
• Q is the middle term.
• P is 3 greater than S.
Can you find the sequence of letters from the lowest value to the highest value?
HCL Solved Aptitude Paper
1) At University of Probability, there are 375 freshmen, 293 sophomores, 187 juniors, & 126 seniors. One student will randomly be chosen to receive an award.
What percent chance is there that it will be a junior? Round to the nearest whole percent.
Answer
19%
HCL Solved placement Papers - C Questions
1) e(int n)
{
if(n>0)
{
(not clear)
printf("%d",n);
e(--n);
}
return
}
HCL Solved placement Papers - DBMS Concept - part 2
1) Atomicity is _____
a)Either all actions are carried out or none are. Users should not have to worry about the effect of incomplete transactions. DBMS ensures this by undoing the actions of incomplete transactions.
HCL Solved Questions - DBMS Concept - part 1
1) ______ is copying the three sets of files (database files, redo logs, and control file) when the instance is shut down. This is a straight file copy, usually from the disk directly
to tape. You must shut down the instance to guarantee a consistent copy.
a) cold backup
b) hot backup
c) Armstrong Rules
HCL Solved placement Papers - C questions - part 2
Here are some solved questions from HCL Placement Papers
1) #include<stdio.h>
main()
{
struct xx
{
int x=3;
char name[]="hello";
};
struct xx *s=malloc(sizeof(struct xx));
printf("%d",s->x);
printf("%s",s->name);
}
Answer:
Compiler Error
Explanation:
Initialization should not be done for structure members inside the structure declaration
2) main()
{
int *j;
{
int i=10;
j=&i;
}
printf("%d",*j);
}
Answer:
10
Explanation:
The variable i is a block level variable and the visibility is inside that block only. But the lifetime of i is lifetime of the function so it lives upto the exit of main
function. Since the i is still allocated space, *j prints the value stored in i since j points i.
3) int i,j;
for(i=0;i<=10;i++)
{
j+=5;
assert(i<5);
}
Answer:
Runtime error: Abnormal program termination. assert failed (i<5), ,
Explanation:
asserts are used during debugging to make sure that certain conditions are satisfied. If assertion fails, the program will terminate reporting the same. After debugging use,
#undef NDEBUG and this will disable all the assertions from the source code. Assertion is a good debugging tool to make use of..
4) main()
{
int i;
printf("%d",scanf("%d",&i)); // value 10 is given as input here
}
Answer:
1
Explanation:
Scanf returns number of items successfully read and not 1/0. Here 10
is given as input which should have been scanned successfully. So
number of items read is 1.
HCL Solved placement Papers - C questions - part 1
1) main()
{
static char names[5][20]={"pascal","ada","cobol","fortran","perl"};
int i;
char *t;
t=names[3];
names[3]=names[4];
names[4]=t;
for (i=0;i<=4;i++)
printf("%s",names[i]);
}
Answer:
HCL Placement Papers - Quantitive Aptitude
1) A man can row 5 kmph in still water. If the river is running at 1kmph, it takes him 75 minutes to row to a place and back. How far is the place?
(i) 3km
(ii) 2.5 km
(iii) 4 km
(iv) 5 km
Solution:
HCL Solved placement Papers - averages - part 2
1) The average weight of a class of 30 students is 40 kgs. If the teacher's weight is included then average increases by 2 kgs. Find the weight of the teacher?
a) 102
b) 100
c) 98
Answer is 102


