Company: HCL Technologies

1) Here is the structure declaration of a doubly
linked list
struct dlink {
int nodeid;
struct dlink *next;
struct dlink *prev;
} dlink_t;
A pointer of the head of the linked list is maintained
as a global variable,
whose definition is
dlink_t *head;
The funtion remove_element(dlink_t *rp), needs to
remove the node pointed to
the rp and adjust the head.
The first node’s prev and the last node’s next are
remove_element(dlink_t *rp)
rp->prev->next = rp->next;
rp->next->prev = rp->prev;
if( head == rp)
head = rp->next;
Which of the following statement is true about the
function remove_element
A) It work when head is the same as rp
B) It does not work when rp is the last element on the
c) It sets the head of the list correctly
D) It works in all cases
Answer :B

2) Consider the following function written in c:
#define NULL 0
char *
register char *sp,c;
do {
if(*sp == c)
return (sp);
} while (*sp++);
return NULL;
The first argument sp, is a pointer to a C string. The
argument, c, is a character. This function scarches
for the character
c, in the string. If it is found a pointer to that
location is returned
else NULL is returned.
This function works
a) Always
b) Always, but fails when the first byte contais the
character c
c) works when c is a non NULL character only
d) Works only when the character c is found in the
answer: a

03) What is printed when this program is executed
printf (“%dn”,f(7));
if (x<= 4) return x; return f(--x); } a) 4 b) 5 c) 6 d) 7 answer: a 04) On a machine where pointers are 4 bytes long, what happens when the following code is executed. main() { int x=0,*p=0; x++; p++; printf ("%d and %dn",x,p); } a) 1 and 1 is printed b) 1 and 4 is printed c) 4 and 4 is printed d) causes an exception 05) Which of the following is the correct code for strcpy, that is used to copy the contents from src to dest? a) strcpy (char *dst,char *src) { while (*src) *dst++ = *src++; } b) strcpy (char *dst,char *src) { while(*dst++ = *src++) } c) strcpy (char *dst,char *src) { while(*src) { *dst = *src; dst++; src++; } } d) strcpy(char *dst, char *src) { while(*++dst = *++src); } answer:b 6) Consider the following program main() { int i=20,*j=&i; f1(j); *j+=10; f2(j); printf("%d and %d",i,*j); } f1(k) int *k; { *k +=15; } f2(x) int *x; { int m=*x,*n=&m; *n += 10; } The values printed by the program will be a) 20 and 55 b) 20 and 45 c) 45 and 45 d) 45 and 55 e) 35 and 35 7) what is printed when the following program is compiled and executed? func (int x) { if (x<=0) return(1); return func(x -1) +x; } main() { printf("%dn",func(5)); } a) 12 b) 16 c) 15 d) 11 08) COnsider the following of c code in two files which will be linked together and executed . a.c ___ int i; main() { i = 30; f1(); printf("%dn",i) } b.c ___ static int f1() { i+=10; } which of the following is true ? a) a.c will fail in compilation phase because f1() is not declared b) b.c will fail in compilation because the variable i is not declared c) will print 30 d) will print 40 e) a & b answer: e 9) Consider the following prg void funca (int *k) { *k += 20 } void funcb (int *x) { int m=*x,*n = &m; *n+=10; } main() { int var = 25,*varp=&var; funca(varp); *varp += 10; funcb(varp); printf ("%d and %dn",var,*varp); } The values printed when the above prg is complied and executed are: a) 20 and 55 b) 20 and 45 c) 45 and 55 d) 55 and 55 e) 35 and 35 answer: d 10) consider the following program: # include class x { public: int a; x(); }; x::x() { a=10; cout<< q if 10) d ans: min 20 hr 3 e) 30 d) 2 c) 53 1 b) 26 a) units? n produce to alone V take it would long how hours. in units time, same the at but independently workers W, and Workers 5 produces W Worker 9) b answer: 10^10 2(10)^8 10^8 2(10)^6 2(10)^4 10^4 10^2(10^8+10^8)="--------------" 8) -1 -11 0 11 a+b ----="c" - ----- c then a="20;" 7) 150 240 360 600 900 min.? 6 make machine can copies many How rate, this At seconds. 4 every 10 prototyping HCL 6) Answer: 7 8 ? represent E does digit what -------------- A B C D X holds: multiplication following that 9 between digits of one each A,B,C,D,E 5)Given answer:d 13112 13541 14256 14153 12455 radix correspond E78 number hex What 04) things picture wrong present sometimes Statistics abilties. women?s about are chauvinists Men than cautiously more drive Certainly Women frequently drivers better actually anything conclude there not is information sufficiently concluded be may Hence drivers. women accidents involved men indicate 03) M Y given from determined cann?t It amounts? these ordering correct Which respectively, M,D,Y Mohan,Deep,Yogesh by earned amounts If deep. as much half rs.3 Yogesh Deep. twice Mohan 2) S Cann?t R Q P murderer? who murderer, them false statement above only Assuming murderer?. ?R s: murder?. commit didn?t ?Q r: time with cards playing was ?I q: theatre gone had p: They statement. makes Each P,Q,R,S. suspects four case murder In 1) Section Aptitude General IV 1020 2010 prg? output will } temp; { () main cout< 0 and k = qr -s, then what is r in terms of k,q,s? a) 2k+s ---- q b) 2sk ---- q c) 2(k-s) ----- q d) 2k+sq ----- q e) 2(k+s) ------ q answer: e 11-15 is the reasoning Questions: Occurs and Causes available in Six knights - P,Q,R,S,T and U - assemble for a long journey in two travelling parties. For security, each travelling party consists of at least two knights. The two parties travel by separate routes, northern and southern. After one month, the routes of the northern and southern groups converge for a brief time and at that point the knights can, if they wish, rearrange their travelling parties before continuing, again in two parties along separate northern and southern routes. Throughout the entire trip, the composition of travelling parties must be in accord with the following conditions P and R are deadly enemies and, although they may meet briefly,can never travel together. p must travel in the same party with s Q cann't travel by the southern route U cann't change routes 16) If one of the two parties of knights consists of P and U and two other knights and travels by the southern route, the other members of this party besides P and U must be a) Q and S b) Q and T c) R and S d) R and T e) S and T answer: e 17) If each of the two parties of knights consists of exactly three members, which of the following is not a possible travelling party and route? a) P,S,U by the northern route b) P,S,T by the northern route c) P,S,T by the southern route d) P,S,U by the southern route e) Q,R,T by the southern route ans: b 18) If one of the two parties of knights consists of U and two other knights and travels by the northern route, the other memnbers of this party besides U must be a) P and S b) P and T c) Q and R d) Q and T e) R and T answer: c 19) If each of the two parties of knights consists of exactly three members of different parties, and R travels by the northern route, then T must travel by the a) southern route with P and S b) southern route with Q and R c) southern route with R and U d) northern route with Q and R e) northern route with R and U answer: a 20) If, when the two parties of knights encounter one another after a month, exactly one knight changes from one travelling party to the other travelling party, that knight must be a) P b) Q c) R d) S e) T answer: e HCL TECH interview qp Technical interview is held for 30 min to 1 hr 20min depending upon the stuff. Concentrated areas are 1) OS Concepts 2) C Programming skill 3) OOPs concepts 4) Basics of Networking 5) Data structures Only basic QP like 1) What is fragmentation? How do overcome? 2) What is semaphore? 3) What are the IPC Mechanism available? Illustrate with example 4) What is structure and union in c? write the code and explain how they are storing in the memory? 5) They will ask to write one c program ? 6) Explain the data struture (code) for the data structures i) Double linklist ii) Minimum spanning tree iii) BFS and DFS iv) AVL tree v) Reverse the linklist 7) Difference between malloc and calloc? 8) write a prg in macro in c? 9) Write a simple MFC program to create a window? (They aaked me write a prg to create a window) 10) Tell about the existing scheduling algorithm? 11) what are all E.F.Codd rule? 12) what is bit slice processor? 13) what is a deadlock? explain it? 14) what is virtual memory? 15) what is circuit switching and packet switching 16) What is the significance of friend keyword in C++? 17) Different types of inheritance? 18) do u want to ask anything from us? HR interview This ranges from 20 min to 45 min. They expecting ur i) Focussing towards the technology ii) Adaptability iii) Family Background iv) Team spirit i) Tell abt yourself? ii) what are all ur hobbies? iii)why did u prefer your area of interest? iv) why did u wanna be in HCL? v) why did u choose MCA? vi) howz interview is going on? vii) Some general technical qp from ur area of interest? viii) how'll u react if u r assigned in the non area of interest? (adaptability) ix) how're getting information abt the company? (weightage is given to communciating with the seniors) x) In which project do u want to work in HCL? xi) do u want to ask anything from us? There'll be no HR interview for some shortlisted candidates. 70+ and no current arrear is the criteria. The shortlisted student should have more than 73%. Aptitude Setion I ( 25 ques 30 mins apttitude type) 1. There were four questions based on the data . 5.Five students has appeared for the test on Calculus.The lowest possible score was 0, and the highest score was 100.aparna ,rahul rohit,shijit, and shana.Shahana got 8 more marks than Aparna, Shigit got 2 more marks than aparna, rohit got 3/2 of rohit or 10 more than aaparna.The second highest score was 89.What were the score of each students. 6.A+B=C+D;A+C=B+D ;2A>B+D;2CB>C>D> etc and all.
7.MBC=(BE)2; where M,B,C,E represent different numbers What does M
8.There was a question on number series.
20 ? 15
0 18 11

