HCL 20 September 2008
HCL PAPER ON 20th SEPTEMBER 2008Interview PatternSection 1:In this section there are mainly questions based on C language like find the errors in the program and what is the output of the following program.some question i remember are1) int i=10;printf("%d %d %d",i++,i++,i--);there is one or two more question on increment operator2) Two question on redirection operator(>>)3) int i=10;if(1,i++,++i)printf ("The value for i is %d",i);4) one question on structure and u have to fine the error in the syntax5) int a=10,b=33;a=a^b;b=a^b;a=a^b;printf("%d %d", a,b);6) int *a;int (*b)();printf("%d %d",sizeof(a),sizeof(b);7) # define SQR(a) (a*a)void main(){printf("%d", SQR(5));}8) And in another question...