#1
4th August 2014, 07:51 AM
| |||
| |||
Previous year placement question papers of HCL
Will you please share with me the previous year placement question papers of HCL as it is very urgent for me?
|
#2
4th August 2014, 08:22 AM
| |||
| |||
Re: Previous year placement question papers of HCL As you want to get the previous year placement question papers of HCL so here it is for you: 1. How many segment registers are there in the 8086 processor? a) 4 b) 6 c) 8 d) none Ans: a 2. What is the addressing mode of this instruction MOV AL, [BX]; a) direct addressing mode b) register indirect addressing mode ANS: b I am not sure of it. 3. What is the type of file system used in the CD ROM? a) VFAT B) 4) About CPU I think but answer is DMA. 5) If we double the clock speed, then? a) It increases the speed of the processor b) It increases the speed of the system bus c) both of the above D) None 6) Data recovery is done in which layer? a) physical b) datalink c) network d) transport 7) What is thrashing? ANS: swapping in and out the pages frequently from memory. 8) By using 3 nodes how many trees can be formed? ANS:5 9) They give one tree, and ask the post order traversal for that tree? ANS:C 10) Page cannibalation is? ANS:C Aptitude section: 1) They give one scenario and ask questions on that. that is easy. Those are 5 questions. 2) They ask 2 questions in English, I didn't answer those ones. They are - Find the odd one? 3) They give 2 questions on missing digits. They r matrix type, I didn't remember the questions, But I know answers. for first one 8. For second one 28 is the answer. 4)Two persons start walking from the same place in opposite directions. After walking for 4 mts, both of them take the left and walk for another 3 mts. Then what is the distance b/w them? Ans:10 mt. 5)One person start from his home towards college which is 53 km far away. Another person started from college towards home after an hour. the speed of first one is 4kmph and the second one is 3 kmph. Then, what is the distance from home to their meeting point? AND:21 km. 6)3 machines can complete the work in 4,5, and 6 hours respectively. due to power failures they did the work alternatively. Then what is time taken to complete the work? ANS:9/20 7)Two persons take the pair of dies and throws them. If 12 appers first one wins, If two consecutives 7 s appear then second one wins. What is the probability to win first one in the game? a)6/15 b)3/13 c)2/13 8)Two questions on figures .They give five figures ,and change them sequentially, u have to find 6 th one. They give 4 choices. 9)one more Q. on number sequence. C Programming: 1) what is name of the operator in passing variable no. of arguments to function? ANS: Ellipsis 2) main() { printf("%d%d"size of ("Hcl technologies"),strlen("HCL Technologies")); } a)16 16 b)16 17 c)17 17 d)17 16 3) main() {char arr[]={ ' a','b','\n',....} some more instructions; } ANS:77 4) main() {int arr[]={0,1,2,3,4) int *a={arr, arr+1,arr+2,...} int **p=a; p++; some instructions: } ANS:1 1 1 5)They give one Q on 3-d array? ANS:4 6)one Question on ++ and && operators. ANS:1,0,0 7)one question on logical operators Ans:1 00 1 8)one question on the return value of scanf function ? ANS:1 ANALYSIS OF PROGRAMS: 1) For one Q. they make the constructor in the base class as virtual and give the big program. So, for that one ANSWER is NONE, (d). 2) In one Q. They give the prototype of the function that structure as argument .But, Structure is defined after that and they give the program. ANS: ERROR 3) for one Q. They give the answers as 4444 ,7777, 9999.But, the answer is 6666. So, Answer is None (d). 1) a) NMI b) Software interrupts c) Hardware interrupts d) Software and hardware interrupt Ans: b 2) Which of the following is error correction and deduction? a) Hamming code b) CRC c) VRC d) None Ans: b 3) When you switch on your computer, which of the following component affect first? a) Mother board b) SMPS c) Peripherals d) None Ans : a 4) Which of the following function transports the data? a) TCP/IP b) Transport layer c) TCP d) None Ans: c 5) Which of the following does not consists address? a) IP b) TCP/IP c) Network d) Transport Ans:a 6) They given like this……. And some conditions? a) pre order b) post order c) In order d) None Ans:c 7) Authentication means…. a) Verifying authority b) Source c) Destination d) Request Ans: a 8) Symorphous is used for a) Analysis b) Synchournization c) Asynchrouns d) None Ans: b 9) There are five nodes. With that how many trees we can make? a) 27 b) 28 c) 30 d) 29 Ans: c (Check the ans not sure) 10) Traverse the given tree using in order, Preorder and Post order traversals. ABC DEF GHI Given tree: Ø Inorder : D H B E A F C I G J Ø Preorder: A B D H E C F G I J Ø Postorder: H D E B F I J G C A And some more questions….. I dint remember those questions Given tree: Ø Inorder : D H B E A F C I G J Ø Preorder: A B D H E C F G I J Ø Postorder: H D E B F I J G C A And some more questions….. I dint remember those questions SECTION –II (C language Basics and programming) this section consists of 20 Questions…….. All are programs only… 1. main() { printf("%x",-1<<4); } a) fff0 b) fffb c) ff0 d) none Ans: a Explanation: -1 is internally represented as all 1's. When left shifted four times the least significant 4 bits are filled with 0's.The %x format specifier specifies that the integer value be printed as a hexadecimal value. 2. main() { char *p; p="Hello"; printf("%c\n",*&*p); } a) e b) H c) some address d) ome garbage value Ans: b Explanation: * is a dereference operator & is a reference operator. They can be applied any number of times provided it is meaningful. Here p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again & references it to an address and * dereferences it to the value H. 3. void main() { int i=5; printf("%d",i++ + ++i); } a) 11 b) 12 c) 10 d) output cant be predicted Ans: d Explanation: Side effects are involved in the evaluation of i 4. main( ) { int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; printf(“%u %u %u %d \n”,a+1,*a+1,**a+1,***a+1); } a) 100, 100, 100, 2 b) 101,101,101,2 c) 114,104,102,3 d) none Ans: c Explanation:The given array is a 3-D one. It can also be viewed as a 1-D array. 2 4 7 8 3 4 2 2 2 3 3 4 100 102 104 106 108 110 112 114 116 118 120 122 thus, for the first printf statement a, *a, **a give address of first element . since the indirection ***a gives the value. Hence, the first line of the output.for the second printf a+1 increases in the third dimension thus points to value at 114, *a+1 increments in second dimension thus points to 104, **a +1 increments the first dimension thus points to 102 and ***a+1 first gets the value at first location and then increments it by 1. Hence, the output is C is correct answer… 5. main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); } a) 111 222 332 443 b) 111 222 333 344 c) 111 222 333 444 d) None Ans: b 6. #include main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); } a) 8 b) 5 c) compile error d) syntax error Ans: c 7. main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); } a) 001… 100…0002 b) 0001...0002...0004 c) 001… 002…004 d) none ans: b 8. main() { unsigned int i; for(i=1;i>-2;i--) printf("HCL Technologies"); } a) HCL b) Technologies c) HCL Technologies d) None Ans: None(Plz Check the answer) 9. main() { int a[10]; printf("%d",*a+1-*a+3); } a) 4 b) 5 c) 6 d) None Ans : a 10. main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); } a) Line no 5: Error: Lvalue required b) Line no 5: Error: Link error c) Compile error d) None Ans: a 11. int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y) } a) x=10 y=20 b) x=20 y=10 c) x=30 y=20 d) none Ans: b 12. main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); } a) 665 b) 565 c) 556 d) none Ans: c 13.main() { float me=1.1; double you=1.1; if(me==you) printf(”IloveU”); else printf(“I Hate U”) } a) I love u b) I hate u c) floating point error d) Compile error Ans: b 14. enum colors {BLACK,BLUE,GREEN} main() { printf(”%d..%d..%d”,BLACK,BLUE,GREEN); return(1); } a) 1..2..3 b) 0..1..2 c) 2..3..4 d) none Ans: b Some more questions given.. I dint remember…. Be prepare all basic concept in C… so that you can answer very easily… SECTION –III (Data structures and C++) this section consists of 10 Questions… Each question carry 2 marks… so they deduct ½ mark for wrong answer….. 1) #include main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); } a)97 b) M c)76 d) none Ans: b 2) main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } } a) address of array b) Compile error c) Lvalue required d) none Ans: c 3) struct aaa{ struct aaa *prev; int i; struct aaa *next; }; main() { struct aaa abc,def,ghi,jkl; int x=100; abc.i=0;abc.prev=&jkl; abc.next=&def; def.i=1;def.prev=&abc;def.next=&ghi; ghi.i=2;ghi.prev=&def; ghi.next=&jkl; jkl.i=3;jkl.prev=&ghi;jkl.next=&abc; x=abc.next->next->prev->next->i; printf("%d",x); } a) 3 b) 2 c) 4 d) 5 Ans: b 4) main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; } a) compile error b) L value required c) Syntax error d) None Ans: a 5) class Sample { public: int *ptr; Sample(int i) { ptr = new int(i); } ~Sample() { delete ptr; } void PrintVal() { cout << "The value is " << *ptr; } }; void SomeFunc(Sample x) {cout << " Say i am in someFunc " << endl; }int main() { Sample s1= 10; SomeFunc(s1); s1.PrintVal(); } a) say I am in someFunc b) say I am in someFunc and runtime error c) say I am in someFunc and null value d) none ans: b and some questions given in DATASTURES… those are based on linked lists only also very big programs… so you have to do it very careful SECTION-III (General aptitude+1 passage+Logical) this section consists of 20 questions.. Each question carry 1 mark… 1) Sandhya and Bhagya is having the total amount of 12000. In that amount bhagya has deducted 3600 as less as sandhya. So what is their shared amount? a) 2800 b) 3600 c) 4800 d) 9600 Ans : c 2) Six persons have to present at certain meeting. The conditions are, A present P should present M present T should present K present P should present If A and P present I should be there in meeting If M and T present D should be absent If K and P present P should present Based on this they given some questions… Those are easy only.. you can do it easily… 3) Here they given passage following some questions.. Poetry explaining her experience with HINDI latest songs… and comparing with old songs… also she is a good singer. Like this they given a big passage… so read it carefully at a time.. so that u can save your time 4) Dhana and Lavanya started running at same point… But dhana started in anti clock wise direction, Lavanya started in clockwise direction.. Dhana met lavanya at 900 m . where as lavanya met dhana at 800 m… so how much distance they covered each other? a) 1700 b) 900 c) 1800 d) data is insufficient Ans: d 5) This question is base on Arithmetic mean like algebra… a n+2 = (7+an)/5…. Initially a0= 0…… so what is the value of a2? a) 5/2 b) 7/2 c) 7/5 d) none Ans : c 6) Here they given two statements, based on that they gave some questions Statement I : I is enough to answer Statement II: I and II is enough to answer i) Raja can do a piece of work in 9 days… and govardhan can do a piece of work in 8 days. In how many days they will complete the work alternatively.. Statement I: They both do in 72/17 days Statement II : A alone can do 1/9 days a) I b) I and II c) II d) none |