Five questions were on data sufficiencies all of them I can^Òt recall
the ones can remember I have written them.
A) The first condition is sufficient and the second condition is not
B) The second condition is sufficient and the first condition is not
C) Both the conditions are necessary but alone is not sufficient
D) Both the conds. Are necessary and any one alone is sufficient
E) Insufficient conditions
10.X =Y;
a)X2-Y2=0 is the sufficient conditions
b)X-Y =0 is the sufficient condition
11.28 bananas and 35 orange scost Rs 84.After a deduction of 10 % Rs 12 can
buy 4 bananas and 5 oranges.Find the cost of each items.
12 The distance between two pts is 335 kms.A car starts from a point
A towards B with a speed of 65 km/hr at 8.00 am.Another car started from B
towards A at 9.00 am at a speed of 70km/hr.When will they meet each other.
a)11.00 am(ans) b)11.30am c)12.00 pm d)1.00 pm e)10.30 am A,B,C,D,E are travelling in a car.Three of them are drivers.there is
one couple,B is wife of D and is a Driver. A is the brother of D .Of them
only one lady can drive.A drove for a while followed by A and then by E.

24.Which among of the following pairs are brothers,

25.Which is the other lady present there?
a)B b)A c)D d)C(ans) e)E
Four question were based on the logical reasining.given below:
There are six inverted cups below which there are one ball each under
each cup.colored by solid colours.-red,orange ,magenta,purple,yellow,green.The
arrangements was such that one can tell which ball is under a particular
cup.The green ball was under the 5thcup,The purple ball at a number lower than the orange ball.the red ball
and magenta ball are kept side by side.

16.Find the arrangement of the balls
(I don^Òt remember the other options but the correct pattern
consisits of green and orange at the last)

17.Which ball is under the 6th cup?

21.In a clock how many times does the hands of a clock are at right angle in a day?
Ans(44 times)

23.A man said to a woman ^ÓYour brother^Òs son^Òs sister is my wife^Ô
What is the relation between the man and the lady?
Those who qualified from section I were shortlisted to sit for the second test
on techinal questions.The second test consists of two parts Section I consists
of Only Operating system and the Section II consists of only Cand C++ fundamentals I got HCL full paper. I am mailing it. The quetions are in order.
So you no need to prepare answers and mugging that quetions. Just Jyou mug that answers which are in order or you write all these
answers on the hand compactly while you are going to exam.