HCL/Pattern1


Written Test

The written test consists of 60 questions which are divided into 4 sections .The total duration of the test is 90 minutes. There is negative marking .

The sectionwise distribution of the questions is as follows:

Section#1
This section consisting of 15 questions is based on general computer awareness.
In this section:
A correct answer carries 1 mark
1/4 marks will be deducted for a wrong answer.


Section#2
This section also consists of 15 questions. Questions based on C language are asked.
In this section:
A correct answer carries 1 mark
1/4 marks will be deducted for a wrong answer.


Section#3
A total of 10 questions based on pointers and structures in C are asked in this section. You can also be asked one or two questions on JAVA.
In this section:
A correct answer carries 2 marks
1 mark will be deducted for a wrong answer.

Section#4
This is the aptitude section consisting of 20 questions. Simple maths questions are asked which are very easy. The logical questions asked are similar to the ones given in the Barron's GRE book.
In this section:
A correct answer carries 2 marks
1/4 mark will be deducted for a wrong answer.
Interview

At the moment we do not have much informaton about the interview though the candidate may be required to go through both technical and HR interviews.
 
HCL Technologies offers world class technology solutions for the emerging network centric world. It provides a range of technology and software engineering services including Technology Development Services, Software Engineering Services , Application Engineering Services, Networking Services .
These services are predicated on a rich technology heritage. Experience with the development and application of technologies like Internet and E-Commerce, Embedded software, Networking and telecom protocols, VLSI design etc. Skills on a wide variety of computing platforms from Open Systems to Enterprise Servers based on mainframes expertise, object oriented and legacy system architecture, methodologies in addition to distinguished R&D background uniquely positions us as a preferred provider of technology and software engineering services in the emerging network centric world. HCL Technologies has established dedicated offshore software factories with clients such as Bankers Trust (Australia) , Lexis Nexis (US) , Southern California Edison (US), A Networking Major (US) HCL Technologies operates through 29 offices in 14 countries in United States , Europe, Japan, Asia Pacific The company employs 3300 IT professionals worldwide. HCL Technologies holds 100% stake in Intelicent (former HCL James Martin Inc.), a US based methodology consulting led Services Company. The company also has a 100% subsidiary in India, HCL Comnet Systems and Services Ltd, which provides networking services. 

For more information about this company visit their home site at www.hcltechnologies.com

Paper 1

Sample Test Paper
1. Which of the following involves context switch
(a) system call
(b) privileged instruction
(c) floating point exception
(d) all the above
(e) none of the above
Ans. (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 by the instruction which needs 3 clock cycles,
(a)120 nano secs
(b)120 micro secs
(c)75 nano secs
(d)75 micro secs
Ans. (a)

4. For 1 MB memory, the number of address lines required,
(a) 11
(b) 16
(c) 22
(d) 24
Ans. (b)

5. Semaphore is used for
(a) Synchronization
(b) dead-lock avoidance
(c) box
(d) none
Ans. (a)




6. Which holds true for the following statement
     class c: public A, public B
a) 2 member in class A, B should not have same name
b) 2 member in class A, C should not have same name
c) both
d) none
Ans. (a)

7. Question related to java

8. OLE is used in
a) interconnection in unix
b) interconnection in WINDOWS
c) 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 the following
(a) Macro
(b) conditional compliclation
(c) in type checking
(d) including load file
Ans. (c)

12. Piggy backing is a technique for
a) Flow control
b) Sequence
c) Acknowledgement
d) retransmission
Ans. (c)

13. In signed magnitude notation what is the minimum value that can be represented with 8 bits
(a) -128
(b) -255
(c) -127
(d) 0
Ans. (c)

14. There is an employer table with key fields as employer number data in every n'th row are needed for a simple following queries will get required results.

(a) select A employee number from employee A , where exists from employee B where A employee no. >= B
     employee having (count(*) mod n)=0
(b) select employee number from employe A, employe B where A employe number>=B employ number group by employee number having(count(*) mod n=0 )
(c) both (a) &a

15. Type duplicates of a row in a table customer with non uniform key field customer no. you can see

a) Delete from customer where customer no. exists (select distinct customer no. from customer having count)
b) delete customer a where customer no. in b rowid
c) delete customer a where customer no. in (select customer no. from customer a, customer b)
d) None of the above

16. Long int size
a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
ans. compiler dependent

17. x=2, y=6, z=6
x=y==z;
printf(%d", x) ?

18. what does the hexanumber E78 in radix 7.
(a) 12455 (b) 14153 (c) 14256 (d) 13541 (e) 131112
ans: (d)

19. Q is not equal to zero and k = (Q x n - s)/2 find 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

20. (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.

21. If A occurs which of the following must occurs
I. F & G
II. E and H
III. D
(a) I only (b) II only (c) III only (d) I,II, & III
(e) I & II (or) II & III but not both
ans: (e)


22. If B occurs which must occur
(a) D (b) D and G (c) G and H (d) F and G (e) J
ans: (a)

23. 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)

24. which may occurs as a result of cause not mentioned
(1) D
(2) A
(3) F
(a) 1 only (b) 2 only (c) 1 & 2 (d) 2 & 3 (e) 1,2,3
ans: (c)

25. E occurs which one cannot occurs
(a) A (b) F (c) D (d) C (e) J
ans: (b)

Section II - C Programming

1. Which of the following about the following two
declaration is
true
i ) int *F()
ii) int (*F)()

Choice :
a) Both are identical
b) The first is a correct declaration and the second is wrong
c) The first declaraion is a function returning a pointer to an integer and the second is a pointer to function returning int
d) Both are different ways of declarin pointer to a function

Answer : c)

2. What are the values printed by the following program?

#define dprintf(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 *p;
c =(char *)malloc(100);
p=(int *)c;
free(p);
}

ans: The code functions properly releasing all the memory allocated

4.output of the following.

main()
{
int i;
char *p;
i=0X89;
p=(char *)i;
p++;
printf("%x %x\n",p,i);
}
*
ans:0X8A

5. which of the following is not a ANSI C language keyword?

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 original array
b) In C parameters are passed by value. The function cannot change the original value in the array
c) It results in compilation error when the function tries to access the elements in the array
d) Results in a run time error when the funtion tries to access the elements in the array

Answer: a)

7. The type of the controlling expression of a switch statement cannot be of the type

a) int b) char c) short d)float e) none

Answer : d)

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 b is 7 ?
X = b>8 ? b <<3 : b>4 ? b>>1:b;

a) 7 b) 28 c) 3 d) 14 e) None
ans: 3;

10. Which is the output produced by the following program
main()
{
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 the output of the following program?
int x= 0x65;
main()
{
char x;
printf("%d\n",x);
}

a) compilation error b) 'A' c) 65 d) unidentified

12. What is the output of the following program
main()
{
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");
}
}

a) Does not print anything
b) Prints : Jan is the first month
c) Generates compilation error
d) Results in runtime error

Answer: b)

14. What is the output of the following program?
main()
{
char *src = "Hello World";
char dst[100];
strcpy(src,dst);
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);
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

Answer:d)10,22

17. What is the output of the f
ollowing problem ?
#define INC(X) X++
main()
{
int X=4;
printf("%d",INC(X++));
}

a)4 b)5 c)6 d)compilation error e) runtime error

Answer : d) compilation error


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 structure
c) Structures can refer to themselves. Hence the statement is OK
d) Structures can refer to maximum of one other structure

Answer :c)

19. What is the size of the following union? Assume that the size of int =2, size of float =4 and
size of char =1.

Union Tag{
int a;
flaot b;
char c;
};

a)2 b)4 c)1 d) 7

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....
d)None of the above

(1) The combined length of the longer two pieces of
rope is 12
metres.
(2) The combined length of the shorter two pieces of
rope is 11
metres.

(A) (B) (C) (D) (E)

10) A certain company paid bonuses of Rs. 125 to each
of its
executive
emplyees and Rs 75 to each of its nonexecutive
employees. If 100
of the employees were nonexecutive, how many were
executive?
1) The company has a total of 120 employees
2) The total amount that the company paid in bonuses
to its
employees was
Rs.10,000

(A) (B) (C) (D) (E)

11. What fraction of his salary did Mr. Johnson put
into savings
last week ?

1) Last week Mr.Johnson put Rs 17 into savings.
2) Last week Mr.Johnson put 5% of his salary into
savings.

(A) (B) (C) (D) (E)

12. Each M-type memory unit will increase the base
memory
capacity
of 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 type
memory
units
are added to the base memory capacity, is 1.6 times
the memory
capacity
of the computer after 1 M-type unit is added to the
base memory
capacity.

(A) (B) (C) (D) (E)

13. What fractional part of the total surface area of
cube C is
red?

1) Each of 3 faces of C is exactly 1/2 red
2) Each of 3 faces of C is entirely white

(A) (B) (C) (D) (E)

SECTION C

14. How many of the integers between 25 and 45 are even ?
(A)21 (B)20 (C)11 (D)10 (E)9

Answer: d)

15. If taxi fares were Rs 1.00 for the first 1/5 mile and Rs 0.20 for each 1/5 miles thereafter. The taxi fare for a 3-mile ride was

(A)Rs 1.56 (B)Rs 2.40 (C)RS 3.00 (D)Rs 3.80 (E)Rs 4.20

Answer :d)Rs 3.80

16. A computer routine was developed to generate two numbers (x,y) the first being a random number between 0 and 100 inclusive, and the second being less than or equal to the square root
of the first. Each of the following pair satisfies the routine EXCEPT

(A) (99.10) (B) (85.9) (C) (50.7) (D) (1.1) (E)
(1.0)

Answer : A) (99.10)

17. A warehouse had a square floor with area 10,000 sq.meters. A rectangular addition was built long one entire side of the warehouse that increased the floor by one-half as much as the original
floor. How many meters did the addition extend beyond the original buildings ?

(A)10 (B)20 (C)50 (D)200 (E)500

Answer: c)50

18. A digital wristwatch

Paper 3

Section 1- General Computer Concepts

3.Bit parity check,when performed on a byte ,can
catch
a)odd number of errors
b)even number of errors
c)any number of errors
d)none of the above
Ans: (a)

9.Virtual address are translated to physical
address by
(a)the process
(b)operating system
(c)MMU
(d)All of the above
(e) None of the above

10.convert the hexadecimal number 0xFEDB to the
octal
(a) 177333
ans: (a)

12. an internet IP address of a node
a)has to be unique only for the domain of the node
b)has to be unique in the node's sub-network
c)has to be unique in the country in which the node
is present
d)none of the above

14. Type duplicates of a row in a table customer with non unique key feild customer no. can use

a) delete from costomer where customer no. exists( select distinct customer no. from customer having count )
b) delete customer a where customer no. in (select cust_no from customer b where a.cust_no=b.cust_no) and a.rowid>b.rowid
c) delete customer a where custermor no. in ( select customer no. from customer a, customer b group by a.cust_no having (count(*)>1) and a.rowid>b.rowid);
d) none of the above

