hcl_tcs
-
Upload
jagdeep2727189 -
Category
Documents
-
view
224 -
download
0
Transcript of hcl_tcs
-
8/8/2019 hcl_tcs
1/73
sending hcl and tcs papers..1.HCL has two divisions a) technology division b)applicationdivision.if astudent opts for a) then he has to give 2 papers 1)aptitude(25questions) 2)technical(30 approx).if he opts for application fieldthen hehasto give onlyapti paper which is same as that of techni paper.
2.after the written results are declared thetechnology studentsare givenanother test of 15 minutes in which they have to writea C
program(reversingstring, reversing singly/doubly link list(FAVOURITE))and theninterview istaken.
3.if you have good command in comp s then opt for technology
paper.
4.in apti(for tech people) if you do 8-10 out of 25then it isonsafe side.
APTITUDE PAPER::::
question not in order.i dont remember all question.if you havetime practiceBARRON's analyttical ability.most q's from here.
1) BARRON section ANALYTICAL ABILITY page 396, practiceexcercisesquestion1-4(edition of my book 1998 check out).quest like thismiss
braun,mr white,
-
8/8/2019 hcl_tcs
2/73
miss green, mr parker etc.
2) BARRON section ANALYTICAL ABILITY page 401, practiceexcercisesquestion37-39(edition of my book 1998 check out). base ballteam,pitchers-craig,hook.
3) the closing of the resturant by Mr.X on SEPT 1 was
consideredanunfinancial one, as the weather remained unusuallyclear andsunnyfor another one month.
An author who criticizes the act of Mr. X would be proved wrongif thefollowing was true??ANS choice a) the weather did not usually remainedfine after SEPT1.
4) SUSAN works in a company who has restricted itsemployeesfromsmokingcigerrates in the canteen.As susan is the employee of thecompanyshe does notsmoke cigerrate in the canteen.
Which of the following unused phrases strengthens therules of thecompany??
ANS the employees normally do not do the work for which thecompany hasforbidden them to do.
-
8/8/2019 hcl_tcs
3/73
5) A q's on family relation was given like How manysons X has
I P is thedaughter of X
II somecondt.
III somecondt.ANS al I ,II, III together are not sufficient.
6)a q's in which a name KAPIL is given he visitsmanoj'shome.somecondtsgiven.ANS b)
7)A,B,C,D are the 4 plays which are organised startingfromtuesday.find theday on which C was played.in this 2 condt. will begiven asI.....................II....................
ANS both I and II
8)a quest on crypto graphy like
A B C DE F G H----------------------------..................... .is A=, find theother values.
practice these types of quest.
9)a question on race was given.hell lot of condts.finally theymake a team for 4*100 metres medaly.ANS E none of the above
10) a q's on profit and loss.(just brush up your concepts.)
-
8/8/2019 hcl_tcs
4/73
########THESE Q'S WORTH OF 14 or 15marks.sufficient.some of myfriends arealso compiling the papers i will send themalso.###############
@@@@@@@@@MUG!!!! UP THE QUESTIONS VERY WELL MOST OFthe ANS ARECORRECT.BUTYOU CAN VERIFY THEM IF TIME ALLOWS@@@@@@@@@@@
TECHNICAL:::::;(MANY Q's OF LAST YEAR WERE REPEATED INTECHNICALPART)
1). Piggy backing is a technique for
a) Flow control b) sequence c) Acknowledgement d)retransmition
ans: c piggy backing
2). The layer in the OST model handles terminalemulation
a) session b) application c) presentation d)transport
ans: b application
3) ans: a odd numbers of errors
4)Q. In signed magnitude notation what is theminimum valuethat can berepresented with 8 bits
a) -128 b) -255 c) -127 d) 0 ANS a)
5) c 20(no of address lines in 1MB of memory)
6) a 120(25 hz processor,what is the timetaken bytheinstr whichneeds 3 clock cycles)
-
8/8/2019 hcl_tcs
5/73
7) b synchronise the access(semaphores usedfor)
8) a system call(context switching is usedin)
9) b the operating system(mapping of virtual to
physical address)
10) a 177333(conversion of HEX "0xFEDB"inoctal)
11) d used as a network layer protocall innetwork andwindows(OLE)system
12) b has to be unique in the subnetwork(internetaddress)
13)Q. there is an employer table with key feilds asemployer no.datain everyn'th row are needed for a simple following queries
will getrequiredresults.
a) select A employe no. from employe A , where existsfromemploye Bwhere A employe no. >= B employe having (count(*) modn)=0
b) select employe no. from employe A, employe B whereA employe no. >= B employ no. grouply employe no.having(count(*)mod n=0 )c) both a& bd)none of the above
14)Q. type duplicates of a row in a table customer with nonuniform key
-
8/8/2019 hcl_tcs
6/73
feildcustomer no. you can see
a) delete from costomer where customer no. exists( select distinct customer no. from customer havingcount )
b) delete customer a where customer no. in(select customer b where custermer no. equal to bcustemor no.)and arowid >
b rowidc) delete customer a where custermor no. in( select customer no. from customer a, customer b )d) none of the above
15) which feature in ANSI C but not in JAVA.??ANSvariablearguments.
16)preprocessor does not do one of the following??ANStypechecking.
17) long int sizea) 4 bytes b) 2 bytes c) compiler dependent d) 8
bytes
ans: compiler dependent
18) x=2,y=6,z=6x=y==z;
printf(%d",x) ?ANS 1
19) class c : public A,publicBa)2 members in class a,b can have member functionswith samename.
b)2 members in class a,c can have member functionswith samename.c)bothd)none(ANS)
#######WHAT WILL BE THE I/O OF THE FOLLOWING############
20) main()
-
8/8/2019 hcl_tcs
7/73
{char *p;
p=malloc(10);free(p);
printf("%d",p);}ANS compilation error
21)a=(10,15) b=10,15what are the values of a & b in ANSI CANS 15,10
22)main(){int x=10,y=15,z=16;x=y==z;
printf("%d",x);ANS 0
23)f(n) f(x){if(x
-
8/8/2019 hcl_tcs
8/73
26)main(){int var =25,varp;varp=&var;varp p=10;fnc(varp);
printf("%d%d",var,varp);}ANS::55,55 (check this out)
27)#define VALUE 1+2main(){
printf("%d and %d\n",VALUE/VALUE,VALUE*3);}ANS:: 5,7
28)What is the value assigned to the variable a if bis 7a=b>8?b>1:b;ANS::3
29)the value of the following expr (2^3)+(a^a) is2^3+a^arequires value of aa) 1 b)2 c) 3 d) insufficient data
30) which of the following is not basic data type
ANS char*
31)the declaration of the variable does not result inone of thefollowingANS allocatrion of the storage space for the varable.
32)in C parameters are passed byANS:: value only.
33)2 variables cannot have the same name if they areANS:: in the same block.
34)a static funct. say s(),in as file f.c can beinvoked fromANS all functs. in f.c after the definitions of s.
35)macros and functions do not differ in the followingaspectsANS::variable no of arguments.
-
8/8/2019 hcl_tcs
9/73
36)one q's in which he will give some different formsof STRCPYfunction youwill have to find out which form is correct.
HCL Technologies****************
The written test contained 4 sections to be completedin 1 1/2hrs.
Section 1: General technical knowledge coveringseveral
branches.**********Topics -DBMS (2Queries),Networking,Java(1),C++(2),Architectureetc.
Section 2: Programming in C.**********Example:1) Why are arguments passed from right to left in a Cfunction?
& other general questions based on precedence andassociativity of operators,pointers,recursion etc.
2) What will be the output of the following program ?
main(){int i,a[10];
i = 5;a[5] = 10;a[6] = 9;a[7] = 8;a[8] = 0;a[i] = i++;
printf("%d %d",a[5],a[6]);}
-
8/8/2019 hcl_tcs
10/73
Section 3 :Program Analysis.**********In this section small blocks of code were given,for whichan account of errors was to be given and for the codesnotcontaining any error the output was to be given.
Section 4 : Analytical reasoning & Quantitativeability.**********The reasoning part consisted of some puzzles & thequantitativeability
part consisted of questions based on topics such asratio &
proporiton, profit & loss,simple interest,mensuration etc. GREtypequestions.
Interview Questions*******************
1. Family backgroud.
2. Do you have any other offer in hand ?
3. Suppose there are a few systems all connectedthrough sometechnique andare independent of each other. Each systemidentifies theother(s) byit's name but actually the name has to be mappedwith somelogical number.Devise a mechanism to implement it.
4. Suppose there is round robin scheduling in somemulti-processing environ-ment. There are only three processes in thesystem. First oneis to bealloted 25 % of the total CPU time, second one isto be given50 % of CPUtime and third one is to be given rest of the CPU
-
8/8/2019 hcl_tcs
11/73
time inthat order.Their is no other facility available at OS level.How willyou accomplishit ?
5. What is a B-tree ?
6. What are signals ?
7. What are interrupts ?
8. What is a tree ? Design a data-structure for tree.How wouldyou creat thefirst child of any node ? Write code for it ?
9. What are device files ?
10. What are major numbers and minor numbers ?
1. Comparison between WINDOWS 3.1 ,WINDOWS 95 andWINDOWS NT.>2. Compare WINDOWS 95, DOS and UNIX.>3. Network support in WINDOWS 95.>4. What do you mean by Network Operating System ?>5. Process creation in UNIX and WINDOWS.
>6. Multiprogramming, Multiprocessing and MultitaskingSystems.>7. Is DOS multitasking ?>8. What do you mean by printer buffer ?>9. Multiuser system, How you can make DOS multiuser ?>10. What is IPC ?>11. Define Critical Region.>12. What is semaphore and its use in synchronizationin critical>region>13. Different means of IPC in UNIX.>14. When will you use which mean of IPC.>15. Loosely coupled and Tightly coupledMultiprocessor and>communication> between different processors.>16. UNIX Password algorithm.>17. How to locate a file Physically in UNIX Filesystem ?>18. Subroutine call in C.
-
8/8/2019 hcl_tcs
12/73
>19. Stack implementation in PASCAL and C.>20. 8 Queens problem and its solution. How you willdo this in C>?>21. Recursive and looping structure for the same
problem.>22. TCP/IP and OSI models of networking.>23. In your OS you have round-robin scheduling withfixed time>slice> and facility of semaphore how you can implement
priority>scheduling> by that .>24. main()> { char **a;> *a[0]=malloc(10);> *a[4]=malloc(10);> strcpy(*a[0],"hello");> strcpy(*a[4],"World");> printf("%s\t%s\n",*a[0],*a[4]); }> Is there any error in the above code ?> if yes What kind of error it is and correct it.> section 1.>1.which of the following involves context switch,>a) system call b)priviliged instruction>c)floating poitnt exception>d)all the above
>e)none of the above>ans: a>>2.In OSI, terminal emulation is done in>a)semion b)appl.. c)presenta... d)transport>ans: b>>3....... 25MHz processor , what is the time taken bythe>instruction which needs 3 clock cycles,>a)120 nano secs b)120 micro secs>c)75 nano secs d)75 micro secs>>>4. For 1 MBmemory no of address lines required,>a)11 b)16 c)22 d) 24>ans: 16>>5. Semafore is used for >a) synchronization b0 dead-lock avoidence
-
8/8/2019 hcl_tcs
13/73
>c)box d) none>ans : a>>>6. class c: public A, public B>>a) 2 member in class A,B shouldnot have same name>b) 2 member in class A,C " '' '' ''>c) both>d) none>ans : a>>7. question related to java>>8. OLE is used in>>a)inter connection in unix>b)interconnection in WINDOWS>c)interconnection in WINDOWS NT>>9.No given in HEX ---- write it in OCTAL>>10.macros and function are related in what aspect?>a)recursion b)varying no of arguments>c)hypochecking d)type declaration>>11.preproconia.. does not do one of the following>a)macro ...... b)conditional compliclation
>c)in type checking d)including load file>ans: c>> SECTION B> __________ >>1.enum day = { jan = 1 ,feb=4, april, may}>what is the value of may?>a)4 b)5 c)6 d)11>e)none of the above>>2.main>{>int x,j,k;>j=k=6;x=2; ans x=1>x=j*k;>printf("%d", x);>>3. fn f(x)>
-
8/8/2019 hcl_tcs
14/73
>{ if(x return; ans fn(5) ....?>else f(x-1)+x;>}>>4. i=20,k=0;>for(j=1;j{>k+=j}>>printf("%d", k); ans k=4>>>5. int i =10>main()>{>int i =20,n;>for(n=0;n{>int i=10> i++;>}>printf("%d", i); ans i=20>>6. int x=5;> y= x&y>( MULTIPLE CHOICE QS)
>ans : c>>>7. Y=10;> if( Y++>9 && Y++!=10 && Y++>10)>printf("........ Y);>else printf("".... )>ans : 13>>>8. f=(x>y)?x:y>a) f points to max of x and y>b) f points to min of x and y>c)error >d) ........>ans : a>>9. if x is even, then>>(x%2)=0
-
8/8/2019 hcl_tcs
15/73
>x &1 !=1>x! ( some stuff is there)>>a)only two are correct>b) three are correct>c), d) ....>ans : all are correct>>10. which of the function operator cannot be over loaded>>a) b)?:>c)==>d)*>>ans: b and d>> SECTION.C (PRG SKILLS)> -------->(1) STRUCT DOUBLELIST> { DOUBLE CLINKED> INT DET; LIST VOID> STRUCT PREVIOUS; BE GIVEN AND APROCEDURE TO>DELETE> STRUCT NEW; AN ELEMENT WILLBE GIVEN
> }> DELETE(STRUCT NODE)> {> NODE-PREV-NEXT NODE-NEXT;> NODE-NEXT-PREV NODE-PREV;> IF(NODE==HEAD)> NODE> }> IN WHAT CASE THE PREV WAS> (A) ALL CASES> (B) IT DOES NOT WORK FOR LAST ELEMENT> (C) IT DOES NOT WORK FOR----->(2) SIMILAR TYPE QUESTION> ANS: ALL DON'T WORK FOR NON NULL VALUE>>(3) VOID FUNCTION(INT KK)> {> KK+=20;> }> VOID FUNCTION (INT K)
-
8/8/2019 hcl_tcs
16/73
> INT MM,N=&M> KN = K > KN+-=10;> }> SECTION D> -------->(1) a=2,b=3,c=6 c/(a+b)-(a+b)/c=?>(2) no.rep in hexadecimal, write it in radiv 7>(3) A B C D E> * 4> ---------- find E ANS: 13> E D C B A> ------------>(4) GRE-MODEL TEST-1, SECTION-6(19-22)>(5) M HAS DOUBLE AMOUNT AS D, Y HAS RS. 3 MORE THANHALF OF>AMOUNT OF D> THE ORDERING A,B,C M C D C Y> ANS:DATA INSUFFICIENT D C M C Y>(6)IN STASTIC MEN CAUSE MORE ACCIDENTS THEN ONECONCLUSION>(A) MEN DRIVE MORE THAN ONCE>(B) STASTICS GIVE WRONG INFORMATION>(C) WOMEN ARE CAUTION THAN ME ANS; C(VERIFY)>(D)-----ETC>(7) P,Q,R,S,T,U -SECURING GRANT;TWO TOURIST PARTIESAND THEN TWO>SECURITY
> GAURDS SHOULD GO WITH EACH PARTY>>______________________________________________________________________
__ > P AND R-ARE ENEMIES, Q DOES NOT GOSOUTH> P&S-ARE WILLING TO BE TOGETHER >>______________________________________________________________________ > THE TWO PARTIES MAY GO SOUTH&NORTH RESPECTIVELY> AT ONE POINT EACH MAY PASS EACH OTHER THEN GAURDSCAN>EXCHANGE> 6 Q BASED ON THIS> (8)pq-r/s =2 what is q inference a,n&d> (a) a can do n units of work in strs,a&b can do nunits of work >in 2 hrs> in how many hrs n units of work ans:3 hr 30 min
p =
-
8/8/2019 hcl_tcs
17/73
>(2s+r)/q> ____________ >>main()>{> int var=25,varp;> varp=&var;> varp p = 10;> fnc(varp)> printf("%d%d,var,varp);>}> (a) 20,55(b) 35,35(c) 25,25(d)55,55>> [ c++,c,dbms interview]> [fundamentals]> this is new paper >>______________________________________________________________________
_____ > application -software> ____________________ >part-1:>28-questions>(5)ingless ans:RDMS>(1)bit program-ans d>(2)c ans>(3)+ 0 ans>(4)00p--ans linking
>(5)------>(6)------->(9)25--45 even no. ans--10>(10) >10 choice isinspired by the choise of others. One questionof this>type is givengiven in the MIND TEASURES -By Summers.)Ans: Ranjan & Shiva
8. There are five persons A,B,C,D,E whose birthdays occur at>the consecutivedays. Birthday of A is some days or day before C& birthday>of B isexactly the same days or day after E. D is two
-
8/8/2019 hcl_tcs
18/73
days older >than E. If
birth day of C is on wednesday then find out the birthdays>of other.
Paper Model:> Section I: computer awareness(i.e general thingsabout>computer) Q.15>-ve marks: 1/4>> Section II: Simple C- language Q. 15& -ve marks:>-1/4>> Section III: On pointers & structures> and C++,JAVA( only 1 on this) Q.10each>quetion ->2 marks>-ve marks: -1> Section IV: Analytical Q.20each>quetion -> 2 marks.>
-ve marks: -1/4>>>Murthy from each section I am giving one are toquetions also>because for >checking whether the same paper or not.> And for doubtful answers also I am writingquetions but not>writing answers>for these quetions.>>> Section-I>>1). Piggy backing is a technique for >>a) Flow control b) sequence c) Acknowledgement d)>retransmition>
-
8/8/2019 hcl_tcs
19/73
>ans: c piggy backing>>>2). The layer in the OST model handles terminalemulation>>a) session b) application c) presentation d)transport>>ans: b application>>3) ans: a odd numbers of errors>>4)Q. In signed magnitude notation what is theminimum value that>can be represented with 8 bits>>a) -128 b) -255 c) -127 d) 0>>5) c 20>>6) a 120>>7) b synchronise the access>>8) a system call>>9) b the operating system
>>10) a 177333>>11) d used as a network layer protocall innetwork and windows>system>>12) b has to be unique in the sub network >>13)Q. there is an employer table with key feilds asemployer no.>data in every> n'th row are needed for a simple following querieswill get>required results.>> a) select A employe no. from employe A , whereexists from>employe B>where A employe no. >= B employe having (count(*) mod
-
8/8/2019 hcl_tcs
20/73
n)=0> b) select employe no. from employe A, employe Bwhere>A employe no. >= B employ no. grouply employe no.having>(count(*) mod n=0 )> c) both a& b> d)none of the above>>14)Q. type duplicates of a row in a table customer with non>uniform key feild>customer no. you can see>>a) delete from costomer where customer no. exists>( select distinct customer no. from customer havingcount )>b) delete customer a where customer no. in>(select customer b where custermer no. equal to bcustemor no. )>and a rowid >>b rowid>c) delete customer a where custermor no. in>( select customer no. from customer a, customer b )>d) none of the above>>15) c Volatile modifier >
>>---------- Section I over with 15 quetions>------------------->>>> SECTION-II>>Section II is not covered completly But it is veryvery easy. You>can do it> very easely.>>>1) ans: recursion>>2) long int size> a) 4 bytes b) 2 bytes c) compiler dependent d)8 bytes>ans: compiler dependent
-
8/8/2019 hcl_tcs
21/73
>note: order of a,b,c,d are doubt but answer iscorrect.>>3) x=2,y=6,z=6>x=y==z;>printf(%d",x) ?>>4) if(x>2)?3:4>>5)>>6)>>7) ans: c 6 ( quetion on enum )>>8) ---->--->--->-->14) c : class A,B and C can have member functionswith same>name.>>15) ans: d none of the above> SECTION-III>>>1) ans: b It does not work when rp is the
last element in the>linked list>>2) ans: a always>>3) ans: b 13>>4) ans: b 16>>5) ans: d 55,55>>6) ans: c 5,10,10,3>>7) --->>8) ans:d 4>>9) ans: c 5>>10)ans: c semicolon missing
-
8/8/2019 hcl_tcs
22/73
> SECTION-IV>>>>>following are not in order:>> 2. M > D > Y ans: (a)>> 6. 10 in 4 seconds,> ? in 6 minutes = 10x6x60/4 = 900ans: (a)>> 7. a=2, b=4, c=5> (a+b)/c - c/(a+b) = 11/30 (ans).>> 8. 100(100000000+100000000)/10000 = 2x1000000(ans).>> 9. what does the hexanumber E78 in radix 7.> (a) 12455 (b) 14153 (c) 14256 (d) 13541 (e)131112>ans: (d)>> 10. Q is not equal to zero and k = (Q x n - s)/2find>n?> (a) (2 x k + s)/Q (b) (2 x s x k)/Q (c) (2 x
k - s)/Q> (d) (2 x k + s x Q)/Q (e) (k + s)/Q> (from GRE book page no:411)> data:> A causes B or C, but not both> F occurs only if B occurs> D occurs if B or C occurs> E occurs only if C occurs> J occurs only if E or F occurs> D causes G,H or both> H occurs if E occurs> G occurs if F occurs>>NOTE: check following answers.>> 11. If A occurs which of the following must occurs>> I. F & G> II. E and H> III. D
-
8/8/2019 hcl_tcs
23/73
>> (a) I only (b) II only (c) III only (d)I,II, & III> (e) I & II (or) II & III but not bothans: (e)>> 12. If B occurs which must occur >> (a) D (b) D and G (c) G and H (d) F and G(e) J ans:>(a)>> 13. If J occurs which must have occured>> (a) E (b) either B or C (c) both E & F (d) B(e) both B>& C ans: (b)>> 14. which may occurs as a result of cause notmentioned>> (1) D (2) A (3) F>> (a) 1 only (b) 2 only (c) 1 & 2 (d) 2 & 3(e) 1,2,3>ans: (c)>> 15. E occurs which one cannot occurs
>> (a) A (b) F (c) D (d) C (e) Jans:>(b)>> 11 to 15:- ----------- e , a , b , c , b--------------->>>>>>>Below are in order:>> 16. to 20. answers:>>e>a>c
-
8/8/2019 hcl_tcs
24/73
>a>e
tech.what is OS?can OS be related to a push buttonwhat is EPROM and ROMwrite the hex code of jmp inst. in 8085which was the first OS.what are attributes and entities?suppose take interview as an entity then what aretheattributes?hobbies?you should very well know about the hobby youwrite.
personal ________ goal of your life?family backgroundyou should know at what post your father/mother is?how would your life partner be?what is opinion of your father about you?if we send you abroad for a longer time. wouldyouhave any problem.
Back To HCL PageSection A1. Which of the following involves context switch,(a) system call(b) priviliged instruction(c) floating poitnt exception(d) all the above(e) none of the aboveAns: (a)
2. In OST, terminal emulation is done in(a) sessions layer (b) application layer (c) presentation layer (d) transport layer Ans: (b)
3. For a 25MHz processor , what is the time taken bytheinstruction which needs 3 clock cycles,
-
8/8/2019 hcl_tcs
25/73
(a)120 nano secs(b)120 micro secs(c)75 nano secs(d)75 micro secs
4. For 1 MB memory, the number of address linesrequired,(a)11(b)16(c)22(d) 24Ans. (b)
5. Semaphore is used for (a) synchronization(b) dead-lock avoidence(c) box(d) noneAns. (a)
6. Which holds true for the following statementclass c: public A, public Ba) 2 member in class A, B should not have same name
b) 2 member in class A, C should not have same namec) bothd) noneAns. (a)
7. Question related to java
8. OLE is used ina) inter connection in unix
b) interconnection in WINDOWSc) interconnection in WINDOWS NT
9. Convert a given HEX number to OCTAL
10. Macros and function are related in what aspect?(a)recursion(b)varying no of arguments(c)hypochecking(d)type declaration
11.Preproconia.. does not do which one of thefollowing(a) macro(b) conditional compliclation(c) in type checking
-
8/8/2019 hcl_tcs
26/73
(d) including load fileAns. (c)
12. Piggy backing is a technique for a) Flow control
b) Sequencec) Acknowledgementd) retransmitionAns. (c)
13. In signed magnitude notation what is the minimumvalue thatcan be represented with 8 bits(a) -128(b) -255(c) -127(d) 0
14. There is an employer table with key fields asemployer number datain every n'th row are needed for a simplefollowing querieswill get required results.(a) select A employee number from employee A , whereexists fromemployee B where A employee no. >= Bemployee having (count(*) mod n)=0
(b) select employee number from employe A, employe Bwhere Aemploye number>=B employ number group by employee number having(count(*) mod n=0 )(c) both (a) & (b)(d) none of the above
15. Type duplicates of a row in a table customer withnon uniformkey field customer number you can seea) delete from costomer where customer number exists(selectdistinct customer number from customer having count )
b) delete customer a where customer number in b rowidc) delete customer a where custermor number in( selectcustomer number from customer a, customer b )d) none of the above
Section B
-
8/8/2019 hcl_tcs
27/73
1. Given the following statementenum day = { jan = 1 ,feb=4, april, may}What is the value of may?(a) 4(b) 5(c) 6(d) 11(e) None of the above
2. Find the output for the following C programmain{int x,j,k;
j=k=6;x=2;x=j*k;
printf("%d", x);
3. Find the output for the following C programfn f(x){ if(x
-
8/8/2019 hcl_tcs
28/73
Y=10;if( Y++>9 && Y++!=10 && Y++>10){printf("%d", Y);else
printf("%d", Y);}Ans. 13
8. Find the output for the following C programf=(x>y)?x:ya) f points to max of x and y
b) f points to min of x and yc)error Ans. (a)
9. What is the sizeof(long int)(a) 4 bytes(b) 2 bytes(c) compiler dependent(d) 8 bytes
10. Which of the function operator cannot be over loaded(a)
-
8/8/2019 hcl_tcs
29/73
}Q. In what case the prev was(a) All cases(b) It does not work for the last element(c) It does not for the first element(d) None of these
Answer the questions based on the following programVOID FUNCTION(INT KK){KK+=20;}VOID FUNCTION (INT K)INT MM,N=&MKN = K KN+-=10;}
. What is the output of the following programmain(){ int var=25,varp;varp=&var;varp p = 10;fnc(varp)
printf("%d%d,var,varp);}(a) 20,55(b) 35,35
(c) 25,25(d)55,55
Section D1. a=2, b=3, c=6Find the value of c/(a+b)-(a+b)/c
2. What does the hexanumber E78 in radix 7.(a) 12455(b) 14153(c) 14256(d) 13541(e) 131112Ans. (d)
3. 10 : 4 seconds :: ? : 6 minutesAns. 900
4. Q is not equal to zero and k = (Q x n - s)/2.Whatis n?
-
8/8/2019 hcl_tcs
30/73
(a) (2 x k + s)/Q(b) (2 x s x k)/Q(c) (2 x k - s)/Q(d) (2 x k + s x Q)/Q(e) (k + s)/Q
5. From the following statements determing the order of ranking" M has double the amount as D" Y has 3 rupess more than half the amount of DAns. Data insuffiecient
Questions 6 - 10 are to be answered on the followingdata" A causes B or C, but not both" F occurs only if B occurs" D occurs if B or C occurs" E occurs only if C occurs" J occurs only if E or F occurs" D causes G,H or both" H occurs if E occurs" G occurs if F occurs6. If A occurs which of the following may occursI. F and GII. E and HIII. D(a) I only(b) II only
(c) III only(d) I,II, & III(e) I & II (or) II & III but not bothAns. (e)
7. If B occurs which must occur (a) D(b) D and G(c) G and H(d) F and G(e) JAns. (a)
8. If J occurs which must have occured(a) E(b) either B or C(c) both E & F(d) B(e) both B & CAns. (b)
-
8/8/2019 hcl_tcs
31/73
-
8/8/2019 hcl_tcs
32/73
" Do you like helping other people ?" Do you feel you can help make the world a better
place?" Do you like dealing with the public ?" Do you feel as though you have an unfulfilledmission ?" Do you find it easy to motivate yourself andothers ?" Do you like making people happy ?" Do you respect yourself and others ?" Do you know your main strengths ?" Do you know your frailties ?" Do you know what makes you really happy ?" Do you know what you really want out of life ?" Do you know what you don't want out of life ?" Do you ever wonder what makes you want to get outof bed in themorning ?Assessing your present career " Have you set your career development goals for your chosencareer ?" How well does your current career fulfil thosegoals ?" If you feel you're ready for a career change,have you definedthe reasons clearly ?Researching a career change
" use the internet to research job categories which best suit your career needs" are you prepared to relocate in your new career ?" assess the work environments for suitability" assess the potential for career advancement andsalary grades" make a list of potential employers and researcheachorganizationMake the moveThe rest involves usual job hunting procedures alreadydescribedin depth elsewhere on this site." prepare your cover letter and CV/resume" brush up on your interviewing techniques" never forget - you are a unique person withsomething tocontribute !!*******************************************************
-
8/8/2019 hcl_tcs
33/73
bhu_mca(hcl)paper..........Section I - Analytical Section
1. Income of X increases 20% and becomes 1.2 timesthat of Y. Y's salary is 20,000. What was the originalsalary of X?
a) 19000 b) 20000 c) 20500 d) 19667 e) None
2. X and Y together can do n units of work in 12 days.Y can do n units of work alone in 18 days. How muchtime does X need to complete n units of work ?
a) 24 days b) n days c) 36 days d) 30 days e) None
3. The value of 16 + 16**3 + 16**5 + 16**3 is
a) (257**2)*(2**4) b) 528392 c) 2**20 + 16 d) 16 * (2* (16**3)) e) None
4. In a class room 90% know English, 40% knowJapanese, 90% know Hindi. Every person in the classknows atleast 2 languages out of these three. How many
people know all three languages ?
a) 20% b) 10% c) 15% d) 0% e) None
5. What is 20% of 125% of 30% of 120 ?
a) 10 b) 8 c) 9 d) 15 e) None
6. When an iron rod is cut into pieces of 10 cm each,then a piece of 4 cm is remaining. When it is cut into
pieces of 19 cm each, a piece of 3 cm is remaining.What is the minimum size of the rod ?
a) 364 cm b) 554 cm c) 194 cm d) 174 cm e) None
7. If a man travels @ 30 KMPH, then he reaches hisdestination late by 10 minutes, and if he travels @ 42KMPH, then he reaches 10 minutes earlier. The distancetraveled by him is:
a) 36 KM b) 38 KM c) 40 KM d) 35 KM e) None
8. The area of a square and rectangle are same. Thesides of the rectangle are in the ratio 1:16. If thearea of square is 64 SQ.M, what is the perimeter of
-
8/8/2019 hcl_tcs
34/73
the rectangle?
a) 32 M b) 64 M c) 68 M d) 48 M e) None
9. X invested Rs. 2430 and Y invested Rs 3240. Theymade a profit of Rs 1050. What is the difference
between the share of X & Y profit?
a) Rs 150 b) Rs 135 c) Rs 105 d) Rs 142 e) None
10. The printed sale price of a book is Rs 60. Ashopkeeper offers two successive discounts of 20% and30%. If the original cost of the book is Rs 30, whatis the percentage of profit/loss the shopkeeper ismaking ?
a) 0% b) 12% Profit c) 12% Loss d) 8% Profit e) None
11. Find the missing term: ak eo is ?? qa ue
a) lv b) mw c) nx d) lw e) mv
12. Find the missing letters in the series:ab??abb?ab?a
a) baab b) abab c) abba d) aabb e) bbaa
13. Find the missing number in the series: 3 15 35 ?99 143
a) 63 b) 69 c) 77 d) 81 e) 85
14. In a square field, X is standing on a corner towards South-East. X starts crossing the fielddiagonally and walks half the distance. Now X turnsright, walks some distance and turns left. Whichdirection is X facing now?
a) North-East b) North-West c) South-East d)South-West e) North
15. Find the missing number in the series: 7 13 21 ?43 57
a) 27 b) 29 c) 31 d) 35 d) 41
Questions 16-20
-
8/8/2019 hcl_tcs
35/73
For questions 16-20, there is a statement and twoconclusions. Mark the most appropriate answer. Mark
a) If only the first conclusion is correct from thestatement.
b) if only the second conclusion is correct from thestatement.c) If both can be correct conclusions.d) If only one of the two (either of the two) iscorrect.e) If neither is correct.
16. Statement: It does not matter what type of foodyou eat. What matters is whether you can digest it.
Conclusions: (I) Any type of food is equally good aslong as it can be digested.(II) The type of food one eats is immaterial.
17. Statement: If blue is heavy, yellow is light. If red is light, green is medium. But blue is heavy or red is light.
Conclusions: (I) Yellow and red are light. (II) Greenis medium.
18. Statement: The person questioned the utility of the present procedure and suggested its replacement byanother one designed for speedy disposal.
Conclusions: (I) Procedure should be abolished.(II) Procedure should be made for speedy disposal.
19. Statement: Now you do not need an import licenseto own an electronic typewriter.
Conclusions: (I) Electronic typewriters are now madeindigenously.(II) Electronic typewriters are now freely permittedfor import.
20. It does not matter what a tonic contains. Whatmatters is what your body gets out of it.
Conclusions: (I) Any tonic is equally good if the bodycan get something out of it.
-
8/8/2019 hcl_tcs
36/73
(II) Composition of a tonic is of no consequence.
Questions 21-25
For Questions 21 to 25 please study the followingconditions
A causes B or C, but not bothF occurs only if B occursD occurs only if B or C occursE occurs only if C occursJ occurs only if E or F occursD causes G, H or bothH occurs if E occursG occurs if F occurs
21. If A occurs, which of the following may occur?I. F and G II. E and H III. D
a) I only b) II only c) III only d) I,II and IIIe) I & III or II & III but not both
22. If B occurs, which does not necessarily occur
a) H b) F c) G d) D e) J
23. If J occurs, which must have occurred?
a) E b) Either B or C c) Both E & F d) B e) Both B& C
24. Which may occur as a result of a cause notmentioned?I. D II. A III. F
a) I only b) II only c) I & II d) II & III e) I, II &III
25. If E occurs, which one cannot occur?
a) A b) F c) D d) C e) JQuestions 26-30
For Questions 26 to 30 please study the following paragraph.
Six knights, P, Q, R, S, T and U - assemble for a long journey in two travelling parties. For security, each
-
8/8/2019 hcl_tcs
37/73
travelling party consists of at least two knights. Thetwo parties travel by separate routes, northern andsouthern. After one month, the routes of the northernand southern groups converge for a brief time and atthat point the knights can, if they wish, rearrangetheir travelling parties before continuing, again intwo parties along separate northern and southernroutes. Throughout the entire trip, the composition of travelling parties must be in accord with thefollowing conditions:
P and R are deadly enemies, and although they may meet briefly, can never travel together. P must travel inthe same party with S. Q cannot travel by the southernroute. U cannot change routes.
26. If one of the two parties of knights consists of Pand U and two other knights and travel by the southernroute, the other members of this party besides P and Umust be:
a) Q and S b) Q and T c) R and S d) R and T e) S and T
27. 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, Q by the northern route b) P, S, T by the
northern routec) P, S, T by the southern route d) P, S, U by thesouthern routee) Q, R, T by the northern route
28. If one of the two parties of knights consists of Uand two other knights, and travels by the northernroute, the other members 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
29. If each of the two parties of knights consists of exactly three members, S and U are members of different parties, and R travels by the northernroute, then T must travel by the
a) Southern route with P and S b) Southern route withQ and R c) Southern route with R and U d) Northern route with
-
8/8/2019 hcl_tcs
38/73
-
8/8/2019 hcl_tcs
39/73
e) None
7. The number of bits required for addressing 1MBmemory are
a) 10 b) 16 c) 20 d) 24 e) None
8. With a 25 MHz Processor, how long will aninstruction, requiring 3 clock cycles, take to execute?
a) 120 nano seconds b) 120 micros seconds c) 75nano secondsd) 75 macro seconds e) None
9. DMA is used to transfer data from
a) Memory to i/o controller b) CPU to i/o controller c) CPU to memoryd) Memory to memory e) None
10. The code segment register contains 0xAAAA and theIP register contains 0xAAAA on a 8086 microprocessor.The instruction to be executed will be fetched fromthe memory address:
a) 0xB444A b) 0xAAAAA c) 0xB554A d) 0x15554 e) None
11. Which of the following is not a MS-DOScharacteristic ?
a) re-entrant b) single-user OS c) non-pre emptived) system calls through interrupts e) c & d
12. Disk requests come into the disk driver for cylinders 15, 23, 20, 5, 44, 6, 39 in that order. Thedisk arm is initially at cylinder 20. If the disk driver employs elavator algorithm (initially movingupwards), when will the request for cylinder 6 becompleted ?
a) 1st b) 6th c) 3rd d) 7th e) None
13. Which of the following involve a context switch ?
a) System Call b) Privileged instruction c) FloatingPoint Exceptiond) All of the above e) None
-
8/8/2019 hcl_tcs
40/73
14. An internet IP address of a node has to be uniquefor
a) domain of the node b) country c) sub-network of the noded) world-wide e) None
15. Semaphores are used to
a) Avoid Deadlocks b) Synchronize access to sharedresourcesc) Transfer data from one process to another d) a and
b e) None
16. There is an employee table with key field asemp_no. Data in every nth row are needed for a sample.Which of the following queries will get the requiredresult ?
a) Select A.emp_no from employee A, where exists(select (max(emp_no)) from employee B, where A.emp_no>= B.emp_no having (count(*) mod n)= 0;
b) Select emp_no from employee A, employee B whereA.emp_no >= B.emp_no group by emp_no having (count(*)mod n) = 0;c) Both a & b d) Not possible to query e) None
17. For deleting duplicate rows in a table customer with non unique key field cust_no, you can use
a) delete from customer where cust_no exists (selectdistinct cust_no from customer having count(cust_no) >1;
b) delete customer a where cust_no in (select cust_nofrom customer b where a.cust_no = b.cust_no) anda.rowid > b.rowid;c) delete customer a where cust_no in (select cust_nofrom customer a, customer b group by a.cust_no having(count(*) > 1) and a.rowid > b.rowid);d) All of the above e) None
18. Assume a table 'exam' has a column 'marks'. Whichof the following queries will return the second higher mark in the table ?
a) select marks from exam where marks (select max
-
8/8/2019 hcl_tcs
41/73
(marks) from exam) b) select max(marks) - 1 from examc) select max(marks) from exam where marks (selectmax(marks) from exam)d) select max(marks) from exam where marks < (selectmax(marks) from exam)e) c and d
19. If 1,2,3,4,5,6,7 represent the nodes of a binarytree, and 1234567 is pre-order listing of the tree,which of the following can be TRUE ?
a) 3241657 is in-order b) 2345671 is in-order c)3421657 is in-order d) All e) None
20. Using standard bubble sort, how many comparisonsare required for sorting 3,7,2,6,1 in ascending order?
a) 25 b) 15 c) 10 d) 5 e) None
21. What is the standard data structure used for supporting ISAM ?
a) Queue b) B-Tree c) Linked List d) Stack e) None
22. Which of the following statements are true?
a) Deleting a node is not possible on a Circular List. b) EnQueue() on a tree ensures that the node isinserted at the leaf level.c) A Linked List can be implemented using arrays.d) A & Be) None are true
23. If a balanced binary tree has maximum of 7 levels,what is the maximum number of nodes present in thetree ?
a) 127 b) 128 c) 7 d) 255 e) 256
24. Which of the following is not a valid 8085 opcode?
a) PUSH b) MUL c) INC d) ADD e) none
25. During which phase of compilation, initializationof static variables is done ?
-
8/8/2019 hcl_tcs
42/73
a) Parsing b) Code Generation c) Linking d) Loading e)Optimization
Section III - C Programming
1. What are the values printed by the following program ?#define VALUE 1+2main(){
printf("%d and %d\n", VALUE/VALUE, VALUE*3);}
a) 1 & 9 b) 5 & 9 c) 1 & 7 d) 5 & 7 e) None
2. What is the output of the following ANSI-CCompliant program?#define WHAT(a, b) a##bmain(){
printf("%s\n", WHAT("This", "This is"));}
a) "ThisThis is" b) "This##This is" c) "This is" d)"is" e) None
3. What is the output of the following program?main(){int i;char *p;i = 0x89;
p = (char *) i; p++; printf("%x\n", p);}
a) 0x8C b) 0x4566788A c) 0x8A d) 0x8B e) None
4. Which of the following is not an ANSI C languagekeyword ?
a) volatile b) function c) default d) const e) void
5. int a[3][3] = { {1, 2}, {3, 4} }What is the value of a[2][2] ?
-
8/8/2019 hcl_tcs
43/73
a) 3 b) 4 c) 0 d) 2 e) None
6. char msg[] = "Hello World\n";What is the vaue of sizeof(msg) ?
a) 11 b) 14 c) 12 d) 13 e) None
7. The type of the controlling expression of a switchstatement cannot be of the type
a) int b) char c) short d) float e) None
8. What is the value of the expression (3^6) + (a^a) ?
a) 3 b) 5 c) 6 d) a+18 e) None
9. What is the value assigned to the variable X if bis 7 ?X = b > 8 ? b 4 ? b >> 1 : b;
a) 7 b) 28 c) 3 d) 14 e) None
10. What is the output of the following program ?main(){int x = 2, y = 3, z = 4;x =y==z; printf("%d\n", x);
}
a) 0 b) 2 c) 3 d) 4 e) Compilation error
11. What is the output of the following program ?int x = 0x65;main(){char x;
printf("%d\n", x);}
a) Compilation error b) 0x65 c) 'A' d) 65 e)Undefined
12. What is the output of the following program on anintel machine ?main(){int array[] = { 1,2,3,4,5,6,7}
-
8/8/2019 hcl_tcs
44/73
char * b = (char *) array;char *c = (char *)&array[0];
printf("%d %d", b[1], c[5]);}
a) Compilation error b) 1, 5 c) 2, 6 d) 0, 0 e)Run time error
13. What is the output of the following program ?main(){
printf("%d\n", f(7));}f(x){if (x
-
8/8/2019 hcl_tcs
45/73
}a) 8 b) 6 c) 5 d) 4 e) None
16. What is the output of the following program ?main(){int x = 20;int y = 10;swap(x, y);
printf("%d %d", y, x+2);}
swap (int x, int y){int temp;temp = x;x = y;y = temp;}
a) 10, 20 b) 20, 12 c) 22, 10 d) 10, 22 e) None
17. What does the declaration char * ((*Function)(char *, int *)) indicate ?
a) A Function which takes char and int pointers as
parameters b) A Function which takes char and int pointers as parameters and returns a char pointer c) A Function which has two optional parameters andreturns char d) A pointer to a function, which takes char and int
pointers as parameters and returns a char pointer.e) Invalid declaration.
18. What does calloc (10, 10) return ?
a) A Pointer to 100 bytes of memory. b) A Pointer to 10 pointers of 10 bytes each.c) A Pointer to 10 pointer of 10 pointers each.d) An integer pointer e) None
19. In C language, parameters are passed by
a) value b) reference c) name d) a & b e) None
-
8/8/2019 hcl_tcs
46/73
-
8/8/2019 hcl_tcs
47/73
Answer : c) The first de...
2. What are the values printed by the following program?
#define dprint(expr) printf(#expr "=%d\n",expr)
main(){int x=7;int y=3;dprintf(x/y);}
Choice:a) #2 = 2 b) expr=2 c) x/y=2 d) none
Answer: c)x/y=2
3. Which of the following is true of the following program
main(){char *c;int *ip;c =(char *)malloc(100);ip=(int *)c;
free(ip);}
ans: The code functions properly releasing all thememory allocated
4.output of the following.
main(){int i;char *p;i=0X89;
p=(char *)i; p++; printf("%x\n",p);}ans:0X8A
-
8/8/2019 hcl_tcs
48/73
5.which of the following is not a ANSI C languagekeyword?
ans:Function.
6. When an array is passed as parameter to a function,which of the following statement is correct
choice:a) The function can change values in the originalarray
b) In C parameters are passed by value. The funcitoncannot changethe original value in the arrayc) It results in compilation error when the functiontries to access the elements in the arrayd) Results in a run time error when the funtion triesto access the elements in the array
Answer: a) The fu...
7. The type of the controlling expression of a switchstatement cannot be of the type
a) int b) char c) short d)float e) none
Answer : d)float
8.What is the value of the expression (3^6) + (a^a)?
a) 3 b) 5 c) 6 d) a+18 e) None
Answer : 5
9. What is the value assigned to the variable X if bis 7 ?X = b>8 ? b >1:b;
a) 7 b) 28 c) 3 d) 14 e) Noneans: 3;
10. Which is the output produced by the following programmain()
-
8/8/2019 hcl_tcs
49/73
{int n=2;
printf("%d %d\n", ++n, n*n);}
a) 3,6 b) 3,4 c) 2,4 d) cannot determine
Answer : b) 3,4
11. What is th output of the following program?int x= 0x65;main(){char x;
printf("%d\n",x)}
a) compilation error b) 'A' c) 65 d) unidentified
ans. d)
12. What is the output of the following programmain(){int a=10;int b=6;
if(a=3)
b++; printf("%d %d\n",a,b++);}
a) 10,6 b)10,7 c) 3,6 d) 3,7 e)none
Answer : d) 3,7
13. What can be said of the following program?main(){enum Months {JAN =1,FEB,MAR,APR};Months X = JAN;if(X==1){
printf("Jan is the first month");}}
-
8/8/2019 hcl_tcs
50/73
a) Does not print anything b) Prints : Jan is the first monthc) Generates compilation error d) Results in runtime error
Answer: b) Prints : Jan..
14. What is the output of the following program?main(){char *src = "Hello World";char dst[100];strcpy(dst,src);
printf("%s",dst);}strcpy(char *dst,char *src){while(*src) *dst++ = *src++;}
a) "Hello World" b)"Hello" c)"World" d) NULL e)unidentified
Answer: d) NULL
15. What is the output of the following program?
main()
{int l=6;switch(l){ default : l+=2;case 4: l=4;case 5: l++;
break;}
printf("%d",l);}a)8 b)6 c)5 d)4 e)none
Answer : c)5
16. What is the output of the following program?main(){int x=20;int y=10;swap(x,y);
-
8/8/2019 hcl_tcs
51/73
printf("%d %d",y,x+2);}swap(int x,int y){int temp;temp =x;x=y;y=temp;}
a)10,20 b) 20,12 c) 22,10 d)10,22e)none
Answer:d)10,22
17. What is the output of the following problem ?#define INC(X) X++main(){int X=4;
printf("%d",INC(X++));}
a)4 b)5 c)6 d)compilation error e) runtimeerror
Answer : d) compilation error no ++++ operator allowed
18. what can be said of the following
struct Node {char *word;int count;struct Node left;struct Node right;}
a) Incorrect definition b) structures cannot refer to other structurec) Structures can refer to themselves. Hence thestatement is OK d) Structures can refer to maximum of one other structure
Answer :c)
19. What is the size of the following union.
-
8/8/2019 hcl_tcs
52/73
Assume that the size of int =2, size of float =4 andsize of char =1.Union Tag{int a;flaot b;char c;};
a)2 b)4 c)1 d) 7
ans : b.)
20) What is the output of the following program? (.has been used to indicate a space)main(){char s[]="Hello,.world";
printf(%15.10s",s);}
a)Hello,.World... b)....Hello,.Wor c)Hello,.Wor.... (this option is correct for %s-15.10s)d)None of the above
ans: b.) total 15 spaces and print only 10characters.
These questions are based on data sufficiency in whichone has to tell if the given data in 2 statements isenough to derive an answer.
A if only (1) is sufficent.B if only (2) is sufficient.C if either is sufficient.D if both are sufficient.E data insufficient.
(1) The combined length of the longer two pieces of rope is 12 metres.(2) The combined length of the shorter two piecesof rope is 11 metres.
(A) (B) (C) (D) (E)
-
8/8/2019 hcl_tcs
53/73
10) A certain company paid bonuses of Rs. 125 to eachof its executiveemplyees and Rs 75 to each of its nonexecutiveemployees. If 100of the employees were nonexecutive, how many wereexecutive?1) The company has a total of 120 employees2) The total amount that the company paid in
bonuses to its employees was Rs.10,000
(A) (B) (C) (D) (E)
ans. C.)
11. What fraction of his salary did Mr. Johnson putinto savings last week ?
1) Last week Mr.Johnson put Rs 17 into savings.2) Last week Mr.Johnson put 5% of his salary intosavings.
(A) (B) (C) (D) (E)
ans. B.) only 2nd.
12. Each M-type memory unit will increase the basememory capacityof a certain computer by 3 megabytes. What is the base
memory capacity,in megabytes, of the computer ?
1) 2 M-type memory units will increase the computer's base memory capacity by 300%
2) The memory capacity of the computer after 2-M typememory unitsare added to the base memory capacity, is 1.6 timesthe memory capacityof the computer after 1 M-type unit is added to the
base memory capacity.
(A) (B) (C) (D) (E)
ans. C.) either.
13. What fractional part of the total surface area of cube C is red?
-
8/8/2019 hcl_tcs
54/73
-
8/8/2019 hcl_tcs
55/73
-
8/8/2019 hcl_tcs
56/73
but stillmakes a gross profit of 20 percent of the cost. What
percent of cost would be gross profit on the item have been if ithad been sold without the discount?
(A)20% (B)40% (C)50% (D)60% (E)66.6%
Answer :c) 50%
22) A millionaire bought a job lot of hats 1/4 of which were brown.The millionaire sold 2/3 of the hats including 4/5 of the brownhats. What fraction of the unsold hats were brown.
(A)1/60 (B)1/15 (C)3/20 (D)3/5 (E)3/4
Answer :c)3/20
23) How many integers n greater than10 and less than100 are theresuch that, if the digits of n are reversed, theresulting integer is n+9 ?
(A)5 (B)6 (C)7 (D)8 (E)9
Answer :D)8
24) An investor purchased a shares of stock at acertain price.If the stock increased in price Rs 0.25 per share andthe totalincrease for the x shares was Rs 12.50, how manyshares of stock had been purchased ?
(A)25 (B)50 (C)75 (D)100 (E)125
Answer :B)50
25) At a special sale, 5 tickets can be purchased for the priceof 3 tickets. If 5 tickets are purchased at the sale,the amountsaved will be what percent of the original price of the 5 tickets?
(A)20% (B)33.3% (C)40% (D)60% (E)66.6%
-
8/8/2019 hcl_tcs
57/73
Answer :c)40%
26) Working independently, Tina can do a certain jobin 12 hours.Working independently, Ann can do the same job in 9hours. If Tina works independently at the job for 8 hours andthen Ann worksindependently, how many hours will it take Ann tocomplete the remainder of the jobs?
(A)2/3 (B)3/4 (C)1 (D)2 (E)3
Answer :E)3
27) A decorator bought a bolt of d m number of redchips in any one stack ?
(A)7 (B)6 (C)5 (D)4 (E)3
Answer :C) 5
SECTION III - ANALYSIS PROGRAM SEGMENTS---------------------------------------
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 maintainedas a global variable, whose definition isdlink_t *head;
The funtion remove_element(dlink_t *rp), needs toremove the node
pointed to the rp and adjust the head.
The first node's prev and the last node's next are NULL.
remove_element(dlink_t *rp)
-
8/8/2019 hcl_tcs
58/73
{rp->prev->next = rp->next;rp->next->prev = rp->prev;if( head == rp)head = rp->next;}Which of the following statement is true about thefution remove_element
A) It work when head is the same as rpB) It does not work when rp is the last element on thelistc) It sets the head of the list correctlyD) It works in all cases
Answer :B) It does...
2) Consider the following function written in c:
#define NULL 0
char *index(sp,c)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 secondargument, c, is a character. This function scarchesfor the character c, in the string. If it is found a pointer to thatlocation is returnedelse NULL is returned.This function worksa) Always
b) Always, but fails when the first byte contais thecharacter cc) works when c is a non NULL character onlyd) Works only when the character c is found in thestringans: a
-
8/8/2019 hcl_tcs
59/73
03) What is printed when this program is executedmain(){
printf ("%d\n",f(7));}f(X){if (x
-
8/8/2019 hcl_tcs
60/73
while(*dst++ = *src++);}
c) strcpy (char *dst,char *src){while(*src){ *dst = *src;dst++; src++;}}
d) strcpy(char *dst, char *src){while(*++dst = *++src);}
ans: 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 bea) 20 and 55
b) 20 and 45c) 45 and 45
-
8/8/2019 hcl_tcs
61/73
-
8/8/2019 hcl_tcs
62/73
}
which of the following is true ?a) a.c will fail in compilation phase because f1() isnot declared
b) b.c will fail in compilation because the variable iis not declaredc) will print 30d) will print 40e) a & b
ans: e) a & b . extern functions and variables shouldhave been declared in the files for external linkage.
9) Consider the following prgvoid 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 %d\n",var,*varp);}The values printed when the above prg is complied andexecutedare:a) 20 and 55
b) 20 and 45c) 45 and 55d) 55 and 55e) 35 and 35
ans: d.) 55 and 55. similar to program 6.)
10) consider the following program:# include class x{
public:
-
8/8/2019 hcl_tcs
63/73
int a;x();};x::x(){a=10;cout
-
8/8/2019 hcl_tcs
64/73
Assuming the only one of the above statement is falseand that one of them is the murderer, who is the murderer?a) P
b) Qc) R d) Cann't be concludede) S
and: E.) r and s are true as first two statementsare contradictory. thus either P or S is murederer. asq is not murderer, he is tellinjg truth that P waswith him. hence S is murderer.
2) Mohan earned twice as much as Deep. Yogesh earnedrs.3/- more thanhalf as much as deep. If the amounts earned byMohan,Deep,Yogeshare M,D,Y respectively, Which of the following is thecorrect orderingof these amounts?a) M < D < Y
b) M < Y < Dc) D < M < Yd) It cann't be determined from the information given
e) D < Y < M
ans d)
03) Statistics indicate that men drivers are involvedin moreaccidents than women drivers.
Hence it may be concluded that...a) sufficiently information is not there to concludeanything
b) Men are actually better drivers but drive morefrequentlyc) Women Certainly drive more cautiously than Mend) Men chauvinists are wrong about women's abilties.e) Statistics sometimes present a wrong picture of things
04) What does the hex number E78 correspond to in
-
8/8/2019 hcl_tcs
65/73
radix 7 ?a) 12455
b) 14153c) 14256d) 13541e) 13112
ans:d
5)Given that A,B,C,D,E each represent one of thedigits between 1 and9 and that the following multiplication holds:A B C D EX 4--------------E D C B A--------------
what digit does E represent ?
a) 4 b) 6c) 8d) 7
Ans: c
6) HCL prototyping machine can make 10 copies every 4
seconds. At thisrate, How many copies can the machine make in 6 min.?
a) 900 b) 600c) 360d) 240e) 150
ans: a
7) if a=2,b=4,c=5 thena+b c----- - ---- =c a+b
a) 1 b) 11/30c) 0d) -11/30
-
8/8/2019 hcl_tcs
66/73
e) -1
ans: b
8) 10^2(10^8+10^8) =--------------10^4
a) 2(10)^4 b) 2(10)^6c) 10^8d) 2(10)^8e) 10^10
ans: b
9) Worker W produces n units in 5 hours. Workers V andW, workersindependently but at the same time, produce n units in2 hours.how long would it take V alone to produce n units?a) 1 hr 26 min
b) 1 hr 53 minc) 2 hr 30 mind) 3 hr 30 mine) 3 hr 20 min
ans: d (e)
10) if q 0 and k = qr/2 -s, then what is r in termsof k,q,s?
a) 2k+s----q
b) 2sk ----qc) 2(k-s)-----qd) 2k+sq-----qe) 2(k+s)------q
-
8/8/2019 hcl_tcs
67/73
ans: e
11-15 is the reasoning Questions:Occurs and Causes available in placement papers.com
Six knights - P,Q,R,S,T and U - assemble for a long journey in twotravelling parties. For security, each travelling
party consistsof at least two knights. The two parties travel byseparate routes,northern and southern. After one month, the routes of the northernand southern groups converge for a brief time and atthat point theknights can, if they wish, rearrange their travelling
parties beforecontinuing, again in two parties along separatenorthern and southernroutes. Throughout the entire trip, the composition of travelling
parties must be in accord with the followingconditions
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 routeU cann't change routes
16) If one of the two parties of knights consists of Pand U andtwo other knights and travels by the southern route,the other membersof this party besides P and U must bea) Q and S
b) Q and Tc) R and Sd) R and Te) S and T
ans: e
17) If each of the two parties of knights consists of exactly threemembers, which of the following is not a possibletravelling party
-
8/8/2019 hcl_tcs
68/73
and route?a) P,S,U by the northern route
b) P,S,T by the northern routec) P,S,T by the southern routed) P,S,U by the southern routee) Q,R,T by the southern route
ans: b
18) If one of the two parties of knights consists of Uand two other knights and travels by the northern route, the other memnbers of this party besides U must bea) P and S
b) P and Tc) Q and R d) Q and Te) R and T
ans: c
19) If each of the two parties of knights consists of exactly threemembers of different pX-Mozilla-Status: 0009by thenorthern route,then T must travel by thea) southern route with P and S
b) southern route with Q and R
c) southern route with R and Ud) northern route with Q and R e) northern route with R and U
ans: a
20) If, when the two parties of knights encounter oneanother after a month, exactly one knight changes from onetravelling party to theother travelling party, that knight must bea) P
b) Qc) R d) Se) T
ans: e*******************************************************tcs_paper.............
-
8/8/2019 hcl_tcs
69/73
NOTE:EACH OF THE QUESTIONS GIVEN BELOW APPEAR ASMULTIPLE CHOICE QUESTIONS IN THE ACTUAL PAPER.
VERBAL SECTION
Directions for questions 1-15:Find the synonyms of thefollowing words
1. Depreciation
Ans. Deflation, Depression, Devaluation, fall,>slumpin value
2. Deprecate
Ans. Feel and express disapproval of
3. Incentive
Ans. Thing one encourages a person to do something
4. Echelon
Ans. Level of authority or responsibility
5. Innovation
Ans.To make changes or introduce new things
6. Intermittant
Ans. Externally stopping and then starting
7. Detrimental
Ans.Harmful
8. Aberration
-
8/8/2019 hcl_tcs
70/73
-
8/8/2019 hcl_tcs
71/73
Ans. 40
2. A is driving on a highway when the police fineshimfor overspeeding and exceeding the limit by 10km/hr.At the same time B is fined for overspeeding
bytwice the amount by which A exceeded the limit.If >hewasdriving at 35 km/hr what is the speed limit for >theroad?
Ans. 15 kmph
3. A moves 3 kms east from his starting point . Hethen travels 5 kms north. From that point he moves>8kms to the east.How far is A from his starting
point?
Ans. 13 kms
4. A car travels 12 kms with a 4/5th filled
>tank.Howfar will the car travel with 1/3 filled tank?
Ans. 5 kms
5. The sum of the digits of a two digit number is>8.When 18 is added to the number, the digits arereversed. Find the number?
Ans. 35
6. The cost of one pencil, two pens and four >erasersis Rs.22 while the cost of five pencils, four pensandtwo erasers is Rs.32.How much will three pencils,three pens and three erasers cost?
-
8/8/2019 hcl_tcs
72/73
Ans. 27
7. Fathers age is 5 times his son's age. 4 years back the father was 9 times older than son.Find thefathers' present age.
Ans. 40 years
8. What number should be added to or subtracted> fromeach term of the ratio 17 : 24 so that it becomesequal to 1 : 2.
Ans. 10 should be subtracted
9. What is the 12th term of the series 2, 5, 8,>....
Ans. 35
10. If 20 men take 15 days to to complete a job,>in
how many days can 25 men finish that work?
Ans. 12 days
11. In a fraction, if 1 is added to both thenumerator at the denominator, the fraction becomes 1/2. If numerator is subtracted from the denominator, thefraction becomes 3/4. Find the fraction.
Ans. 3/7
12. If Rs.1260 is divided between between A, B and>Cin the ratio 2:3:4, what is C's share?
Ans. Rs. 560
-
8/8/2019 hcl_tcs
73/73
13. A shopkeeper bought a watch for Rs.400 and>solditfor Rs.500.What is his profit percentage?
Ans. 25%
14. What percent of 60 is 12?
Ans. 20%
15. Hansie made the following amounts in seven>gamesof cricket in India: Rs.10, Rs.15, Rs.21, Rs.12,Rs.18, Rs.19 and Rs.17(all figures in crores of