Tuesday, December 25, 2007

HCL -DBMS,Networking,Java,C++

General technical knowledge covering several branches.
( 1 mark for correct -1/4 for wrong )
Topics -DBMS (2 Queries),Networking,Java(1),C++(2),Architecture etc.

1. Semaphores are used in
i) process synchronisation.
ii) dead locks
2. Context switching is used in
a) system call
b) printing instructions
c) floating point instructions
d) all of the above
3. Virtual address to physical address characteresrtics is done by ?
4. What is common to both C and JAVA ?
5. Which feature in ANSI C is not in JAVA ?
6. Piggy backing technique is used in
a) flow control b) acknowledgement c) sequencing
7. Address on internet are
a) unique for particular domain
b) unique for a particular sub-node list
c) unique countrywide
d) unique in a network area
8. Terminal evaluation is in which OSI layer ?
9. No. of bits in one megabite ?
10. The variable pass in function is done by
a) By value.
b) By reference.
c) By value and reference both.
————————————————————————
Section 2:
**********
C fundamentals
( 1 mark for correct -1/4 for wrong )

Example:
1. Why are arguments passed from right to left in a C function?
& other general questions based on precedence and associativity of
operators,pointers,recursion etc.
2. a=(10,15) , b=10,15
what will be the value of a and b in ANSI C ?
3.

———————————————————————–
Section 3 :
***********
Program Analysis.
( 2 mark for correct -1 for wrong )

In this section small blocks of code were given,for which
an account of errors was to be given and for the codes not
containing any error the output was to be given.

What will be the output of the following programs ?

1. 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]);
}
2. main()
{
int x=10,y=15,z=16;
x=y==z;
printf("%d",x);
}
3. #define x 1+2
main()
{
printf("%d %d",x/x,x*3);
}
4. main()
{
int b=7,a;
a=b>1 : b>4 ? b>>1 : b
printf("%d ", a);
}
5. main()
{
int x=0,*p;
p=&x;
x++;p++;
printf("%d %d",x,p);
}
6. main()
{
int i=6;
switch (i)
{
default: i+=2;
case 4: i=i-1;
case 5: i+=5;
break;
}
printf("%d",i);
}
7. main()
{
char *p;
p=malloc(10);
free(p);
printf("%d",p);
}
8. Which of the following program is correct for strcpy() ? where a1
copy its contents in a2
a) strcpy(ichar *a1,char *a2) b) strcpy(char *a1,char *a2)
{ {
while (*a1) while (*a2=*a1)
*a2++=*a1++; {
} a2++;a1++;
}
}
9. Find if there is any error in the program below, correct it if there eny.

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]);
}

————————————————————————
Section 4 :
***********
Analytical reasoning & Quantitative ability.
( 1 mark for correct -1/4 for wrong )

The reasoning part consisted of some puzzles & the quantitative ability
part consisted of questions based on topics such as ratio & proporiton,
profit & loss,simple interest,mensuration etc. GRE type questions.

1. If A B C D E
* 4
———-
E D C B A
Then value of E is ? (6/4/8/1).

2. Hex is converted into radix then can be converted to ?
3. If x can do a work in 5 hrs. ,x and y together in 2 hrs. then what
time would y alone take to do that work ?
4. 10 to the power 2 ( 10 to the power 8 + 10 power 8)/10 power 4 = ?
5. If x earn twice as much as y , z earn Rs.3 more than half as much as
y. Then there increasing order of earning is ?
6. If a=2 , b=4 and c=5 then
(a+b)/c - c/(a+b) = ?
————————————————————————

df

went through a job interview and said:

Clearing aps..is easy..just go thru the old papers thats enough..
Be prepared in your area of interst and have a decent hr interview..
That should take u thru this concern

Srividhya went through a job interview and said:

The paper consists of 4 sections.
1.Computer concepts -15 -1 mark -1/4 -ve
2.C programming -20 -1 mark -1/4 -ve
3.Analysing the programs -10 -2marks - 1 -ve
4.Aptitude -20 -1 mark -1/4 -ve.

I remember only some of questions.

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.

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