15.which of the following is a feature of the ANSI C language and not present in Java?
a) forward referencing
b)variable length argument lists
c)volatile modifier
d)none of the above
ans: (b)

section C - analysing program segements

1)struct dlink{
int nodeid;
struct dlink *next;
struct dline *prev;
} dlink_t;
A pointer to the head of tha linked list is
maintained
as a global variable whose definition is
dlink_t *head;

The function remove_element(dlink_t*rp), needs to
remove the node pointed to by rp and adjust the head

The first node's prev and the last node's text are
NULL
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 works when head is the same as rp;
b)it does not work whe rp is the last element on the
list
c)it sets the head of the list correctly
d)it works in all cases

ans:( b)

2.#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
second argument c is a character. This function
searches 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 contains the
character c
c)works when c is a non NULL character array
d)works only when the character c is found in the
string

3.main()
{
printf("%d\n",f(7));
}
f(x)
{
if(x<=4)
return x;
return f(--x);
}
a)4
b)5
c)6
d)7

4.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 %d\n",p);
}
a) 1 and 1 is printed
b) 1 and 4
c) 4 and 4
d) causes an exception

5.which is correct?

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

6. 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)55 and 55
e)35 and 35
ans : ( c )

7.int
func(int x)
{
if(x<=0)
return (1);
return func(x-1)+x;
}
main()
{
printf("%d",func(5));
}
a)12 b)16 c)15 d)11

8.consider the following fragments of c code in two
files which will be linked together and executed
a.c
int i;
main()
{
i=30;
f1();
printf("%d",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
d)a & b

9. void
funca(int *k)
{
*k+=20;
}
void
funcb(int *k)
{
int m=*x,*n=&m;
*n+=10;
}
main()
{
int var=25,;
*varp=&var;
funca(varp)
*varp+=10;
funcb(varp);
printf("%d%d,var,*varp);
}
(a) 20,55(b) 35,35(c) 25,25(d)55,55
ans : (d )

9. #include <stream.h>
class x{
public :
int a;
x();
};
x::x() { a=10;cout<< a ;}
class b:public x {
public :
b(); x();
};
b::b() { a=20;cout<<a;}
main()
{
b temp;
}
what will be the output of the following program?
a)10 b)20 c)20 10 d)10 20

section 4 - General Aptitude Section

1. In a murder case there are four suspects P,Q,R,S. Each of them makes a statement . They are
P : I had gone to the theatre with S at the time of the murder
Q: I was playing cards with P at the time of the murder
R: Q did not commit the murder
S: R is not the murderer

Assuming that only one of the above statement is false and that one of them is the murderer, who is the murderer?
a)p b)Q c)R d)cannot be concluded e)S

2.Mohan earned twice as much and deep.Yogesh earned Rs.3/- more than half as much as deep.If the amounts earned by mohan,deep and yogesh are M,D and y respectively which of the  following is the correct ordering of these amounts?
a)M<D<Y
B)M<Y<D
C)D<M<Y
D)it cannot be determined from the information given
e)D<Y<M

5.given that A,B,C,D,E represent one of the digits between 1 and 9 and that the following multiplication holds

ABCDE X4=EDCBA
Which digit does E represent?
a)4 b)6 c)8 d)7 e)insufficient data provided

6.HCL photocopying machine can make 10 copies every 4 seconds. At this rate,how may copies can the machine make in 6 minutes?
a)900
b)600
c)360
d)240
e)150
ans : ( a)

7. if a=2 , b=4 ,c=5 then
(a+b)/c - c/(a+b)=?
Ans : 11/30

8.10^2 (10 ^8 +10 ^8)/ 10^4=?
Ans : 2(10^6)

9.worker W produces n units in 5 hours.Workers V and W,working independently but at the same time produce n units in 2 hours. How long would it take V alone to produce n units?
Ans : 3 hr 20 min

10 . If q#0 and k=(rq/2) - s ,then what is r in terms of k,q ans s?
ans : 2(k+s)/q

Qestions 16-20
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 routs,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 cannot travel by the southern route
U cannot 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 memebers 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

17.if each of the two parties of knights consists of exactly three members,which of the following is not a possible travelling pary 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 northern route

18.if one of the two parties of knights consisits of U and two other knights and travels by the northern route,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

19.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 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

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

Two section were there one section is aptitude (35 questions 35 minutes) and other is general technical awareness ( 25 qus-25 min) Each ques. have 1 mark for correct and -1/4 for incorrect answer. General technical awareness is very simple need not to be sent .It was based on c, c++ and computer awareness.

Q1. In a island there are people of two community type 'A' and type 'B'. people of this island can ask question only. Questions asked by type 'A'  have correct answer YES and question asked by type 'B' have correct  answer 'NO'.

Five question are based on this paragraph.
1) One person asked another person "am I a type of 'B'"? what is type of person who asked question.
a) type 'A'
b) type 'B'
c) either 'A' or 'B'
d) such question can not be asked.

2) person of type 'A' asked to his wife " are we of same type" . What is type of his wife?

Q2 . There are six people A,B,C,D,E,F and five cars .cars are stand in sequence numbered 1 to 5 and each car can be share by two persons only.and conditions are
'A' will share car
'B' will sit alone
'F' will not share car with 'D' and 'E'
'D' will drive car 3rd or 4th car
'E' will drive a car which is behind the car with vacant seat.

Following are the qus based on this para

6) if 'D' are sit on the 3rd car how many different arrengment will be there.

total 7- 8 question asked from this paragraph search this qus. in GRE book. I don't remember the qus. And there ans because this was very tough

Q3
DATA SUFFICIENCY
Direction:Read the following instructions carefully and answer questions
11-15 given below:

Each question below is followed by two numbered facts. You have to determine whether the data given in the statement is sufficient for answering the question. Choose one of the following choices best fitting the question and mark A,B,C,D or E as explained below. 
(A) if statement 1 alone is sufficient to answer the question, but statement 2 is not sufficient.
(B) If statement 2 alone is sufficient to answer the question, but statement 1 is not sufficient.
(C) If both statements together are needed to answer the question, but neither statement alone is sufficient.
(D) If either statement by itself is sufficient to answer the question.
(E) If enough facts are not available to answer the question.

13. Is X =Y?
(1) X-Y=X^2-Y^2 ans:( )
(2) X and Y are greater than 1.

14. Is CAB a code word in language Q?
(1) ABC is the base word.
(2) If c immediately follows B, then C can be moved to the front of the code word to generate another word?
ans:( )

15. A dress was initially listed at a price that would have given the store a profit of 20 percent of the wholesale cost. What was the wholesale cost of the dress?
(1) After reducing the asking price by 10 percent, the dress sold for a net profit of 10 dollars.
(2) The dress sold for 50 dollars.
ans:( )

16. If X and Y do not equal 0, is X/Y an integer?
(1) X is prime
(2) Y is even ans:( )

17. What is the price of a banana?
(a) 14 banana and 35 oranges cost Rs. 84
(b) with a 50% discount on banana, Rs. 12 can buy 4 bananas and 5 oranges.
ans:( )

Some qus on fill in the blanks .

6.A+B=C+D;A+C=B+D ;2A>B+D;2C<B+D; Find the arrangements of the letters like e.g:A>B>C>D> etc and all.

Q.NO.1&2
A FACTORY produces a product (measured in cubic feet) over seven days as per the following schedule:
Day1 Day2 Day3 Day4 Day5 Day6 Day7
150 180 120 250 160 120 150
The finished goods are to be transported to the market by a truck having a capacity of 2000 cubic feet. Any finished goods (ready at the end of the day) retained overnight at the factory will incur a storage cost of rs.5 per cubic foot for each night of storage. The hiring cost for the truck is rs.1000 per day.

1.If the total cost of transportation and storage is to be minimized,
the truck should operate on
(a) 2nd,4th,6thand 7th days
(b) only the 7th day
(c) 2nd,4th,5th and 7th days
(d) only on 4th and 5th days
(e) none of these
ans:( )
2.if the storage cost reduces to re.0.80per cubic foot per night,the
truck should operate on
(a)2nd,4th,5thand 7th days
(b)only the 7th day
(c)2nd,4th,5th and 7th days
(d)only on 4th and 5th days
(e)none of these
ans:( )

6.if a+d=b+c,a+e=c+d,2cb+d,then
(a) a>b>c>d>e
(b) b>a>d>c>e
(c) d>b>c>a>e
(d) b>c>d>e>a ans:( )
(e) none of these

Q21. three students appear in a test but no one write there name on answer sheet .and they submitted their sheet to teacher . when teacher distributed their answer sheet . what is probability that no one get their own answer sheet.

 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 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 NULL.

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 list
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 *
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 second argument, c, is a character. This function searches 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 contains the character c
c) works when c is a non NULL character only
d) Works only when the character c is found in the string
answer: a

03) What is printed when this program is executed
main()
{
printf ("%d\n",f(7));
}
f(X)
{
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 %d\n",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?

int
func (int x)
{
if (x<=0)
return(1);
return func(x -1) +x;
}
main()
{
printf("%d\n",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("%d\n",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 %d\n",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)

Section I ( 25 ques 30 mins aptitude 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 parna, 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;2C<B+D; Find the arrangements of the letters like 
e.g:A>B>C>D> etc and all. 

7.MBC=(BE)2; where M,B,C,E represent different numbers What does M represent. 

8.There was a question on number series.

9. 20 ? 15
0 18 11
Ans(6)

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,
a)AD(ans)
b)CD
c)EA
d)BA
e)ED

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
ans:---------,-----------,-----------,-----------,green,orange
(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?

11) d used as a network layer protocall in network and windows system 

12) b has to be unique in the sub network

15) c Volatile modifier

1) ans: recursion

note: order of a,b,c,d are doubt but answer is correct.

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 functions with 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

SECTION-IV

following are not in order:

2. M > D > Y ans: (a)

6. 10 in 4 seconds,
? in 6 minutes = 10x6x60/4 = 900 ans: (a)

7. a=2, b=4, c=5
(a+b)/c - c/(a+b) = 11/30 (ans).

8. 100(100000000+100000000)/10000 = 2x1000000 (ans).

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)

{ if(x<=0)
return; ans fn(5) ....?
else f(x-1)+x;
}

4. i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}

printf("%d", k); ans k=4

5. int i =10
main()
{
int i =20,n;
for(n=0;n<=i;)
{
int i=10
i++;
}
printf("%d", i); ans i=20

6. int x=5;
y= x&y

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
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 A PROCEDURE TO DELETE
STRUCT NEW; AN ELEMENT WILL BE 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)
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
------------

(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 n units of work in 2
hrs
in how many hrs n units of work ans:3 hr 30 min p = (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


(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 <100 ---ans=n+9
Pper 5

DATA SUFFICIENCY
Direction:Read the following instructions carefully and answer questions 11-15 given below:
Each question below is followed by two numbered facts. You have to determine whether the data given in the statement is sufficient for answering the question. Choose one of the following choices best fitting the question and mark A,B,C,D or E as explained below.
(A) if statement 1 alone is sufficient to answer the question, but statement 2 is not sufficient.
(B) If statement 2 alone is sufficient to answer the question, but statement 1 is not sufficient.
(C) If both statements together are needed to answer the question, but neither statement alone is sufficient.
(D) If either statement by itself is sufficient to answer the question.
(E) If enough facts are not available to answer the question.

13. Is X =Y?
(1) X-Y=X^2-Y^2 ans:( )
(2) X and Y are greater than 1.

14. Is CAB a code word in language Q?
(1) ABC is the base word.
(2) If c immediately follows B, then C can be moved to the front of the code word to generate another word?
ans:( )
15. A dress was initially listed at a price that would have given the store a profit of 20 percent of the wholesale cost. What was the wholesale cost of the dress?
(1) After reducing the asking price by 10 percent, the dress sold for a net profit of 10 dollars.
(2) The dress sold for 50 dollars.
ans:( )
16. If X and Y do not equal 0, is X/Y an integer?
(1) X is prime
(2) Y is even ans:( )
17. What is the price of a banana?
(a) 14 banana and 35 oranges cost Rs. 84
(b) with a 50% discount on banana, Rs. 12 can buy 4 bananas and 5 oranges.
ans:( )

two deadly questions on series.

Some qus on fill in the blanks .

6.A+B=C+D;A+C=B+D ;2A>B+D;2C<B+D; Find the arrangements of the
letters
like
e.g:A>B>C>D> etc and all.

Q.NO.1&2
A FACTORY produces a product (measured in cubic feet) over seven days as per the following schedule:

Day1 Day2 Day3 Day4 Day5 Day6 Day7

150 180 120 250 160 120 150

The finished goods are to be transported to the market by a truck having a capacity of 2000 cubic feet. Any finished goods (ready at the end of the day) retained overnight at the factory will incur a storage cost of rs.5 per cubic foot for each night of storage. The hiring cost for the truck is rs.1000 per day.

1.If the total cost of transportation and storage is to be minimized, the truck should operate on
(a) 2nd,4th,6thand 7th days
(b) only the 7th day
(c) 2nd,4th,5th and 7th days
(d) only on 4th and 5th days
(e) none of these
ans:( )
2.if the storage cost reduces to re.0.80per cubic foot per night,the truck should operate on
(a)2nd,4th,5thand 7th days
(b)only the 7th day
(c)2nd,4th,5th and 7th days
(d)only on 4th and 5th days
(e)none of these
ans:( )


6.if a+d=b+c,a+e=c+d,2cb+d,then
(a) a>b>c>d>e
(b) b>a>d>c>e
(c) d>b>c>a>e
(d) b>c>d>e>a ans:( )
(e) none of these



Q21. three students appear in a test but no one write there name on answer sheet .and they submitted their sheet to teacher . when teacher distributed their answer sheet . what is probability that no one get their own answer sheet.
 
HCl came to PEC on 22ND

1. give a word which when put behind GRASS and infront of SCAPE gives 2 different english words

ans : LAND

2. jumble word

ans: PARACHUTE

3. picture puzzle

ans: 23 or 25 don`t remember exactly

4. divide 330 into 2 numbers such that removing 1 zero from right of one gives the other no

ans: 300 and 30

5. one ques of time calculation

ans: 21:00 most probably

6.sally likes 225 not 224,likes 144 not 143

ans: 1600 ( has to be perfect square)

7. 8. 9. 10. 11

12 . it is raining at night. is it possibe to see sunshine after 72 hrs

ans: NO ( after 72 hrs it still is night....no sunshine )

hcl perot system

Section 1

21.a man bought 30 kgs at cost 10.5rs/kg and 30 kgs at cost 9.5rs/kg. he combines the two. at wat price shud he sell to have a gain% 35%?

22.fine the result
(2-1/3)(2-3/5)(9/7)(2-997/999)
ans none of these
23.total no of prime nos between 1 to 70
ans 20
24.three lights change after 48,72,108 secs. at 08:20:00 they all changed together. at wat time will they again change together?

25.a team of men do a work in 25 days. in how many days will a team of equal ppl will do the same twice if 2 men of the first team do equal work as 3 men do of other team

26.30 yrs ago av age of A n B was 18. after 30 yrs av age of A,B n c is 22. wat is the age of c?
27.if a no is divided by 999, qt is 366 and rem is 103. wats the no?
28.126 m train at a speed of 30kph ans 114 m train at a speed of 42kph cross each other. how much time do they take?
29.a bridge is 1 km. a train half of length of bridge crosses it in 2 mins. wats its speed?
30.a do a work on 6 days. b do a work in 8 days. they both do a work for rs 640. c join them n they do the work in 3 days. how much did they pay to c?

some other similiar Qs. this is all i remember in this sec.
section 3
36 to 45
based on simple c programs and simple assembly language programs.
36.i=1680
j=4
if((mod i ,j)=0)
i=i/3
j=j+i
wat will be the o/p after termination?
37.min= d
a<d,min=a
b<d,min=b
c<d,min=c
c<b,min=b
some conclusions were given and u have to select the rt conclusion
38.
1's complement of 1100110
39.add program of assembly lang was given and was asked to select the error
40.total no of 1 bits in 1536*448*24*3
41.,42 and 43...a flow chart was given and values of x,y and z were given and then u have ti solve them. very simple but time consuming.

42.and 43. a program in c was given somethn like
assign 0 to d
i=1
j=1
k=1
x=i+j+k
if x/3 has a rem 0 then increment d by 1
add 1 to k
somethn somethn and thy asked u the value of d in 42 and the no of loops in 43 for step 6.
Paper 7

HCL (or) HCL Perot Systems (HPS) (or) HCL-CISCO

section 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.

1) int i=10;
printf("%d %d %d",i++,i++,i--);
there is one or two more question on increment operator
2) 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 syntax
5) 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 # define directive is declared in the main() function of the program and u have to predict the output of the program.?

9) what is the time complexity of bubble sort (Ans: O(n^2))
10) what is the preorder traversal of the folowing tree
some tree is given (this is not the actual tree given in the paper only idea)
A
/ \
B C
/ \
D E
/ \
F G
11) x=2,y=6,z=6
x=y==z;
printf(%d",x)
12) What is the size of the address bus and data bus in 8086?
13) address of IVT in 8086?

Section II:
1) some 6 guys are there A,B,C,D,E,F(say) and u have to adjust in the row.
and some statements are there like A & D can't be adjacent
E,A have one vacant area in between.. like that and there are 5 questions are based on that?
2) this one is tricky .. there are two groups . one is many brothers can mary one sister of other group. and second is many sister can mary one brother of other group
and some statements are there like V & U is father of S, X is the only grandmother of S ...like that..
And there are 6 question based on that..
3) and rest of questions are purely aptitude & quant based.
like there are two questions on coding if MYSORE is code like MEMEME
then how TAMILNADU is coded?

3. Which of the following is true of the following program
main()
{
char *c;
int *p;
c =(char *)malloc(100);
ip=(int *)c;
free(ip);
}
ans: The code functions properly releasing all the memory allocated
4.output of the following.
main()
{
int i;
char *p;
i=0X89;
p=(char *)i;
p++;
printf("%x\n",p);
}
ans:0X8A
5.which of the following is not a ANSI C language keyword?
ans:Function.

6. The type of the controlling expression of a switch statement 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

10. Which is the output produced by the following program
main()
{
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
12. What is the output of the following program
main()
{
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");
}
}

a) Does not print anything
b) Prints : Jan is the first month
c) 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(src,dst);
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);
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

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) runtime error

Answer : d) compilation error


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 structure
c) Structures can refer to themselves. Hence the statement is OK
d) Structures can refer to maximum of one other structure

Answer :c)

19. What is the size of the following union.
Assume that the size of int =2, size of float =4 and size of char =1.
Union Tag{
int a;
flaot b;
char c;
};

a)2 b)4 c)1 d) 7



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....
d)None of the above


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 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 NULL.

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 fution
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 list
c) It sets the head of the list correctly
D) 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 second
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 string
ans: a

03) What is printed when this program is executed
main()
{
printf ("%d\n",f(7));
}
f(X)
{
if (x<= 4)
return x;
return f(--x);
}

a) 4
b) 5
c) 6
d) 7
ans: 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 %d\n",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);
}
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 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?


int
func (int x)
{
if (x<=0)
return(1);
return func(x -1) +x;
}
main()
{
printf("%d\n",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("



Aptitude:
1. A was born when B was 1 year and 3 months old. C was born when A
was 2 years 1 month old. What is the age of B when C is 4 years and 6
months old?

2. If one type of tobacco costs Re.1/- per kg and other type costs
Rs. 5/- per kg. What quantity of first type and second type are mixed
so that 100 kg of mixture osts Rs. 100/-?

3. If an article is bought at a profit of 15% and sold at a loss of
15% what is my total profit percent or loss percent?

4. There are 5 questions in a question paper. In an examination 5%
students answer all questions and 5% answered none. 50% of the rest
answered 3 questions and 20% answered 2 questions and 300 answered
only 1 question. How many students appeared for the test?

5. A boat is going upstream with the velocity of ............

6. one question on probability.

7. one question on a paragraph.

8. one question on equations. (very simple)

that's all i could recall right now....note that these questions does
not contain the exact figure. But question formats were same. It'll
help you a lot. If you know how to do questions 1-4 then you can skip
these chapters while preparing. Questions from these chapters will
not be repeated.

HCL (or) HCL Perot Systems (HPS) (or) HCL-CISCO

SECTION A

The following program accepts a pair of 2 numbers from the user of system and totals them. Numbers are accepted in pair repeatedly and totaled, until grand total of all the pair of numbers accepted does not exceed 9.

Step 1 : Assign value 0 to x
Step 2 : Accept 1st number and assign to A
Step 3 : Accept 2nd number and assign to B
Step 4 : Add A and B assign to C
Step 5 : Add C to X
Step 6 : If X<10 go to Step 1
Step 7 : Stop.

The error in the above routine is

Step 6 should be If X<9 go to Step 1
Step 1 is redundant
Step 4 should be Add A & B and assign to X
Step 6 should read If x<10 go to Step 2
Step 1 should be Assign value 0 to A & B

The following program finds the greatest of the three numbers A, B and C and prints the result

Step 1 : If A>B assign A to X
Step 2 : If A>C assign A to X
Step 3 : If B>C assign B to X
Step 4 : Print X
The error in the above program:

It does not work in case C > A
It does not work in case B > A
It does not work in case C > B
It does not work in case A = B = C
All of the above

Study the following program and answer the following questions :

Step 1 : A = 0
Step 2 : B = 0
Step 3 : If B > 1
Step 4 : A = A + 1
Step 5 : B = B + 1
Step 6 : GOTO 7
Step 7 : END IF 9
Step 8 : B = B - 1
Step 9 : Stop.

What is the value of B at termination of program?
A) <1 B) 0 C) 1 D) 2 E) none of the these
Object oriented language does not exhibit the following property:

Structured Programming
Private variables
Inheritance
Linking at runtime
Polymorphism

A) I B) II C) III D) IV E) V

Ingress is

A 3GL
An operating system
A structured query language
Programming language
e) RDBMS

Which of the following is not a natural member of the set

A) UNIX B)OS/2 C)PICK D)LAN E) VMS

Which of the following is not a DBMS

ORACLE B) SYBASE C) PICK D) INFORMIX E) UNIFY

LOTUS 1-2-3 is a

Word processing S/w
Case tool
DBMS
Laser printer
None of the above

SECTION B

IF STATEMENT (1) ALONE IS SUFFICIENT, BUT STATEMENT (2) ALONE IS NOT SUFFICIENT TO ANSWER THE QUESTION ASKED.
IF STATEMENT (2) ALONE IS SUFFICIENT, BUT STATEMENT (1) ALONE IS NOT SUFFICIENT TO ANSWER THE QUESTION ASKED.
IF BOTH STATEMENT (1) AND (2) TOGETHER ARE SUFFICIENT TO ANSWER THE QUESTION ASKED., BUT NEITHER STATEMENT ALONE IS SUFFICIENT.
IF EACH STATEMENT ALONE IS SUFFICIENT TO ANSWER THE QUESTIONS ASKED.
IF STATEMENTS (1) AND (2) TOGETHER ARE NOT SUFFICIENT TO ANSWER THE QUESTION ASKED., AND ADDITIONAL DATA SPECIFIC TO THE PROBLEM ARE NEEDED.

If a rope is cut into three pieces of unequal length, what is the length, what is the length of the shortest of these pieces of rope ?

The combined length of the longer two pieces of rope is 12 metres

The combined length of the shorter two pieces of rope is 11 metres

(A) (B) (C) (D) (E)

A certain company paid bonuses of Rs.125 to each of its executive employees and Rs.75 to each of its non-executive employees. If 100 of the employees were non-executive, how many were executives?

The company has a total of 120 employees

The total amount that the company paid in bonuses to its employees was Rs.10,000

(A) (B) (C) (D) (E)

What fraction of his salary did Mr. Johnson put into savings last wek?

Last week Mr. Johnson put Rs.17 into saving.

Last week Mr. Johnson put 5% of his salary into savings.

(A) (B) (C) (D) (E)

Each M-type memory that will increase the base memory capacity of a certain computer by 3 megabytes. What is the base memory capacity, in megabytes, of the computer?

2 M-type memory units will increase the computer's base memory capacity by 300%

The memory capacity of the computer after 2-M type memory units are added to the base memory capacity, is 1.6 times the memory capacity of the computer aftgter 1 M-type unit is added to the base memory capacity.

(A) (B) (C) (D) (E)

13) What fractional part of the total surface area of cube C is red?

Each of 3 faces of C is exactly 1/2 red

Each of 3 faces of C is entirely white.


(A) (B) (C) (D) (E)



SECTION C

INSTRUCTIONS: ALL NUMBERS USED ARE REAL NUMBERS FOLLOWING
EACH QUESTIN ARE FIVE POSSIBLE ANSWERS LABELED
A), B), C), D), E). TICK THE BEST CHOICE.

How many of the integers between 25 and 45 are even?

A) 21 B) 20 C) 11 D) 10 E) 9

If taxi fares were Rs.1.00 for the first 1/5 mile and Rs.0.20 for each 1/5 miles thereafter, the taxi fare for a 3-mile ride was

A) Rs.1.56 B) Rs.2.40 C) Rs.3.00 D) Rs.3.80 E) Rs.4.20

16) A computer routine was developed to generate two numbers (X, Y) the first being a random number between 0 and 100 inclusive, and the second being less than or equal to the square root of the first. Each of the following pairs satisfies the routine EXCEPT


A) (99.10) B) (85.9) C) (50.7) D) (1.1) E) (1.0)

17) A warehouse had a square floor with are 10,000 sq. metres. A rectangular addition was built along one entire side of the warehouse that increased the floor by one-half as much as the original floor. How many metres did the addition extend beyond the original building?

A) 10 B) 20 C) 50 D) 200 E) 500

A digital wristwatch was set accurately at 8.30 a.m. and then lost 2 seconds every 5 minutes. What time was indicated on the watch at 6.30 p.m. of the same day if the watch operated continuously that time?

A) 5:56 B) 5:58 C) 6.00 D) 6:23 E) 6:20

A 5 litre jug contains 4 litres of a saltwater solution that is 15 percent salt. If 1.5 litres of the solution spilts out of jug, and the jug is then filled to capacity with water, approximately what percent of the resulting solution in the jug is salt?

7.5% B) 9.5% C) 10.5% D) 12% E) 15%

A plane travelled K miles in the first 96 minutes of flight time. If it completed the remaining 300 miles of the trip in 1 minute, what was its average speed in miles per hour for the entire trip?
Paper 8

HCL (or) HCL Perot Systems (HPS) (or) HCL-CISCO


section 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 are
1) int i=10;
printf("%d %d %d",i++,i++,i--);
there is one or two more question on increment operator
2) 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 syntax
5) 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 # define directive is declared in the main() function of the program and u have to predict the output of the program.?

9) what is the time complexity of bubble sort (Ans: O(n^2))
10) what is the preorder traversal of the folowing tree
some tree is given (this is not the actual tree given in the paper only idea)
A
/ \
B C
/ \
D E
/ \
F G
11) x=2,y=6,z=6
x=y==z;
printf(%d",x)
12) What is the size of the address bus and data bus in 8086?
13) address of IVT in 8086?

Section II:
1) some 6 guys are there A,B,C,D,E,F(say) and u have to adjust in the row.
and some statements are there like A & D can't be adjacent
E,A have one vacant area in between.. like that and there are 5 questions are based on that?
2) this one is tricky .. there are two groups . one is many brothers can mary one sister of other group. and second is many sister can mary one brother of other group
and some statements are there like V & U is father of S, X is the only grandmother of S ...like that..
And there are 6 question based on that..
3) and rest of questions are purely aptitude & quant based.
like there are two questions on coding if MYSORE is code like MEMEME
then how TAMILNADU is coded?

HCL (or) HCL Perot Systems (HPS) (or) HCL-CISCO

Section II - C Programming
1. Which of the following about the following two declaration is true
i ) int *F()
ii) int (*F)()
Choice :
a) Both are identical
b) The first is a correct declaration and the second is wrong
c) The first declaraion is a function returning a pointer to an
integer
and
the
second is a pointer to function returning int
d) Both are different ways of declarin pointer to a function
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 *p;
c =(char *)malloc(100);
ip=(int *)c;
free(ip);
}
ans: The code functions properly releasing all the memory allocated
4.output of the following.
main()
{
int i;
char *p;
i=0X89;
p=(char *)i;
p++;
printf("%x\n",p);
}
ans:0X8A
5.which of the following is not a ANSI C language keyword?
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 original array
b) In C parameters are passed by value. The funciton cannot change the
original
value in the array
c) It results in compilation error when the function tries to access
the
elements in the array
d) Results in a run time error when the funtion tries to access the
elements
in
the array
Answer: a) The fu...
7. The type of the controlling expression of a switch statement
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 b is 7 ?
X = b>8 ? b <<3 : b>4 ? b>>1:b;
a) 7 b) 28 c) 3 d) 14 e) None
ans: 3;
10. Which is the output produced by the following program
main()
{
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
12. What is the output of the following program
main()
{
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");
}
}

a) Does not print anything
b) Prints : Jan is the first month
c) 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(src,dst);
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);
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

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) runtime error

Answer : d) compilation error


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 structure
c) Structures can refer to themselves. Hence the statement is OK
d) Structures can refer to maximum of one other structure

Answer :c)

19. What is the size of the following union.
Assume that the size of int =2, size of float =4 and size of char =1.
Union Tag{
int a;
flaot b;
char c;
};

a)2 b)4 c)1 d) 7



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....
d)None of the above


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 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 NULL.

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 fution
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 list
c) It sets the head of the list correctly
D) 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 second
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 string
ans: a

03) What is printed when this program is executed
main()
{
printf ("%d\n",f(7));
}
f(X)
{
if (x<= 4)
return x;
return f(--x);
}

a) 4
b) 5
c) 6
d) 7
ans: 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 %d\n",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);
}
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 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?


int
func (int x)
{
if (x<=0)
return(1);
return func(x -1) +x;
}
main()
{
printf("%d\n",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("



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 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 NULL.

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 fution
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 list
c) It sets the head of the list correctly
D) 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 second
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 string
ans: a

03) What is printed when this program is executed
main()
{
printf ("%d\n",f(7));
}
f(X)
{
if (x
<= 4)
return x;
return f(--x);
}

a) 4
b) 5
c) 6
d) 7
ans: 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 %d\n",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);
}
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 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?


int
func (int x)
{
if (x
<=0)
return(1);
return func(x -1) +x;
}
main()
{
printf("%d\n",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("%d\n",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

ans: e) a & b

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 %d\n",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

ans: d

10) consider the following program:
# include
class x {
public:
int a;
x();
};
x::x() { a=10; cout
<class b:public x {
public:
b();
};
b::b() { a=20; cout
<main ()
{ b temp;
}
what will be the output of this prg?
a) 10
b) 20
c) 2010
d) 1020

ans: b

Section IV - General Aptitude Section
1) In a murder case there are four suspects P,Q,R,S. Each of
them
makes a statement. They are
p: "I had gone to the theatre with S at the time of the
murder".
q: "I was playing cards with P at the time of the murder".
r: "Q didn't commit the murder".
s: "R is not the murderer".

Assuming the only one of the above statement is false and that
one of
them is the murderer, who is the murderer?
a) P
b) Q
c) R
d) Cann't be concluded
e) S

and: E

2) Mohan earned twice as much as Deep. Yogesh earned rs.3/- more
than
half as much as deep. If the amounts earned by
Mohan,Deep,Yogesh
are M,D,Y respectively, Which of the following is the correct
ordering
of these amounts?
a) M
< D < Y
b) M
< Y < D
c) D
< M < Y
d) It cann't be determined from the information given
e) D
< Y < M


03) Statistics indicate that men drivers are involved in more
accidents than women drivers. Hence it may be concluded that
a) sufficiently information is not there to conclude anything
b) Men are actually better drivers but drive more frequently
c) Women Certainly drive more cautiously than Men
d) 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 radix 7 ?
a) 12455
b) 14153
c) 14256
d) 13541
e) 13112

ans:d

5)Given that A,B,C,D,E each represent one of the digits between
1 and
9 and that the following multiplication holds:
A B C D E
X 4
--------------
E D C B A
--------------

what digit does E represent ?

a) 4
b) 6
c) 8
d) 7

Ans: c

6) HCL prototyping machine can make 10 copies every 4 seconds.
At this
rate, How many copies can the machine make in 6 min.?

a) 900
b) 600
c) 360
d) 240
e) 150

ans: a

7) if a=2,b=4,c=5 then
a+b c
----- - ---- =
c a+b

a) 1
b) 11/30
c) 0
d) -11/30
e) -1

ans: b

8) 10^2(10^8+10^8) =
--------------
10^4

a) 2(10)^4
b) 2(10)^6
c) 10^8
d) 2(10)^8
e) 10^10

ans: b

9) Worker W produces n units in 5 hours. Workers V and W,
workers
independently but at the same time, produce n units in 2
hours.
how long would it take V alone to produce n units?
a) 1 hr 26 min
b) 1 hr 53 min
c) 2 hr 30 min
d) 3 hr 30 min
e) 3 hr 20 min

ans: d

10) if q < 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

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
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

ans: 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

ans: 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

ans: 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

ans: e

=============================================================================
There were three tests- technical 40 quest.(from
database, unix and C)
, apti - 25 and 1 programming part (It was to
implement circular queue)


One q on as an example ( i donnt remember exactly the
same q but it was looking like this)
---------------------
1
a c b c
X g c
--------
a o i f
g s d j
---------
g h h k
-------
4 q based on the above.-value of c, b, g etc.

GRE 13th edition-analytical ability page-389
Qs(1-4){ms Braun,mr white,mr black,ms green,mr
parker,mr allen)

page-394 Qs(37-39) {baseball team-miller craig hook
mizel}

six to seven question ask from R.S.AGGRWAL FOR THIS
YOU MUST READ THE STATEMENT AND CONCLUSION,DERIVING
CONCLUSION FROM PASSAGE,STATEMENT AND ASSUMPTIOM,
STATEMENT AND ARGUMENT FROM R,S.AGGRWAL VERBAL
REASONING.

1)A gambler bets on the team of seven players ABCDEFG
whose winning a-4 to 1 against b-4 to 1 against c-4 to
1 against d-4 to 1 against e-5 to 1 against f-6 to 1
against g. how should he bet on g to set 20% profit.

2)If a person buy radio worth Rs 2468 and pay 7% sales
.how much price of radio should reduce to pay only Rs
2468.

3)what is vasu salary if salary of vasu is more than
rajan salary working in same company
i)vasu salary is 100 more than rajan salary.
ii)rajan found 2000 allowns which is 50 less than
vasu.
iii)basic salry of rajan is 1000.

i)only i is required ii)i & ii is required iii)i& iii
is required iv)i&ii&iii is required
v)none of these

4)if in 100 miles race 8 person is running winner take
9.8sec and fifth man takes 10.4 sec the time of 8 man
is in AP if in 4*100 meters realy of onside is 1,4,5,8
position then win by.
a).3 sec b).1 sec c).7 sec d).5 sec e)none

5)how many sons X have
qwe based on relation
i)
ii)
iii)
ans(data i,ii,iii is insufficient)

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 terminal
emulation
a) session b) application c) presentation d)
transport

3. Speed of the processor is given 35mhz,find the
time taken for 3 clock cycle.Ans=20 bits.

4. To address a memory of 1 mb, How many bits are
required.Ans= 20 bits.

5. Semaphores used for .Ans=Synchronisation.

6. Termination emulation is done in which layer in
osi model. Ans =Application layer.

7. Which of the following involve context switch.
a. System call, b. Privileged instruction, c.
kernal mode,
d.None of these , Ans=d.

8.Given an employee table,Find the employee with the
second largest salary. ans: b application
9.OLE ans.winNT
10)IP address

11)SI*(*(f[])())()

12)In ANSI C which is such thing is not in Java.

13)typedef struct node
{
int
NODEPTR * NODE
}

14)Q. In signed magnitude notation what is the
minimum value that can be
represented with 8 bits
a) -128 b) -255 c) -127 d) 0

15)Q. there is an employer table with key feilds as
employer no. data in every n'th row are needed for a
simple following queries will get required results.
a) select A employe no. from employe A , where
exists from employe B where A employe no. = B employe
having (count(*) mod n)=0
b) select employe no. from employe A, employe B
where
A employe no. = B employ no. grouply employe no.
having (count(*)
mod n=0 )
c) both a& b
d)none of the above

16. Piggybacking is done for, Ans=Acknowledgement.

17.WHICH IS NOT BASIC data type
ans.Char*

18.which of the following statement is valid for
string copy
char *srt,*ptr;
a)while(*str)
{
*str=*ptr;
++str=++ptr;
}

b)
while(*str)
{*++str=*++ptr};
c) d)

19) Two variable cannt have the same name in
a)function b) block c) file d)---
C Section
******************
20. #define inc(x) x++
main()
{
int t=1;
printf("%d",inc(t++));
}

21. one or two que for the complicated declaration.

22. Const char *a="Abcd";
char const *a="lmno";
base do this,Two que were there.

23.char *p ;
char q[20];

24.int i,*p=&i;
p=malloc(10);
free(p);
printf("%d",p);
ans : garbage

25.int i=20,*j=&i
f(i)
printf("%d",i);

26.#define val 1+2
printf("%d%d",val/val,val^3)
ans : 3 9
27.#define "this" "#"
#define (x,y) x##y
printf("this","this is")
ans: compilation error (tested)

28.(2^2)+(a^a)

29. int a ,b=7
a=b<4?b<<1:b4?71:a
ans.3

30.one que on c++ class member function
ans.d

31.work of memory management unit.

32.who relate virtual memory to physical memory
ans.os

33.memory is allocated to variable
a)when declared b)when define c)...

34.question on double linked list
35. define success 1
define failure -1
if(condition)
printf(success);
else
printf(failure);
ans success

36. main()
{
int var=25,varp;
varp=&var;
varp=10;
fun(varp);
printf(%d%d",var,varp);
ans a)45,45 b)55,55 c) 20,55;

37. u r given two statements
a=(10.15);
b=10,15;
if they are executed what is the output
printf("%d%d",a,b);
a)10,15 b)15,10 c)10,10 d)15,15
ans a

38. define null 0
ans=0;

39. #define inc(x) x++
main()
{
int t=1;
printf("%d",inc(t++));
}
ans.error

40.argument in funtion can be passed
1)by value 2)by refference 3)....

41.
main
{int x=1,y=2,z=3;
x=y==z;
printf(x);
}

42.in switch float is not used

43.one question on register variable.

1.HCL has two divisions a) technology division b) application
division.if a
student opts for a) then he has to give 2 papers 1)
aptitude(25 questions) 2)
technical(30 approx).if he opts for application field then he
has
to give only
apti paper which is same as that of techni paper.

2.after the written results are declared the technology
students
are given
another test of 15 minutes in which they have to write a C
program(reversing
string, reversing singly/doubly link list(FAVOURITE))and then
interview is
taken.

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 25 then it is
on
safe side.

APTITUDE PAPER

question not in order.i dont remember all question.if you have
time practice
BARRON's analyttical ability.most q's from here.

1) BARRON section ANALYTICAL ABILITY page 396, practice
excercises
question
1-4(edition of my book 1998 check out).quest like this miss
braun,
mr white,
miss green, mr parker etc.

2) BARRON section ANALYTICAL ABILITY page 401, practice
excercises
question
37-39(edition of my book 1998 check out). base ball
team,pitchers-craig,hook.

3) the closing of the resturant by Mr.X on SEPT 1 was
considered
an
unfinancial one, as the weather remained unusually clear and
sunny
for another
one month.

An author who criticizes the act of Mr. X would be proved wrong
if
the
following was true??
ANS choice a) the weather did not usually remained fine after
SEPT
1.

4) SUSAN works in a company who has restricted its employees
from
smoking
cigerrates in the canteen.As susan is the employee of the
company
she does not
smoke cigerrate in the canteen.

Which of the following unused phrases strengthens the rules of
the
company??

ANS the employees normally do not do the work for which the
company has
forbidden them to do.

5) A q's on family relation was given like How many sons X has

I P is the
daughter of X

II some
condt.

III some
condt.
ANS al I ,II, III together are not sufficient.

6)a q's in which a name KAPIL is given he visits manoj's
home.some
condts
given.
ANS b)

7)A,B,C,D are the 4 plays which are organised starting from
tuesday.find the
day on which C was played.in this 2 condt. will be given as
I.....................
II....................
ANS both I and II

8)a quest on crypto graphy like

A B C D
E F G H
----------------------------
..................... .is A=, find the other
values.
practice these types of quest.

9)a question on race was given.hell lot of condts.finally they
make 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.)


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 terminal emulation

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 the minimum value
that can be
represented with 8 bits

11) d used as a network layer protocall in network and windows(OLE) system

12) b has to be unique in the sub network(internet address)

13)Q. there is an employer table with key feilds as employer no. data in every n'th row are needed for a simple following queries will get required results.
a) select A employe no. from employe A , where exists from employe B where A employe no. = B employe having (count(*) mod n)=0
b) select employe no. from employe A, employe B where 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 field customer no. you can see

a) delete from costomer where customer no. exists ( select distinct customer no. from customer having count )
b) delete customer a where customer no. in (select customer b where custermer no. equal to b custemor 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) which feature in ANSI C but not in JAVA.??ANS variable arguments.

16)preprocessor does not do one of the following??ANS type checking.

 #######WHAT WILL BE THE I/O OF THE FOLLOWING ############

20) main()
{
char *p;
p=malloc(10);
free(p);
printf("%d",p);
}
ANS compilation error

21)a=(10,15)
b=10,15
what are the values of a & b in ANSI C
ANS 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
<=0)
return;
else f(x-1)+x;
}
find the value of fn(5)? ANS 15.

24)struct {
int det;
struct prevoius;
struct new;
}
delete(struct node)
{
node-prev-next=node-next;
node-next-prev=node-prev;
if(node==head)node
}
one element will be given.
ANS::it does not work when rp is the last element in the link
list.

25)A code will be given which searches a particular char in
the
string.
ANS:: it always works.

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+2
main()
{
printf("%d and %d\n",VALUE/VALUE,VALUE*3);
}
ANS:: 5,7

28)What is the value assigned to the variable a if b is 7
a=b8?b<<2:b4?b1:b;
ANS::3

29)the value of the following expr (2^3)+(a^a) is
a) 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 in one of
the
following
ANS allocatrion of the storage space for the varable.

32)in C parameters are passed by
ANS:: value only.

33)2 variables cannot have the same name if they are
ANS:: in the same block.

34)a static funct. say s(),in as file f.c can be invoked from
ANS all functs. in f.c after the definitions of s.

35)macros and functions do not differ in the following aspects
ANS::variable no of arguments.

36)one q's in which he will give some different forms of
STRCPY
function you
will have to find out which form is correct.
Paper 9

HCL-TECH(it-bhu)2K3


Ordering is changed this time.So don't byheart by
a,b,c,d. Byheart the
answers. Pls check answer once again

Don't hesitate to answer all. Ever HR knows that
Students have
this qp.

Ist section of the Question is as such in the
placement papers.com

Section II - C Programming

1. Which of the following about the following two
declaration is true
i ) int *F()
ii) int (*F)()

Choice :
a) Both are identical
b) The first is a correct declaration and the second
is wrong
c) The first declaraion is a function returning a
pointer to an
integer and the second is a pointer to function
returning int
d) Both are different ways of declarin pointer to a
function

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 the
memory allocated


4.output of the following.

main()
{
int i;
char *p;
i=0X89;
p=(char *)i;
p++;
printf("%x\n",p);
}
ans:0X8A

5.
which of the following is not a ANSI C language
keyword?

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 original
array
b) In C parameters are passed by value. The funciton
cannot change
the original value in the array
c) It results in compilation error when the function
tries to access the elements in the array
d) Results in a run time error when the funtion tries
to access the elements in the array

Answer: a) The fu...

7. The type of the controlling expression of a switch
statement 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 b
is 7 ?
X = b>8 ? b <<3 : b>4 ? b>>1:b;

a) 7 b) 28 c) 3 d) 14 e) None
ans: 3;

10. Which is the output produced by the following
program
main()
{
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 program
main()
{
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");
}
}

a) Does not print anything
b) Prints : Jan is the first month
c) 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);
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

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) runtime
error

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 structure
c) Structures can refer to themselves. Hence the
statement is OK
d) Structures can refer to maximum of one other
structure

Answer :c)

19. What is the size of the following union.
Assume that the size of int =2, size of float =4 and
size 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 10
characters.



These questions are based on data sufficiency in which
one has to tell if the given data in 2 statements is
enough 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 pieces
of rope is 11 metres.

(A) (B) (C) (D) (E)

10) A certain company paid bonuses of Rs. 125 to each
of its executive
emplyees and Rs 75 to each of its nonexecutive
employees. If 100
of the employees were nonexecutive, how many were
executive?
1) The company has a total of 120 employees
2) 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 put
into savings last week ?

1) Last week Mr.Johnson put Rs 17 into savings.
2) Last week Mr.Johnson put 5% of his salary into
savings.

(A) (B) (C) (D) (E)

ans. B.) only 2nd.

12. Each M-type memory unit will increase the base
memory capacity
of 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 type
memory units
are added to the base memory capacity, is 1.6 times
the memory capacity
of 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?

1) Each of 3 faces of C is exactly 1/2 red
2) Each of 3 faces of C is entirely white

(A) (B) (C) (D) (E)

ans: D.) both.

SECTION C

Instructions ALL NUMBER USED ARE REAL NUMBERS
FOLLOWING
EACH QUESTIONS ARE FIVE POSSIBLE ANSWERS LABELED
A).B).C).D)&E).TICK THE BEST CHOICE.

14. How many of the integers between 25 and 45 are
even ?
(A)21 (B)20 (C)11 (D)10 (E)9

Answer:d)10

15. If taxi fares were Rs 1.00 for the first 1/5
mile and Rs 0.20
for each 1/5 miles thereafter. The taxi fare for a
3-mile ride was

(A)Rs 1.56 (B)Rs 2.40 (C)RS 3.00 (D)Rs 3.80
(E)Rs 4.20

Answer :d)Rs 3.80

16. A computer routine was developed to generate two
numbers (x,y)
the first being a random number between 0 and 100
inclusive, and
the second being less than or equal to the square root
of the first.
Each of the following pair satisfies the routine
EXCEPT

(A) (99.10) (B) (85.9) (C) (50.7) (D) (1.1) (E)
(1.0)

Answer : A) (99.10)

17. A warehouse had a square floor with area 10,000
sq.meters. A
rectangular addition was built along one entire side
of the warehouse
that increased the floor by one-half as much as the
original floor.
How many meters did the addition extend beyond the
original buildings ?

(A)10 (B)20 (C)50 (D)200 (E)500

Answer: c)50

18. A digital wristwatch was set accurately at 8.30
a.m
and then
lost 2 seconds every 5 minutes. What time was
indicated on the watch
at 6.30 p.m of the same day if the watch operated
continuously that time ?

(A)5:56 B)5:58 (C)6.00 (D)6.23 (E)6.26

Answer :E) 6.26

19) A 5 litre jug contains 4 litres of a salt water
solution that
is 15 percent salt. If 1.5 litres of the solution
spills out of
the jug, and the jug is then filled to capacity with
water, approximately
what percent of the resulting solution in the jug is
salt?

(A)7.5% (B)9.5% (C) 10.5% (D)12% (E)15%

Answer :A)7.5%

20) A plane travelled K miles in the first 96 miles of
flight time.
If it completed the remaining 300 miles of the trip in
1 minute,
what was its average speed in miles per hour for the
entire trip ?
(A)
(B)
(C)
(D)
(E)

Answer :(300+k)/97 * 60

21) A merchant sells an item at a 20 percent discount.
but still
makes a gross profit of 20 percent of the cost. What
percent of
cost would be gross profit on the item have been if it
had 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 brown
hats. 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 than
100 are there
such that, if the digits of n are reversed, the
resulting 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 a
certain price.
If the stock increased in price Rs 0.25 per share and
the total
increase for the x shares was Rs 12.50, how many
shares 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 price
of 3 tickets. If 5 tickets are purchased at the sale,
the amount
saved will be what percent of the original price of
the 5 tickets?

(A)20% (B)33.3% (C)40% (D)60% (E)66.6%

Answer :c)40%

26) Working independently, Tina can do a certain job
in 12 hours.
Working independently, Ann can do the same job in 9
hours. If
Tina works independently at the job for 8 hours and
then Ann works
independently, how many hours will it take Ann to
complete 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 red
chips 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 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
NULL.

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
fution 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
list
c) It sets the head of the list correctly
D) 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 second
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
string
ans: a

03) What is printed when this program is executed
main()
{
printf ("%d\n",f(7));
}
f(X)
{
if (x<= 4)
return x;
return f(--x);
}

a) 4
b) 5
c) 6
d) 7
ans: 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 %d\n",x,p);
}

a) 1 and 1 is printed
b) 1 and 4 is printed
c) 4 and 4 is printed
d) causes an exception

ans: b.)

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


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 be
a) 20 and 55
b) 20 and 45
c) 45 and 45
d) 45 and 55
e) 35 and 35


ans: c.) 45 and 45

7) what is printed when the following program is
compiled and executed?


int func (int x)
{
if (x<=0)
return(1);
return func(x -1) +x;
}
main()
{
printf("%d\n",func(5));
}

a) 12
b) 16
c) 15
d) 11


ans: b.) 16


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("%d\n",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

ans: e) a & b . extern functions and variables should
have been declared in the files for external linkage.

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 %d\n",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

ans: d.) 55 and 55. similar to program 6.)

10) consider the following program:
# include <stream.h>
class x
{
public:
int a;
x();
};
x::x()
{
a=10;
cout<<a;
}

class b:public x
{
public:
b();
};
b::b()
{
a=20;
cout<<a;
}

main ()
{
b temp;
}
what will be the output of this prg?
a) 10
b) 20
c) 2010
d) 1020

ans: d.) 1020 first constructor for A prints 10
then constructor for B prints 20.





Section IV - General Aptitude Section

1) In a murder case there are four suspects P,Q,R,S.
Each of them
makes a statement. They are
p: "I had gone to the theatre with S at the time of
the murder".
q: "I was playing cards with P at the time of the
murder".
r: "Q didn't commit the murder".
s: "R is not the murderer".

Assuming the only one of the above statement is false
and that one of
them is the murderer, who is the murderer?
a) P
b) Q
c) R
d) Cann't be concluded
e) S

and: E.) r and s are true as first two statements
are contradictory. thus either P or S is murederer. as
q is not murderer, he is tellinjg truth that P was
with him. hence S is murderer.



2) Mohan earned twice as much as Deep. Yogesh earned
rs.3/- more than
half as much as deep. If the amounts earned by
Mohan,Deep,Yogesh
are M,D,Y respectively, Which of the following is the
correct ordering
of these amounts?
a) M < D < Y
b) M < Y < D
c) D < M < Y
d) It cann't be determined from the information given
e) D < Y < M

ans d)

03) Statistics indicate that men drivers are involved
in more
accidents than women drivers.

Hence it may be concluded that...
a) sufficiently information is not there to conclude
anything
b) Men are actually better drivers but drive more
frequently
c) Women Certainly drive more cautiously than Men
d) 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
radix 7 ?
a) 12455
b) 14153
c) 14256
d) 13541
e) 13112

ans:d

5)Given that A,B,C,D,E each represent one of the
digits between 1 and
9 and that the following multiplication holds:
A B C D E
X 4
--------------
E D C B A
--------------

what digit does E represent ?

a) 4
b) 6
c) 8
d) 7

Ans: c

6) HCL prototyping machine can make 10 copies every 4
seconds. At this
rate, How many copies can the machine make in 6 min.?

a) 900
b) 600
c) 360
d) 240
e) 150

ans: a

7) if a=2,b=4,c=5 then
a+b c
----- - ---- =
c a+b

a) 1
b) 11/30
c) 0
d) -11/30
e) -1

ans: b

8) 10^2(10^8+10^8) =
--------------
10^4

a) 2(10)^4
b) 2(10)^6
c) 10^8
d) 2(10)^8
e) 10^10

ans: b

9) Worker W produces n units in 5 hours. Workers V and
W, workers
independently but at the same time, produce n units in
2 hours.
how long would it take V alone to produce n units?
a) 1 hr 26 min
b) 1 hr 53 min
c) 2 hr 30 min
d) 3 hr 30 min
e) 3 hr 20 min

ans: d (e)

10) if q <> 0 and k = qr/2 -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

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 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

ans: 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

ans: c

19) If each of the two parties of knights consists of
exactly three
members of different pX-Mozilla-Status: 0009by 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

ans: 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

ans: e

---------------







1.(X-A)(X-B)(X_C)……..(X-Z)=?

2.two nos when added make 330.when the last digit of the greater no. is
removed Ist no is obtained.find the nos. ans.300,30.

3:which word can be added at the end of one and at the front of the
other to
give meaningful results.
GRASS and SCAPE. Ans:land.

4:a jumbled word is given: the answer is PARACHUTE.

5: at midnight it is raining .do u expect sun after 72 hours.
6:a word is to be added to three given words to give meaningful word
.the
ans is:POST
7: a girl likes 144 but not 145,she likes 900 but not 800….like
this.what
will she like:
the ans is 1600.
8: a series of prime nos is given 3,5,7,11>>>find the next no .the ans
is
17.
9: a no when multiplied with one less than it results into a no that
is 4
lesser than its square. The ans is 4.
10: A question on some midnight problem was given .The choices are
given
for the present time: 21:00, 22:00,23:00,23:30 etc .
the ans to this problem is 2100 hrs.
11:In this question a square was shown in which there were nine squares
and
in each square fruits were drawn .
The ans to this question was 25.this is cost of some fruit item.
12: in a company there are salespersons and non salespersons .majority
of
employees are salespersons.the percentage of commissioned salespersons
is
more that the total salespersons ‘ percentage in the company.
Is majority of employees commissioned .something like that…….
The ans is :YES.
13: there was a statement on dogs that can understant just two words:
one
was stay and I don’t remember the other one.The breed of the dogs were
sheperd ,regger ,one other starting from r. this question was a tough
one
and I do not remember the exact statement.but based on this statement
there
were 5 questions.
The ans to 15 th question was C and 17th in the question paper was B.
next question:
A FACTORY produces a product (measured in cubic feet) over seven days
as per
the following schedule:

Day1 Day2 Day3 Day4 Day5 Day6 Day7

150 180 120 250 160 120 150


The finished goods are to be transported to the market by a truck
having a
capacity of 2000 cubic feet. Any finished goods (ready at the end of
the
day) retained overnight at the factory will incur a storage cost of
rs.5 per
cubic foot for each night of storage. The hiring cost for the truck is
rs.1000 per day.

1.If the total cost of transportation and storage is to be minimized,
the
truck should operate on
(a) 2nd,4th,6thand 7th days
(b) only the 7th day
(c) 2nd,4th,5th and 7th days
(d) only on 4th and 5th days
(e) none of these
ans:( )
2.if the storage cost reduces to re.0.80per cubic foot per night,the
truck
should operate on
(a)2nd,4th,5thand 7th days
(b)only the 7th day
(c)2nd,4th,5th and 7th days
(d)only on 4th and 5th days
(e)none of these
ans:( )

DATA SUFFICIENCY
Direction:Read the following instructions carefully and answer
questions
11-15 given below:
Each question below is followed by two numbered facts. You have to
determine
whether the data given in the statement is sufficient for answering the
question. Choose one of the following choices best fitting the
question
and mark A,B,C,D or E as explained below.
(A) if statement 1 alone is sufficient to answer the question, but
statement
2 is not sufficient.
(B) If statement 2 alone is sufficient to answer the question, but
statement 1 is not sufficient.
(C) If both statements together are needed to answer the question, but
neither statement alone is sufficient.
(D) If either statement by itself is sufficient to answer the
question.
(E) If enough facts are not available to answer the question.

13. A dress was initially listed at a price that would have given the
store
a profit of 20 percent of the wholesale cost. What was the wholesale
cost of
the dress?
(1) After reducing the asking price by 10 percent, the dress sold for a
net
profit of 10 dollars.
(2) The dress sold for 50 dollars.
ans:( )

A company manufactures game sets in brass, ebony(wood), and teak
(wood).
Each game set consists of the following components: chessmen, checkers,
dice
and a box which opens into a board, a chess layout being on the outside
and
backgammon on the inside. The game sets are called # 1, # 2, #3, # 4
and # 5
in the company's catalog.

In a#1 set, only the chessmen, checkers, and dice are brass.
In a#2 set, only the chessmen and dice are brass.
In a#3 set, only the checkers and box are brass.
In a#4 set, only the box is brass.
In a#5 set, all components are brass.

21. Which of the following components CANNOT both be wooden in a
single set
?
(a) Chessmen, dice
(b) Chessmen, box
(c) chessmen, checkers
(d) checkers, dice
(e) checkers, box
ans:( )
22. A set in which, of the chessmen, checkers, and dice, exactly one is
brass, must represent set
(a) # 1
(b) # 2
(c) # 3
(d) # 4
(e) # 5
ans:( )

HCL Technology Interview 2004 in MKU

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?

Paper 10

HCL Technology Interview 2004 in MKU

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?

Choice :
a) Both are identical
b) The first is a correct declaration and the second is wrong
c) The first declaraion is a function returning a pointer to an integer
and the second is a pointer to function returning int
d) Both are different ways of declarin pointer to a function

Answer : c) The first de...

3. Which of the following is true of the following program

main()
{
char *c;
int *p;
c =(char *)malloc(100);
ip=(int *)c;
free(ip);
}

choice:
a) The code functions properly releasing all the memory allocated
b) Results in compilation error as pointer of various types cannot be equated
c) The program tries to ault d)const e) void

Answer : b) function

7. The type of the controlling expression of a switch statement 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 :

9. What is the value assigned to the variable X if b is 7 ?
X = b>8 ? b <<3 : b>4 ? b>>1:b;

a) 7 b) 28 c) 3 d) 14 e) None

10. Which is the output produced by the following program
main()
{
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

12. What is the output of the following program
main()
{
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");
}
}

a) Does not print anything
b) Prints : Jan is the first month
c) 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(src,dst);
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);
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

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) runtime error

Answer : d) compilation error


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 structure
c) Structures can refer to themselves. Hence the statement is OK
d) Structures can refer to maximum of one other structure

Answer :c)

19. What is the size of the following union.
Assume that the size of int =2, size of float =4 and size of char =1.
Union Tag{
int a;
flaot b;
char c;
};

a)2 b)4 c)1 d) 7



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....
d)None of the above
(1) The combined length of the longer two pieces of rope is 12 metres.
(2) The combined length of the shorter two pieces of rope is 11 metres.

(A) (B) (C) (D) (E)

10) A certain company paid bonuses of Rs. 125 to each of its executive emplyees and Rs 75 to each of its nonexecutive employees. If 100 of the employees were nonexecutive, how many were executive?
1) The company has a total of 120 employees
2) The total amount that the company paid in bonuses to its employees was Rs.10,000

(A) (B) (C) (D) (E)

11. What fraction of his salary did Mr. Johnson put into savings last week ?

1) Last week Mr.Johnson put Rs 17 into savings.
2) Last week Mr.Johnson put 5% of his salary into savings.

(A) (B) (C) (D) (E)

12. Each M-type memory unit will increase the base memory capacity of 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 type memory units are added to the base memory capacity, is 1.6 times the memory capacity of the computer after 1 M-type unit is added to the base memory capacity.

(A) (B) (C) (D) (E)

13. What fractional part of the total surface area of cube C is red?

1) Each of 3 faces of C is exactly 1/2 red
2) Each of 3 faces of C is entirely white

(A) (B) (C) (D) (E)
Paper  11

Aptitude.

  a=2, b=3, c=6  Find the value of c/(a+b)-(a+b)/c
 Ans. 11/30
What does the hexa number E78 in radix 7.
 (a) 12455
(b) 14153
 (c) 14256
(d) 13541
(e) 131112
 Ans. (d)
What does the hexa number E78 in radix 7.
 (a) 12455
 (b) 14153
 (c) 14256
 (d) 13541
 (e) 131112
  Ans. (d)
Q is not equal to zero and k = (Q x n - s)/2.What is 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 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 D
        Ans. Data insuffiecient
  Questions 6 - 10 are to be answered on the following 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
If A occurs which of the following must occurs
  I.   F and G
  II.  E and H
  III. D
 (a) I only
  (b) II only
  (c) III only
   (d) I,II, & III
   (e) I & II (or) II & III but not both
    Ans. (e)
 If B occurs which must occur
 (a) D
 (b) D and G
 (c) G and H
 (d) F and G
 (e) J
 Ans. (a)
  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)
Which may occurs as a result of cause not mentioned
         I.     D
         II.   A
         III.  F
   (a) I only
   (b) II only
   (c) I & II
   (d) II & III
   (e) I,II & III                                                                                                 
   Ans. (c)
 E occurs which one cannot occurs
   (a) A
   (b) F
   (c) D
   (d) C
   (e) J
   Ans. (b)
A 5 litre jug contains 4 litres of a salt water solution that is 15 percent salt. If 1.5 litres of the solution spills out of the jug, and the jug is then filled to capacity with water,approximately what percent of the  resulting solution in the jug is salt?
(A)7.5%      (B)9.5%      (C) 10.5%        (D)12%       (E)15%
 Working independently, Tina can do a certain job in 12 hours. Working independently, Ann can do the same job in 9 hours. If Tina Works independently at the job for 8 hours and then Ann works independently, how many hours will it take Ann to complete the remainder of the jobs?
(A)2/3       (B)3/4      (C)1    (D)2             (E)3
 Answer :E)3
In a murder case there are four suspects P,Q,R,S. Each of them makes a statement. They are p: "I had gone to the theatre with S at the time of the murder".q: "I was playing cards with P at the time  of the murder".r: "Q didn't commit the murder".s: "R is not the murderer".Assuming the only one of the above statement is false and that  one of them is the murderer, who is the murderer?
             a) P
             b) Q
             c) R
             d) Cann't be concluded                                                                                   
              e) S
             Ans: E
Mohan earned twice as much as Deep. Yogesh earned rs.3/- more than half as much as deep.   If the amounts earned by Mohan,Deep,Yogesh are M,D,Y respectively, Which of the following is  the correct ordering of these amounts?
   a) M < D < Y
   b) M< Y < D
   c) D< M < Y
   d) It cann't be determined from the information given
   e) D< Y < M
Statistics indicate that men drivers are involved in more accidents than women drivers. Hence  it may be concluded that
 a) sufficiently information is not there to conclude anything
 b) Men are actually better drivers but drive more frequently
 c) Women Certainly drive more cautiously than Men
 d) Men chauvinists are wrong about women's abilties.
 e) Statistics sometimes present a wrong picture of things
Given that A,B,C,D,E each represent one of the digits between 1 and 9 and that the following multiplication holds:
   A B C D E
              X 4
   --------------
    E D C B A
    --------------      what digit does E represent ?
  a) 4
  b) 6
  c) 8                                                                                                      
  d) 7
 Ans: c
HCL prototyping machine can make 10 copies every 4 seconds. At this rate, How many copies can the machine make in 6 min.?
  a) 900
  b) 600
  c) 360
  d) 240
  e) 150
   Ans: a
If a=2,b=4,c=5 then
           a+b c
          - ---- =
         c a+b
         a) 1
         b) 11/30
         c) 0
         d) -11/30
         e) -1
        Ans: b
10^2(10^8+10^8) =-------------- 10^4
   a) 2(10)^4
   b) 2(10)^6
   c) 10^8
   d) 2(10)^8                                                                                           
    e) 10^10
    Ans: b
Worker W produces n units in 5 hours. Workers V and W, workers independently but at the same time, produce n units in 2 hours.how long would it take V alone to produce n units?
       a) 1 hr 26 min
       b) 1 hr 53 min
       c) 2 hr 30 min
       d) 3 hr 30 min
       e) 3 hr 20 min
       Ans: d

Six knights - P,Q,R,S,T and U - assemble for a long journey in Two ravelling parties. For security, each travellingparty 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 traveling 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 trave in the same party with sQ cann't travel by the southern route U cann't change 
 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
     Ans: e
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
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
    Ans: c
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
Ans: a
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
Ans: e
A gambler bets on the team of seven players ABCDEFG whose winning a-4 to 1 against b-4 to 1 against c-4  to 1 against d-4 to 1 against e-5 to 1 against f-6 to 1 against g. how should he bet on g to set 20% profit.
If a person buy radio worth Rs 2468 and pay 7% sales .how much price of radio should reduce to pay only Rs 2468
What is vasu salary if salary of vasu is more than rajan salary working in same company
  i)vasu salary is 100 more than rajan salary.
  ii)rajan found 2000 allowns which is 50 less than vasu.
  (iii)basic salry of rajan is 1000.
           (i)only i is required
            (ii)i & ii is required
            (iii)i& iii is required
             (iv)i&ii&iii is required
             (v)none of these
 If in 100 miles race 8 person is running winner take 9.8sec and fifth man takes 10.4 sec the time of 8 man is  in AP if in 4*100 meters realy of onside is 1,4,5,8 position then win by.
a).3 sec      b).1 sec      c).7 sec      d).5 sec           e)none
 How many sons X have qwe based on relation
 i)
 ii)                                                                                                            
 iii)
 ans(data i,ii,iii is insufficient)
A sink has 12 lits of water some quantity of water is taken out. if the remainng water is 6 litres less then thewater  taken out then  quantity of water taken out is.
a.3
b.6
c.9
d.1
which is the 4 digit number whose second digit is thrice the first digit and 3'rd digit is sum of 1'st and 2'nd and  last digit is twice the  second digit.
1.2674
2.1349.
3.3343
4.3678
In a straight highway 2 cars starts from the same point in opposite directions each travels for 8 Kms and take left  turn then travel for 6 Kms what is the distance between them now.
1.16
2.20
3.25
4.10
A problem based on house numbers.
Five students compare their test and quiz marks.some datas given.5 questions based on this.
          C Programming
 Which of the following about the following two declaration is true
       i ) int *F()
       ii) int (*F)()
       Choice :
      a) Both are identical
      b) The first is a correct declaration and the second is wrong
      c) The first declaraion is a function returning a pointer to an integer and the second is a pointer to function returning
         int
      d) Both are different ways of declarin pointer to a function     Answer : c) The first de...
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
Which of the following is true of the following program
       main()
            {
             char *c;
             int *p;
             c =(char *)malloc(100);
             ip=(int *)c;
             free(ip);
           }
          ans: The code functions properly releasing all the memory allocated
.output of the following.                                                                                       
            main()
                 {
                   int i;
                   char *p;
                   i=0X89;
                   p=(char *)i;
                   p++;
                   printf("%x\n",p);
                    }
             ans:0X8A
which of the following is not a ANSI C language keyword?  ans:Function.
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 original array
       b) In C parameters are passed by value. The funciton cannot change the original value in the array
       c) It results in compilation error when the function tries toaccess the elements in the array
       d) Results in a run time error when the funtion tries to access the elements in the array
        Answer: a) The fu...
The type of the controlling expression of a switch statement cannot be of the type
        a) int b) char c) short d)float e) none
        Answer : d)float
What is the value of the expression (3^6) + (a^a)?
     a) 3     b) 5    c) 6     d) a+18       e) None
     Answer : 5
 What is the value assigned to the variable X if b is 7 ?
       X = b>8 ? b <<3 : b>4 ? b>>1:b;
       a) 7 b) 28 c) 3 d) 14 e) None
        ans: 3;
Which is the output produced by the following program
                main()
                  {
                   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
 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
What is the output of the following program
         main()
             {
              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 : a) 10,6
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");                                                            
                  }
             }
          a) Does not print anything
          b) Prints : Jan is the first month
          c) Generates compilation error
          d) Results in runtime error
           Answer: b) Prints : Jan..
What is the output of the following program?
           main()
                 {
                     char *src = "Hello World";
                     char dst[100];
                     strcpy(src,dst);
                     printf("%s",dst);
                     }strcpy(char *dst,char *src)
                       {while(*src) *dst++ = *src++;
                        }
                       ) "Hello World" b)"Hello" c)"World" d) NULL e) unidentified
                      Answer: d) NULL
 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 : a)8
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
                   Answer:b)20,12
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) runtime error
               Answer : d) compilation error
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 structure
                 c) Structures can refer to themselves. Hence the statement is  OK
                 d) Structures can refer to maximum of one other structure
                 Answer :c)
What is the size of the following union. Assume that the size of int =2, size of float =4 and size of
       char =1.
       Union Tag{
         int a;
         flaot b;
        char c;
           };
        a)2 b)4 c)1 d) 7   
 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....
           d)None of the above
Paper 12

Aptitude
 How many of the integers between 25 and 45 are even ?
 (A)21 (B)20 (C)11 (D)10 (E)9
 Ans:d)10
If taxi fares were Rs 1.00 for the first 1/5 mile and Rs 0.20 for each 1/5 miles thereafter. The taxi fare for
a 3-mile ride was
(A)Rs 1.56       (B)Rs 2.40        (C)RS 3.00          (D)Rs 3.80           (E)Rs 4.20
Answer :d)Rs 3.80
A computer routine was developed to generate two numbers (x,y) the first being a random number between 0 and 100 inclusive, and the second being less than or equal to the square root of the first. Each of the followin pair satisfies the routine EXCEPT
(A) (99.10) (B) (85.9) (C) (50.7) (D) (1.1) (E) (1.0)                                          
Answer : A) (99.10)
A warehouse had a square floor with area 10,000 sq.meters. A rectangular addition was built along one entire side of the warehouse that increased the floor by one-half as much as the original floor. How many meters did the addition extend beyond the original buildings ?
(A)10 (B)20 (C)50 (D)200 (E)500
Ans: c)50
A digital wristwatch was set accurately at 8.30 a.m and then lost 2 seconds every 5 minutes. What time was indicated on the watch at 6.30 p.m of the same day if the watch operated continuously that time ?
(A)5:56      B)5:58          (C)6.00      (D)6.23        (E)6.26
 Ans :E) 6.26
A 5 litre jug contains 4 litres of a salt water solution that is 15 percent salt. If 1.5 litres of the solution spills out of the jug, and the jug is then filled to capacity with water, approximately what percent of the resulting solution  in the jug is salt?
    (A)7.5%      (B)9.5%       (C) 10.5%        (D)12%        (E)15%
   Ans :A)7.5%
A plane travelled K miles in the first 96 miles of flight time. If it completed the remaining 300 miles of the trip in 1 minute, what was its average speed in miles per hour for the entire trip ?
    (A)
    (B)
    (C)                                                                                                          
     (D)
     (E)
   Ans :(300+k)/97 * 60
A merchant sells an item at a 20 percent discount. but still makes a gross profit of 20 percent of the cost.What percent of cost would be gross profit on the item have been if it had been sold without the discount?
(A)20%          (B)40%           (C)50%            (D)60%           (E)66.6%
Ansr :c) 50%
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 brown hats. What fraction of the unsold hats were brown.
(A)1/60       (B)1/15        (C)3/20         (D)3/5        (E)3/4
Ans :c)3/20
How many integers n greater than and less than 100 are there such that,if the digits of n are reversed,  the resulting integer is n+9 ?
(A)5       (B)6        (C)7        (D)8     (E)9
 Ans :D)8
An investor purchased a shares of stock at a certain price.If the stock increased in price Rs 0.25 per share and the total increase for the x shares was Rs 12.50, how many shares of stock had been purchased ?
  (A)25         (B)50          (C)75         (D)100       (E)125
   Ans :B)50
At a special sale, 5 tickets can be purchased for the price of 3 tickets. If 5 tickets are purchased at the sale, the amount saved will be  What percent of the original price of the 5 tickets?
(A)  20%          (B)   33.3%         (C)      40%         (D)      60%            (E)    66.6%
 Ans :c)40%
Working independently, Tina can do a certain job in 12 hours. Working independently, Ann can do the same job in 9 hours. If Tina Works independently at the job for 8 hours and then Ann works independently, how many hours will it take Ann to complete the remainder of the jobs?
 (A)      2/3          (B)     3/4 (C)  1 (D)      2        (E)      3                                   
  Ans :E)3
A decorator bought a bolt of d m number of red chips in any one stack ?
 (A)   7   (B)     6      (C)  5         (D)         4      (E)     3
  Ans :C) 5
A sink has 12 lits of water some quantity of water is taken out. if the remainng water is 6 litres less then the
water taken out then  quantity of water taken out is.
a.  3
 b.  6
c.  9                                                                                                         
d.  1
 which is the 4 digit number whose second digit is thrice the first digit and 3'rd digit is sum of 1'st and 2'nd and last   digit is twice the second digit.
1.2674
2.1349.
3.3343
4.3678
 In a straight highway 2 cars starts from the same point in opposite directions each travels for 8 Kms and takeleft turn then travel for 6 Kms what is the distance between them now.
 1.16
 2.20
 3.25                                                                                                              
  4.10
  Technical Section
In ANSI C which is such thing is not in Java.
     typedef struct node
            {
             int
             NODEPTR * NODE
            }
Q. In signed magnitude notation what is the minimum value that can be represented with 8 bits
a) -128 b) -255 c) -127 d) 0
 Q. there is an employer table with key feilds as employer no. data in every n'th row are needed for a simple followingqueries will get required results.
a)  select A employe no. from employe A , where exists from employe B where A employe no. = B employehaving (count(*) mod n)=0
b)   select employe no. from employe A, employe B  where A employe no. = B employ no.grouply employe no. having (count(*) mod n=0 )
c)  both a& b
d)  none of the above
Piggybacking is done for, Ans=>Acknowledgement.
WHICH IS NOT BASIC data type ans.Char*
which of the following statement is valid for string copy                                  
 char *srt,*ptr;
 a)   while(*str) {
 *str=*ptr;
 ++str=++ptr;
        }
 b ) while(*str)
       {*++str=*++ptr};
     c) 
Two variable cannt have the same name in
 a)function b) block c) file d)--- C Section
 #define inc(x) x++
  main()
    {
      int t=1;
      printf("%d",inc(t++));
    } 
 one or two que for the complicated declaration.          
Const char *a="Abcd"; char const *a="lmno"; base do this,Two que were there.
char *p ;
char q[20];
 int i,*p=&i;
 p=malloc(10);
 free(p);
 printf("%d",p);
 ans : garbage
int i=20,*j=&i
 f(i)
 printf("%d",i);
#define val 1+2
printf("%d%d",val/val,val^3)
ans : 3 9
#define "this" "#"
#define (x,y) x##y
printf("this","this is")
ans: compilation error (tested)
2^2)+(a^a)
 int a ,b=7
 a=b<4?b<<1:b>4?7>>1:a                                                                            
 ans.3
one que on c++ class member function
ans.d
work of memory management unit.
who relate virtual memory to physical memory   ans.os
memory is allocated to variable
a)when declared b)when define c)...
Question on double linked list
Define success 1
 define failure -1
 if(condition)
 printf(success);
 else
 printf(failure);
  ans success
main()
   {
    int var=25,varp;
    varp=&var;
    varp=10;
    fun(varp);
    printf(%d%d",var,varp);
    ans a)45,45 b)55,55 c) 20,55;
u r given two statements
     a=(10.15);
     b=10,15;
      if they are executed what is the output   printf("%d%d",a,b);                           
       a)10,15 b)15,10 c)10,10 d)15,15       ans a
#define inc(x) x++
main()
    {
      int t=1;
     printf("%d",inc(t++));
   }
  ans.error
main
{int x=1,y=2,z=3;
 x=y==z;
 printf(x);
  }


No comments:

Post a Comment