Vous êtes sur la page 1sur 159

Probability

HCL Technology
Ø Compulsory Modules (all 3)
ü    1. English Comprehension

ü    2. Quantitative Ability
ü    3. Reasoning and Logical Ability
Ø Optional Modules (1 or more)
ü    1. Computer Programming Principles and Application

ü    2. Computer Fundamentals


ü 3. Electronics and Semiconductor

1. English Comprehension
ü Synonyms/Antonyms/Word Meaning (Vocabulary)

ü Complete the Sentence (Grammar)

ü Spot error/Correct sentence (Grammar/sentence construction)

ü Sentence Ordering (Comprehension skills)

ü Questions based on passage (Comprehension skills)

2. Quantitative Ability
ü Basic Math Understanding and Algebra: Decimals, fractions, powers, HCF, LCM, Solving
equations, etc.

ü Word Problems

ü Understanding of Logarithms and exponents

ü Permutation and Combination, Probability


3. Reasoning and Logical Ability
ü Analogical Reasoning: Analogy and Classification questions

ü Deductive Logic: Statement-Conclusion, Statement-Assumption, Data-sufficiency type,


Syllogisms, etc.

ü Pattern Recognition: Coding and Decoding Questions, Alphabet Test


ü Composition of Complex relations: Blood Relation, Direction Understanding, Logical
Word Sequence

ü Reasoning Puzzles, Theme Detection

1. Computer Programming Principles and Application


This test is based on no particular programming language. The test is
completely language independent and tests the programming and algorithm development
concepts of the candidate.
The topics include:

1. Structure and constructs of Computer Programs


ü Programming flow, Procedures, Functions and Arguments, Methods
ü Data-types, how data is stored in computers, input/output, manipulation, methods of
referencing and assessing data (including pointers).

ü Iteration, decision-making, recursions

ü Algorithm Complexity: Space and time Complexity, Asymptotic Notation

ü Compilation, Linking and Execution; debugging, kinds of errors.

2. Data-structures and Basics Algorithms


ü Data Storage Methods: Linked lists, Arrays, Queues, Stacks, Trees, Heaps, Hash tables,
graphs; Stress on which data structure to use for a given application.

ü Data retrieval, Insertion of new data, merging of data from two data structures

ü Data search and sorting, Methods of array sorting and trade-off

3. Object Oriented Programming Concepts


ü Classes, objects and methods

ü Data Encapsulation, Data hiding, Inheritance

ü Polymorphism, Overloading, Abstraction
2. Computer Fundamentals
ü Basic Hardware Usage, Maintenance and Organization
ü Operating System Usage
ü Basic Software and Internet

3. Electronics and Semiconductor


ü Basics only

Model Papers
ENGLISH COMPREHENSION
In the following question select the word which is OPPOSITE in the meaning
of the given word. 
Q1. INDISCREET 
a. reliable 
b. honest 
c. prudent 
d. stupid 
Q2. SOLICITUDE 
a. insouciance 
b. ingenuity 
c. propriety 
d. austerity 
Q3. In the sentence there is a bold word or phrase. One of the words or
phrases given in the options conveys almost the same meaning as the bold
word or phrase in the sentence. Select that option which is nearest in
meaning. 
It is preposterous on your part to look for a job without first completing your education. 
a. Wise 
b. Imperative 
c. Advisable 
d. Most admirable 
e. Very absurd 
In the following questiones, fill in the blank space.
Q4. The success that he has gained, though striking enough, does not, however,
commensurate . . . . the efforts made by him. 
a. About 
b. From 
c. With 
d. Beside 
e. Over 
Q5. Vinod took his meals after he . . . . 
a. Had completed his work 
b. Had been completing his work 
c. Was completing his work 
d. Had been completed his work 
e. Had got completed his work 
In the following questions, select the word or phrase that is similar in
meaning to the given word. 
Q6. Nonchalance 
a. Neutrality 
b. Indifference 
c. All-knowing 
d. Ignorance 
e. Untimeliness 
Q7. Conceal 
a. Hide 
b. Seal 
c. Ceiling 
d. Horrifying 
Q8. Read the sentence to find out whether there is any grammatical error in it.
The error, if any, will be in one part of the sentence. The letter of that part is
the answer. If there is no error, the answer is ‘D’. (Ignore – the errors of
punctuation,if any) 
(A) The whole thing moves/ (B) around the concept of building a small
dynamic/(C) organisation into a larger one./(D) No error. 
a. (A) 
b. (B) 
c. (C ) 
d. (D) 
Q9. In the question a part of the sentence is italicised. Alternatives to the
italicised part is given which may improve the sentence. Choose the correct
alternative. In case no improvement is needed. Option ‘D’ is the answer. 
She gave most of her time to music. 
a. spent 
b. lent 
c. devoted  
d. No improvement 
Q10. The given sentences when properly sequenced, form a coherent
paragraph. Each sentence is labelled with a number. Choose the most logical
order of sentences from among the four given choices to construct a coherent
paragraph. 
1. He was so busy with them that he did not get time to eat. 2. Thousands of people came to
him and asked different types of questions. 3. No one cared to see that he had his food or
rest that night. 4. Swami Vivekanand once stayed in a small village.  
a. 2341 
b. 3214 
c. 4213 
d. 4231 
Answer the question based on the given passage
Management is a set of processes that can keep a complicated system of people and
technology running smoothly. The most important aspects of management include
planning, budgeting, organising, staffing, controlling, and problem-solving. Leadership is a
set of processes that creates organisations in the first place or adapts them to significantly
changing circumstances. Leadership defines what the future should look like, aligns people
with that vision, and inspires them to make it happen despite the obstacles. This
distinction is absolutely crucial for our purposes here: Successful transformation is 70 to
90 per cent leadership and only 10 to 30 percent management. Yet for historical reasons,
many organisations today don’t have much leadership. And almost everyone thinks about
the problem here as one of managing change. For most of this country, as we created
thousands and thousands of large organisations for the first time in human history, we
didn’t have enough good managers to keep all those bureaucracies functioning. So many
companies and universities developed management programs and hundreds and
thousands of people were encouraged to learn management on the job. And they did. But,
people were taught little about leadership. To some degree, management was emphasised
because it’s easier to teach than leadership. But even more so, management was the main
item on the twentieth-century agenda because that’s what was needed. For every
entrepreneur or business builder who was a leader, we needed hundreds of managers to
run their ever-growing enterprises. Unfortunately for us today, this emphasis on
management has often been institutionalised in corporate cultures that discourage
employees from learning how to lead. Ironically, past success is usually the key ingredient
in producing this outcome. The syndrome, as I have observed it on many occasions, goes
like this: success creates some degree of marked dominance which in turn produces much
growth. After a while keeping the ever-larger organisation under control becomes the
primary challenge. So attention turns inward and managerial competencies are nurtured.
With a strong emphasis on management but not leadership, bureaucracy and an inward
focus takeover. But with continued success, the result mostly of market dominance, the
problem often goes unaddressed and an unhealthy arrogance begins to evolve. All of these
characteristics then make any transformation effort much more difficult. Arrogant
managers can over-evaluate their current performance and competitive position, listen
poorly and learn slowly. Inwardly focused employees can have difficulty seeing the very
forces that present threats and opportunities. Bureaucratic cultures can smother those who
want to respond to shifting conditions. And the lack of leadership leaves no force inside
these organisations to break out of the morass. 
Q11. Why did companies and universities develop programmes to prepare
managers in such a large number? 

a. (A) Companies and universities wanted to generate funds through these programmes 
b. (B) The large number of organisations were created as they needed managers in good
number 
c. (C) Organizations did not want to spend their scarce resources in training managers 
d. (D) Organisations wanted to create communication network through trained managers 
Q12. How has the author defined management? 

a. It is the process of adapting organisations to changing circumstances. 


b. It is the system of aligning people with the direction it has taken. 
c. It refers to creating a vision to help direct the change effectively. 
d. Creating better performance through customer orientation. 
Q13. What is the historical reason for many organisations not having
leadership? 

a. A view that leaders are born, they are not made 


b. Leaders lack managerial skills and organisations need managers 
c. Leaders are weak in carrying out traditional functions of management 
d. Leaders allow too much complacency in organisations 
Q14. Which of the following characteristics help organisations in their
transformation efforts? 

a. Emphasis on leadership but not management 


b. A strong and dogmatic culture 
c. Bureaucratic and inward looking approach  
d. Failing to acknowledge the value of customers and shareholders 
Q15. Which of the following is similar in meaning of the word ‘smother’ as
used in the passage? 

a. Suppress 
b. Encourage 
c. Instigate 
d. Criticise
QUANTITATIVE ABILITY
Q1. In a kilometre race, if A gives B a 40 m start, A wins by 19 s. But if A gives B
a 30 s start, B wins by 40 m. Find the time taken by B to run 5,000 m? 

a. 150 s 
b. 450 s 
c. 750 s 
d. 825 s 
Q2. Pipe A takes 16 min to fill a tank. Pipes B and C, whose cross-sectional
circumferences are in the ratio 2:3, fill another tank twice as big as the first. If
A has a cross-sectional circumference that is one-third of C, how long will it
take for B and C to fill the second tank? (Assume the rate at which water flows
through a unit cross-sectional area is same for all the three pipes.) 
a. 66/13 
b. 40/13 
c. 16/13 
d. 32/13  
Q3. Three consecutive whole numbers are such that the square of the middle
number is greater than the product of the other two by 1. Find the middle
number. 

a. 6 
b. 18 
c. 12 
d. All of these 
Q4. The arithmetic mean of 2 numbers is 34 and their geometric mean is 16.
One of the numbers will be 

a. 4 
b. 16 
c. 18 
d. 12 
Q5. If x% of a is the same as y% of b, then z% of b is :  

a. (xy/z)% of a 
b. (yz/x)% of a 
c. (xz/y)% of a 
d. None of these 
Q6. The letters of the word WOMAN are written in all possible orders and
these words are written out as in a dictionary ,then the rank of the word
‘WOMAN’ is  

a. 117 
b. 120 
c. 118 
d. 119 
Q7. What least number must be subtracted from 9400 to get a number exactly
divisible by 65? 

a. 40 
b. 20 
c. 80 
d. none of these 
Q8. If 2505 / 0.5 = 5010 then 25.05 / 0.5 = ? 
a. 5.010 
b. 50.10 
c. 501.0 
d. None of these 
Q9. Which pair of rational numbers lie between 1/5 and 2/5 – 

a. 262/1000, 275/1000 
b. 362/1000, 562/1000 
c. 451/1000, 552/1000 
d. 121/1000,131/1000
Q10. What is the value of the following expression: 2 log 10 5 + log10 4 ? 

a. 2 
b. 2.5 
c. 3 
d. None of these 
Q11. If x increases linearly, how will a-x behave (a>1) ? 

a. Increase linearly 
b. Decrease linearly 
c. Increase exponentially 
d. Decrease exponentially 
Q12. What is the probability of getting the sum 5 in two throws of the dice? 

a. 1/12 b. 1/5 c. 1/9 d. None of these


LOGICAL ABILITY
Q1. The question shows a pair of words in which the first is related to the
second in some way. It is followed by a single word which bears a similar
relation to one of the given alternatives. Find the correct alternative to
complete the analogy. 
Melt:Liquid::Freeze: ? 
a. Ice 
b. Condense 
c. Solid 
d. Crystal 
Q2. Fill in the blank Guilt is to Past as Hope is to …… 
a. Present 
b. Future 
c. Today 
d. Despair 
e. Hopeless 
Q3. From the given choices select the odd man out: 

a. Bird 
b. Kite 
c. Crow 
d. Pigeon 
e. Sparrow 
Q4. Find the missing pattern
BOQD : ERTG :: ANPC : ? 
a. DQSF 
b. FSHU 
c. SHFU 
d. DSQF 
Q5. Find the missing number
5 : 24 :: 8 : ? 
a. 65 
b. 63 
c. 62 
d. 64 
Q6. From the given choices select the odd man out
a. DFHEG 
b. TWXUV 
c. OQSPR 
d. JLNKM 
Q7. If HARD is coded as 1357 and SOFT is coded as 2468, what will 21448
stand for?  

a. SHAFT 
b. SHORT 
c. SHOOT 
d. SHART 
Q8. Find the next number in the series 
1, 6, 13, 22, 33, …… 
a. 44 
b. 45 
c. 46 
d. 47 
Q9. The question contains some statements followed by some conclusions.
Decide which of the given conclusions logically follow from the given
statements, disregarding commonly known facts. 
Statements: 
I) All tomatoes are red. 
II) All grapes are tomatoes. 
Conclusions: 
I) All grapes are red. 
II) Some Tomatoes are grapes. 
a. Only conclusion I follows. 
b. Only conclusion II follows. 
c. Neither I nor II follows 
d. Both I and II follow. 
e. Either I or II follows 
Q9. Old woman’s son is my daughter’s uncle, then what relation has the old
woman to me ? 

a. Sister 
b. Mother 
c. Grandmother 
d. Mother – in – law 
Q10. Ramu was facing East.He walked 4 km forward and then after turning to
his right walked 6 km. Again he turned to his right and walked 7 km. After this
he turned back.Which direction was he facing at the time? 

a. East 
b. North 
c. South 
d. West 
e. North-East 
Q11. Raman is not wearing purple and Aman is not wearing black.Raman and
Sahil wear different colours.Avinash alone wears green.What is Sahil’s
colour, if all four of them are wearing different colours. 

a. Green 
b. Black 
c. Purple 
d. Can’t Say 
Q12. The question is followed by two arguments numbered I and II. You have
to decide which of the arguments is a strong argument and which is a weak
argument. 
Statement : 
Should a total ban be put on trapping wild animals? 
Arguments : 
I. Yes, Trappers are making a lot of money. 
II. No, bans on hunting and trapping are not effective. 
a. Only argument I is strong. 
b. Only argument II is strong. 
c. Either I or II is strong. 
d. Neither I nor II is strong. 
e. Both I and II are strong 
Q13. The question contains a statement followed by two Assumptions I and II.
Find out which assumption(s) is implicit. 
Statements: 
Vitamin E tablets improve circulation, keep your complexion in glowing condition. 
Assumptions : 
I. People like glowing complexion. 
II. Complexion becomes dull in the absence of circulation.  
a. Only assumption I is implicit 
b. Only assumption II is implicit 
c. Both assumption I and II are implicit. 
d. Neither assumption I nor II is implicit 
Q14. Study the statement(s) and the conclusions and select the correct option. 
Statement : 
No country is absolutely self – dependent these days. 
Conclusions : 
I. It is impossible to grow and produce all that a country needs. 
II. Countrymen in general have become lazy. 
a. Only Conclusion I follows 
b. Only Conclusion II follows 
c. Both the conclusion I and II follow 
d. Either conclusion I or II follows 
e. Neither conclusion I nor II follows 
Q15. In the question a statement is followed by some courses of action . A
course of action is a step or administrative decisions to be taken for
improvement, follow-up, or further action in regard to the problem, policy,
etc. You have to assume everything in the statement to be true and then decide
which of the given suggested course(s) of action logically follows for
pursuing. 

Statement: 
‘The World Bank has approved a $ 300 million loan to finance a project to construct coal
ports by Madras Port Trusts. 
Courses of Action : 
I. India should take financial help from other international financial institutions to develop
such ports in other places. 
II. India should not seek any help from the international financial institutions. 
a. Only I follows 
b. Only II follows 
c. Either I or II follows 
d. Neither I nor II follows 
e. Both I and II follow.
(Optional module)
COMPUTER PROGRAMMING PRINCIPLES AND APPLICATIONS
Q1. A 8-bit signed integer has the following range: 

a. 0 to 255 
b. -128 to 127 
c. -255 to 254 
d. 0 to 509 
Q2. What will be the output of the following code statements? 
integer x = 34.54, y = 20, z = -5 
print ( y > 50 AND z > 10 or x > 30 ) 
a. 0 
b. 1 
c. -1 
d. 10 
Q3. Pankaj makes a program to print the product of cubes of the first 10 whole
numbers. She writes the following program: 
integer x = 0 // statement 1 
integer sum = 0 // statement 2 
while ( x < 10 ) // statement 3 

  sum = x*x*x // statement 4 
  x = x + 1 // statement 5 
}    
print sum // statement 6 
Is her program correct? If not, which statement will you modify to correct it?
a. No error, the program is correct. 
b. Statement 1 
c. Statement 4 
d. statement 6 
Q4. I have a problem to solve which takes as input a number n. The problem
has a property that given the solution for (n-1), I can easily solve the problem
for n. Which programming technique will I use to solve such a problem? 
a. Iteration 
b. Decision-making 
c. Object Oriented Programming 
d. Recursion 
Q5. Given:
integer x = 40, y = 35, z = 20, w = 10 
Comment about the output of the following two statements: 
print x * y / z – w 
print x * y / (z – w) 

a. Differ by 80 
b. Same 
c. Differ by 50 
d. Differ by 160 
Q6. Data and function in which area of a class are directly accessible outside
the class? 
a. Public 
b. Private 
c. Protected 
d. None of these 
Q7. Here is an infix notation: ((A+B)*C-(D-E))^(F+G) Choose the correct
postfix notation of the above from the given options.  
a. AB+CD*E–FG+^ 
b. AB+C*DE–FG+^ 
c. AB+C*DE-FG-+^ 
d. A+BC*DE-FG-+^ 
Q8. If the depth of a tree is 3 levels, then what is the size of the Tree? 

a. 2 
b. 4 
c. 6 
d. 8 
Q9. One of the following options is a form of access used to add and remove
nodes from a queue. 

a. LIFO 
b. FIFO 
c. Both LIFO and FIFO 
d. None of these 
Q10. What is the time complexity of adding three matrices of size NXN cell-by-
cell? 

a. O(N) 
b. O(N^2) 
c. O(N^3) 
d. None of these
Quantitative Aptitude - Problems on Time and Work
1. If A can do a piece of work in n days, then A’s 1 day work = 1/n
2. If A’s 1 day’s work = 1/n, then A can finish the work in n days.
Example: If A can do a piece of work in 4 days,then A’s 1 day’s work = 1/4. If A’s 1 day’s
work = 1/5, then A can finish the work in 5 days

3. If A is thrice as good workman as B,then: Ratio of work done by A and B = 3:1.


Ratio of time taken by A and B to finish a work = 1:3

4. Definition of Variation: The change in two different variables follow some definite rule.
It said that the two variables vary directly or inversely. Its notation is X/Y = k, where k is
called constant. This variation is called direct variation. XY = k. This variation is called
inverse variation.

5. Some Pairs of Variables:


1. Number of workers and their wages. If the number of workers increases, their total
wages increase. If the number of days reduced, there will be less work. If the number of
days is increased, there will be more work. Therefore, here we have direct proportion or
direct variation.
2. Number workers and days required to do a certain work is an example of inverse
variation. If more men are employed, they will require fewer days and if there are less
number of workers, more days are required.

3. There is an inverse proportion between the daily hours of a work and the days required.
If the number of hours is increased, less number of days are required and if the number of
hours is reduced, more days are required.

6. Some Important Tips:


More Men - Less Days and Conversely More Day - Less Men.
More Men - More Work and Conversely More Work - More Men.
More Days - More Work and Conversely More Work - More Days.
Number of days required to complete the given work = Total work/One day’s work.

Since the total work is assumed to be one(unit), the number of days required to
complete the given work would be the reciprocal of one day’s work. Sometimes,
the problems on time and work can be solved using the proportional rule
((man*days*hours)/work) in another situation.

7. If men is fixed,work is proportional to time. If work is fixed, then time is


inversely proportional to men therefore, (M1*T1/W1) = (M2*T2/W2)

Problems on Time and Work


1) If 9 men working 6 hours a day can do a work in 88 days. Then 6 men working 8
hours a day can do it in how many days?
Solution: From the above formula i.e (m1*t1/w1) = (m2*t2/w2)
so (9*6*88/1) = (6*8*d/1)
on solving, d = 99 days.

2) If 34 men completed 2/5th of a work in 8 days working 9 hours a day. How


many more man should be engaged to finish the rest of the work in 6 days working
9 hours a day?

Solution: From the above formula i.e (m1*t1/w1) = (m2*t2/w2)


so, (34*8*9/(2/5)) = (x*6*9/(3/5))
so x = 136 men
number of men to be added to finish the work = 136-34 = 102 men

3) If 5 women or 8 girls can do a work in 84 days. In how many days can 10


women and 5 girls can do the same work?

Solution: Given that 5 women is equal to 8 girls to complete a work


so, 10 women = 16 girls.
Therefore 10women +5girls = 16girls+5girls = 21 girls.
8 girls can do a work in 84 days
then 21 girls ————— ?
Answer = (8*84/21) = 32 days. Therefore 10 women and 5 girls can a work in 32 days

4) Worker A takes 8 hours to do a job. Worker B takes 10hours to do the same job.
How long it take both A & B, working together but independently, to do the same
job?

Solution: A’s one hour work = 1/8.


B’s one hour work = 1/10
(A+B)’s one hour work = 1/8+1/10 = 9/40
Both A & B can finish the work in 40/9 days

5) A can finish a work in 18 days and B can do the same work in half the time
taken by A. Then, working together, what part of the same work they can finish in
a day?

Solution:Given that B alone can complete the same work in days = half the time
taken by A = 9days
A’s one day work = 1/18
B’s one day work = 1/9
(A+B)’s one day work = 1/18+1/9 = 1/6

6) A is twice as good a workman as B and together they finish a piece of work in


18 days.In how many days will A alone finish the work.

Solution: if A takes x days to do a work then


B takes 2x days to do the same work
= > 1/x+1/2x = 1/18
= > 3/2x = 1/18
= > x = 27 days.
Hence, A alone can finish the work in 27 days.

7) A can do a certain work in 12 days. B is 60% more efficient than A. How many
days does B alone take to do the same job?

Solution: Ratio of time taken by A & B = 160:100 = 8:5


Suppose B alone takes x days to do the job.
Then, 8:5::12:x
= > 8x = 5*12
= > x = 15/2 days.

8) A can do a piece of work n 7 days of 9 hours each and B alone can do it in 6 days
of 7 hours each. How long will they take to do it working together 8 2/5 hours a
day?
Solution: A can complete the work in (7*9) = 63 days
B can complete the work in (6*7) = 42 days
= > A’s one hour’s work = 1/63 and
B’s one hour work = 1/42
(A+B)’s one hour work = 1/63+1/42 = 5/126
Therefore, Both can finish the work in 126/5 hours.
Number of days of 8 2/5 hours each = (126*5/(5*42)) = 3 days

9) A takes twice as much time as B or thrice as much time to finish a piece of


work. Working together they can finish the work in 2 days. B can do the work
alone in ?

Solution: Suppose A,B and C take x,x/2 and x/3 hours respectively finish the
work then 1/x+2/x+3/x = 1/2
= > 6/x = 1/2
= >x = 12
So, B takes 6 hours to finish the work.

10) X can do ¼ of a work in 10 days, Y can do 40% of work in 40 days and Z can
do 1/3 of work in 13 days. Who will complete the work first?

Solution: Whole work will be done by X in 10*4 = 40 days.


Whole work will be done by Y in (40*100/40) = 100 days.
Whole work will be done by Z in (13*3) = 39 days
Therefore,Z will complete the work first.
Complex Problems on Time and Work

1) A and B undertake to do a piece of workfor Rs 600. A alone can do it in 6 days


while B alone can do it in 8 days. With the help of C, they can finish it in 3 days,
Find the share of each?

Solution:C’s one day’s work = (1/3)-(1/6+1/8) = 1/24


Therefore, A:B:C = Ratio of their one day’s work = 1/6:1/8:1/24 = 4:3:1
A’s share = Rs (600*4/8) = 300
B’s share = Rs (600*3/8) = 225
C’s share = Rs[600-(300+225)] = Rs 75

2) A can do a piece of work in 80 days. He works at it for 10 days & then B alone
finishes the remaining work in 42 days. In how much time will A and B, working
together, finish the work?

Solution: Work done by A in 10 days = 10/80 = 1/8


Remaining work = (1-(1/8)) = 7/8
Now, work will be done by B in 42 days.
Whole work will be done by B in (42*8/7) = 48 days
Therefore, A’s one day’s work = 1/80
B’s one day’s work = 1/48
(A+B)’s one day’s work = 1/80+1/48 = 8/240 = 1/30
Hence, both will finish the work in 30 days.

3) P,Q and R are three typists who working simultaneously can type 216 pages in
4 hours In one hour, R can type as many pages more than Q as Q can type more
than P. During a period of five hours, R can type as many pages as P can during
seven hours. How many pages does each of them type per hour?

Solution: Let the number of pages typed in one hour by P, Q and R be x,y and z
respectively. Then
x+y+z = 216/4 = 54 ————— 1
z-y = y-x = > 2y = x+z ———–— 2
5z = 7x = > x = 5x/7 ————— 3
Solving 1,2 and 3 we get x = 15,y = 18, and z = 21

4) Ronald and Elan are working on an assignment. Ronald takes 6 hours to type 32
pages on a computer, while Elan takes 5 hours to type 40 pages. How much time
will they take, working together on two different computers to type an assignment
of 110 pages?

Solution: Number of pages typed by Ronald in one hour = 32/6 = 16/3


Number of pages typed by Elan in one hour = 40/5 = 8
Number of pages typed by both in one hour = ((16/3)+8) = 40/3
Time taken by both to type 110 pages = 110*3/40 = 8 hours.

5) Two workers A and B are engaged to do a work. A working alone takes 8 hours
more to complete the job than if both working together. If B worked alone, he
would need 4 1/2 hours more to compete the job than they both working together.
What time would they take to do the work together.

Solution: (1/(x+8))+(1/(x+(9/2))) = 1/x
= >(1/(x+8))+(2/(2x+9)) = 1/x
= > x(4x+25) = (x+8)(2x+9)
= > 2×2 = 72
= > x2 = 36
=>x=6
Therefore, A and B together can do the work in 6 days.

6) A and B can do a work in12 days, B and C in 15 days, C and A in 20 days. If A,B
and C work together, they will complete the work in how many days?

Solution: (A+B)’s one day’s work = 1/12;


(B+C)’s one day’s work = 1/15;
(A+C)’s one day’s work = 1/20;
Adding we get 2(A+B+C)’s one day’s work = 1/12+1/15+1/20 = 12/60 = 1/5
(A+B+C)’s one day work = 1/10
So, A,B,and C together can complete the work in 10 days.

7) A and B can do a work in 8 days, B and C can do the same wor in 12 days. A,B
and C together can finish it in 6 days. A and C together will do it in how many
days?

Solution: (A+B+C)’s one day’s work = 1/6;


(A+B)’s one day’s work = 1/8;
(B+C)’s one day’s work = 1/12;
(A+C)’s one day’s work = 2(A+B+C)’s one day’s work-((A+B)’s one day
work+(B+C)’s one day work)
= (2/6)-(1/8+1/12)
= (1/3)- (5/24)
= 3/24
= 1/8
So, A and C together will do the work in 8 days.

8) A can do a certain work in the same time in which B and C together can do it. If
A and B together could do it in 10 days and C alone in 50 days, then B alone could
do it in how many days?

Solution: (A+B)’s one day’s work = 1/10;


C’s one day’s work = 1/50
(A+B+C)’s one day’s work = (1/10+1/50) = 6/50 = 3/25
Also, A’s one day’s work = (B+C)’s one day’s work
From i and ii ,we get :2*(A’s one day’s work) = 3/25
= > A’s one day’s work = 3/50
B’s one day’s work = (1/10-3/50)
= 2/50
= 1/25
B alone could complete the work in 25 days.

9) A is thrice as good a workman as B and therefore is able to finish a job in 60


days less than B. Working together, they can do it in:

Solution: Ratio of times taken by A and B = 1:3.


If difference of time is 2 days , B takes 3 days
If difference of time is 60 days, B takes (3*60/2) = 90 days
So, A takes 30 days to do the work = 1/90
A’s one day’s work = 1/30;
B’s one day’s work = 1/90;
(A+B)’s one day’s work = 1/30+1/90 = 4/90 = 2/45
Therefore, A & B together can do the work in 45/2days
10) A can do a piece of work in 80 days. He works at it for 10 days and then B
alone finishes the remaining work in 42 days. In how much time will A & B,
working together, finish the work?

Solution: Work Done by A n 10 days = 10/80 = 1/8


Remaining work = 1-1/8 = 7/8
Now 7/8 work is done by B in 42 days
Whole work will be done by B in 42*8/7 = 48 days
= > A’s one day’s work = 1/80 and
B’s one day’s work = 1/48
(A+B)’s one day’s work = 1/80+1/48 = 8/240 = 1/30
Hence both will finish the work in 30 days.

11) 45 men can complete a work in 16 days. Six days after they started working,
so more men joined them. How many days will they now take to complete the
remaining work?

Solution: M1*D1/W1 = M2*D2/W2
= >45*6/(6/16) = 75*x/(1-(6/16))
= > x = 6 days

12) A is 50% as efficient as B. C does half the work done by A & B together. If C
alone does the work n 40 days, then A,B and C together can do the work in:

Solution: A’s one day’s work:B’s one days work = 150:100 = 3:2


Let A’s & B’s one day’s work be 3x and 2x days respectively.
Then C’s one day’s work = 5x/2
= > 5x/2 = 1/40
= > x = ((1/40)*(2/5)) = 1/100
A’s one day’s work = 3/100
B’s one day’s work = 1/50
C’s one day’s work = 1/40
So, A,B and C can do the work in 13 1/3 days.

13) A can finish a work in 18 days and B can do the same work in 15 days. B
worked for 10 days and left the job. In how many days A alone can finish the
remaining work?

Solution: B’s 10 day’s work = 10/15 = 2/3


Remaining work = (1-(2/3)) = 1/3
Now, 1/18 work is done by A in 1 day.
Therefore 1/3 work is done by A in 18*(1/3) = 6 days.

14) A can finish a work in 24 days, B n 9 days and C in 12 days. B & C start the
work but are forced to leave after 3 days. The remaining work done by A in:

Solution: (B+C)’s one day’s work = 1/9+1/12 = 7/36


Work done by B & C in 3 days = 3*7/36 = 7/12
Remaining work = 1-(7/12) = 5/12
Now , 1/24 work is done by A in 1 day.
So, 5/12 work is done by A in 24*5/12 = 10 days

15) X and Y can do a piece of work n 20 days and 12 days respectively. X started
the work alone and then after 4 days Y joined him till the completion of work. How
long did the work last?

Solution: work done by X in 4 days = 4/20 = 1/5


Remaining work = 1-1/5 = 4/5
(X+Y)’s one day’s work = 1/20+1/12 = 8/60 = 2/15
Now, 2/15 work is done by X and Y in one day.
So, 4/5 work will be done by X and Y in 15/2*4/5 = 6 days
Hence Total time taken = (6+4) days = 10 days

16) A does 4/5 of work in 20 days. He then calls in B and they together finish the
remaining work in 3 days. How long B alone would take to do the whole work?

Solution: Whole work is done by A in 20*5/4 = 25 days


Now, (1-(4/5)) i.e 1/5 work is done by A & B in days.
Whole work will be done by A & B in 3*5 = 15 days
= >B’s one day’s work = 1/15-1/25 = 4/150 = 2/75
So, B alone would do the work in 75/2 = 37 ½ days.

17) A and B can do a piece of work in 45 days and 40 days respectively. They
began to do the work together but A leaves after some days and then B completed
the remaining work n 23 days. The number of days after which A left the work was

Solution: (A+B)’s one day’s work = 1/45+1/40 = 17/360


Work done by B in 23 days = 23/40
Remaining work = 1-(23/40) = 17/40
Now, 17/360 work was done by (A+B) in 1 day.
17/40 work was done by (A+B) in (1*(360/17)*(17/40)) = 9 days
So, A left after 9 days.

18) A can do a piece of work in 10 days, B in 15 days. They work for 5 days. The
rest of work finished by C in 2 days. If they get Rs 1500 for the whole work, the
daily wages of B and C are:

Solution: Part of work done by A = 5/10 = 1/2


Part of work done by B = 1/3
Part of work done by C = (1-(1/2+1/3)) = 1/6
A’s share: B’s share: C’s share = 1/2:1/3:1/6 = 3:2:1
A’s share = (3/6)*1500 = 750
B’s share = (2/6)*1500 = 500
C’s share = (1/6)*1500 = 250
A’s daily wages = 750/5 = 150/-
B’s daily wages = 500/5 = 100/-
C’s daily wages = 250/2 = 125/-
Daily wages of B & C = 100+125 = 225/-

19) A alone can complete a work in 16 days and B alone can complete the same in
12 days. Starting with A, they work on alternate days. The total work will be
completed in how many days?

(a) 12 days (b) 13 days (c) 13 5/7 days (d)13 ¾ days

Solution: (A+B)’s 2 days work = 1/16 + 1/12 = 7/48


work done in 6 pairs of days = (7/48) * 6 = 7/8
remaining work = 1- 7/8 = 1/8
work done by A on 13th day = 1/16
remaining work = 1/8 – 1/16 = 1/16
on 14th day, it is B’s turn
1/12 work is done by B in 1 day.
1/16 work is done by B in ¾ day.
Total time taken = 13 ¾ days.
So, Answer is: D

20) A,B and C can do a piece of work in 20,30 and 60 days respectively. In how
many days can A do the work if he is assisted by B and C on every third day?

Solution: A’s two day’s work = 2/20 = 1/10


(A+B+C)’s one day’s work = 1/20+1/30+1/60 = 6/60 = 1/10
Work done in 3 days = (1/10+1/10) = 1/5
Now, 1/5 work is done in 3 days
Therefore, Whole work will be done in (3*5) = 15 days.

21) Seven men can complete a work in 12 days. They started the work and after 5
days, two men left. In how many days will the work be completed by the
remaining men?

(A) 5 (B) 6 (C ) 7 (D) 8 (E) none

Solution: 7*12 men complete the work in 1 day.


Therefore, 1 man’s 1 day’s work = 1/84
7 men’s 5 days work = 5/12
= >remaining work = 1-5/12 = 7/12
5 men’s 1 day’s work = 5/84
5/84 work is don by them in 1 day
7/12 work is done by them in ((84/5) * (7/12)) = 49/5 days = 9 4/5 days.
Ans: E

22) 12 men complete a work in 9 days. After they have worked for 6 days, 6 more
men joined them. How many days will they take to complete the remaining work?

(a) 2 days (b) 3 days (c) 4 days (d) 5days

Solution: 1 man’s 1 day work = 1/108


12 men’s 6 days work = 6/9 = 2/3
remaining work = 1 – 2/3 = 1/3
18 men’s 1 days work = 18/108 = 1/6
1/6 work is done by them in 1 day
therefore, 1/3 work is done by them in 6/3 = 2 days.
Ans : A

23) A man, a woman and a boy can complete a job in 3,4 and 12 days respectively.
How many boys must assist 1 man and 1 woman to complete the job in ¼ of a
day?

(a). 1 (b). 4 (c). 19 (d). 41

Solution: (1 man + 1 woman)’s 1 days work = 1/3+1/4 = 7/12


Work done by 1 man and 1 women n 1/4 day = ((7/12)*(1/4)) = 7/48
Remaining work = 1- 7/48 = 41/48
Work done by 1 boy in ¼ day = ((1/12)*(1/4)) = 1/48
Therefore, Number of boys required = ((41/48)*48) = 41 days
So,Answer: D

24) 12 men can complete a piece of work in 4 days, while 15 women can complete
the same work in 4 days. 6 men start working on the job and after working for 2
days, all of them stopped working. How many women should be put on the job to
complete the remaining work, if it is to be completed in 3 days.

(A) 15 (B) 18 (C) 22 (D) data inadequate

Solution: one man’s one day’s work = 1/48


one woman’s one day’s work = 1/60
6 men’s 2 day’s work = ((6/48)*2) = ¼
Remaining work = 3/4
Now, 1/60 work s done in 1 day by 1 woman.
So, ¾ work will be done in 3 days by (60*(3/4)*(1/3)) = 15 woman.
So, Answer: A

25) Twelve children take sixteen days to complete a work which can be completed
by 8 adults in 12 days. Sixteen adults left and four children joined them. How
many days will they take to complete the remaining work?

(A) 3 (B) 4 ( C) 6 (D) 8


Solution: one child’s one day work = 1/192;
one adult’s one day’s work = 1/96;
work done in 3 days = ((1/96)*16*3) = 1/2
Remaining work = 1 – ½ = 1/2
(6 adults+ 4 children)’s 1 day’s work = 6/96+4/192 = 1/12
1/12 work is done by them in 1 day.
½ work is done by them 12*(1/2) = 6 days
So, Answer = C

26) Sixteen men can complete a work in twelve days. Twenty four children can
complete the same work in 18 days. 12 men and 8 children started working and
after eight days three more children joined them. How many days will they now
take to complete the remaining work?

(A) 2 days (B) 4 days ( C) 6 days (D) 8 days

Solution: one man’s one day’s work = 1/192


one child’s one day’s work = 1/432
Work done in 8 days = 8*(12/192+ 8/432) = 8*(1/16+1/54) = 35/54
Remaining work = 1 -35/54 = 19/54
(12 men+11 children)’s 1 day’s work = 12/192 + 11/432 = 19/216
Now, 19/216 work is done by them in 1 day.
Therefore, 19/54 work will be done by them in ((216/19)*(19/54)) = 4 days
So,Answer: B

27) Twenty-four men can complete a work in 16 days. Thirty- two women can
complete the same work in twenty-four days. Sixteen men and sixteen women
started working and worked for 12 days. How many more men are to be added to
complete the remaining work in 2 days?

(A) 16 men (B) 24 men ( C) 36 men (D) 48 men

Solution: one man’s one day’s work = 1/384


one woman’s one day’s work = 1/768
Work done in 12 days = 12*( 16/384 + 16/768) = 12*(3/48) = 3/4
Remaining work = 1 – ¾ = 1/4
(16 men+16 women)’s two day’s work = 12*( 16/384+16/768) = 2/16 = 1/8
Remaining work = 1/4-1/8 = 1/8
1/384 work is done n 1 day by 1 man.
Therefore, 1/8 work will be done in 2 days in 384*(1/8)*(1/2) = 24men

28) 4 men and 6 women can complete a work in 8 days, while 3 men and 7 women
can complete it in 10 days. In how many days will 10 women complete it?

(A) 35 days (B) 40 days ( C) 45 days (D) 50 days

Solution: Let 1 man’s 1 day’s work = x days and


1 woman’s 1 day’s work = y
Then, 4x+6y = 1/8 and 3x+7y = 1/10.
Solving these two equations, we get: x = 11/400 and y = 1/400
Therefore, 1 woman’s 1 day’s work = 1/400
= > 10 women will complete the work in 40 days.
Answer: B
29) One man, 3 women and 4 boys can do a piece of work in 96 hours, 2 men and
8 boys can do it in 80 hours, 2 men & 3 women can do it in 120 hours. 5 Men & 12
boys can do it in how many hours?

(A) 39 1/11 hrs (B) 42 7/11 hrs ( C) 43 7/11 days (D) 44hrs

Solution: Let 1 man’s 1 hour’s work = x


1 woman’s 1 hour’s work = y
1 boy’s 1 hour’s work = z
Then, x+3y+4z = 1/96 ———– (1)
2x+8z = 1/80 ———- (2)
adding (2) & (3) and subtracting (1)
3x+4z = 1/96 ———(4)
From (2) and (4), we get x = 1/480
Substituting, we get : y = 1/720 and z = 1/960
(5 men+ 12 boy)’s 1 hour’s work = 5/480+12/960 = 1/96 + 1/80 = 11/480
Therefore, 5 men and 12 boys can do the work in 480/11 or 43 7/11hours.
So, Answer: C

Company Name: HCL
Type: Fresher, Job Interview
Hi Friends, I’m Vijayakumar from VelTech HighTech Engg. college, Avadi, Chennai. HCL tech
visited our college on 10th dec,2010.Actually they conduct interview in two days.

Rounds were:
1.Written Test.
2.Technical
3. HR
From our campus totally 750 students attend the written test.
HCL interface has totally 4 sessions in Written test:
1. Verbal.
2. Quantitative.
3. Technical
4. Logical
Total time for written test is 2 hours 10 minutes. In HCL interface, we doesn’t go back to
previous question. no negative marks.

Quantitative:
1. x=(1+2)^(1/2)
y=(1-2)^(1/2)
therefore x^2 +y^2=?
2. log5(0.008)= n log5(2^-3) therefore n=?
3. 2A=3B
4B=5C. then A : C=?
4. a=16, b=25 therefore 1/(a^1/2-a^-1/2)=?
5. 2^x+y=2*(2)^1/2
2^x-y=2^1/2
Therefore value of x and y=?
6. ----------(-) 5a^2-3ab+7b^2=a^2+ab+b^2.
7. In a rectangle ABCD, an equivalent triangle PQR is placed in-between that rectangle.
Therefore what is the probability of one point that should be placed within triangle?
8. In a word ASPIRATION, what is the probability for selecting one letter as vowel?
9. log 7(85)=x (some problem lik this). based on log many problems they ask.. so friends
well prepare LOG chapter in R.S AGARWAL.
10. (a+b)(a^2-ab+b^2)-(a-b)(a^2+ab+b^2) simplify.
11. An unbiased dice is thrown two times. Then what is the probability for getting sum of
values of two dices is less than 4?
12. In 1990,population of one city is 3,63,000. It was 10% increased at every decade.
Therefore what is the population of that city in 1960.?
13. one more problem in probability. A dice is thrown twice then what is the probability for
getting the sum of two dice is exactly 6.?
14. logz(0)=?

TECHNICAL:
Friends, Technical Round is fully based on C programming language and data structures.
so be confident in this subjects.
1. one program is given as maximum of three numbers and find the missing condition in if
() statement..? 
Answer: (value2>temp)
2. Another program given about sum of cube form numbers..
3. one problem is in stack
4. program given to print the statement like
0
03
036
0 3 6 9.
Program given, we have to choose the correct the output. Most of the question like tree and
its level& no. of nodes.., complexity of searching techniques etc.

LOGICAL:
1. A man is facing the EAST direction. He walk 3km from starting point and take left and
walk another 3km. After, he took left and walk 1km and again takes right and walk 3km.
Then how far he is from starting point…?
2. Arrange the events according to correct order:
- Consultant
- Illness
- Doctor
- Recovery
- Treatment
3. some question  like……… statements given, we have to select the correct statement
needed to derive the answer.. paragraph given about the family members and their
relationship and asked 4 questions from that.
4. arrange the following..
- Paint
- Computer
- Print
- File
- Programs
5. AZP : ZAR 
Therefore TXK=? Ans: XTM
Totally 750 students attended the written test on 10/12/10.out of this 340 were announced
to eligible for technical and HR rounds. my name also one of this. I attend the Technical and
HR (both in single panel) on 11/12/10.

Technical and HR:


Nearly 12.05 attended the HR and Technical round:
My HR was very cool person… 
Me: May I come in sir..
HR: yes.. 
Me: very good afternoon sir..
HR: hmmm.. please take your seat..
Me: Thank you sir..
HR: (usual question) tell about yourself..
Me: told
HR: tell something something about your family..
Me : told (actually I talk somewhat mildly)
HR: are feeling nervous..?
Me.: yes sir slightly.. but now ok sir..
HR: (he start to ask technical question)
What is data structure..?
Me: told
HR: what is database and data mining?
Me: explained
HR: what is the difference between the SQL and ORACLE.?
Me: explained well( he impressed)
HR: do u know the symbol of latest Rupees in India?
Me: at beginning I told that . I don’t know sir...sorry. but after he start the next ques I
interrupt and asked “shall I draw it sir?”
HR: of course.. sure..
Me: I drew it (nearly its right..)
HR: good.. again he asked about my family…
This time I explained well..
HR: tell something about your brother..?
Me: somewhat told..
HR: ok Vijayakumar.. that it.. do you have any question with me..
Me: no sir.. 
HR: I think u well know about bond and other conditions..
Me: yes sir..
HR: ok u can go now...
Me: Thank you sir (somewhat boldly)
After did my HR I waited more than 7 hours for results.. nearly 8p.m results were
announced. Really it was very thrilling moment. they announced the candidate names in
alphabetical order. so I thought my name may be at last. Finally my name also announced. I
was very much surprised. God’s grace I was selected. Out of 340 ,totally 257 were
selected.

HCL Latest Placement Paper | January 2010 (Fresher Recruitment)


Directions (Q. 1-5): In each of the following number series one of the given numbers is
wrong. Find out the wrong number.
1. 8 34 207 1661 16617 199417
1) 8
2) 34
3) 207
4) 1661
5) None of these

2. 7 75 395 2379 11879 47541


1) 7
2) 75
3) 395
4) 2379
5) None of these

3. 420 70 75 300 197 148.5


1) 70
2) 75
3) 300
4) 197
5) None of these

4. 9 21 51 155 540 2163


1) 9
2) 21
3) 51
4) 2163
5) None of these

5. 22 37 59 97 155 251
1) 37
2) 59
3) 97
4) 155
5) None of these

6. An angry Arjun carried some arrows for fighting with Bheeshm. With half the
arrows, he cut down the arrows thrown by Bheeshm on him and with six other
arrows he killed the Chariot driver of Bheeshm. With one arrow each he knocked
down respectively the Chariot, the flag and the bow of Bheeshm. Finally, with one
more than four times the square root of arrows he laid Bheeshm unconscious on
an arrow bed. Find the total number of arrows Arjun had.
1) 100
2) 121
3) 144
4) 169
5) None of these

Directions (Q. 7-11): Study the following information carefully and answer the questions
given below:
Total population of a village is 64000. Out of this 65% is literate. 60% of the total
population is male. Out of the total illiterate population, males and female are in the ratio
3:4
7. What is the ratio of illiterate females to literate ones?
1) 1:1
2) 1:2
3) 4:7
4) Data inadequate
5) None of these

8. Among the males what is the ratio of literate ones to illiterate ones?
1) 3:1
2) 1:3
3) 9:4
4) Data inadequate
5) None of these

9. What is the ratio of literate males to literate females?


1) 4:9
2) 9:4
3) 9:13
4) Data inadequate
5) None of these

10. What is the total number of illiterate males?


1) 6400
2) 12800
3) 9600
4) 3200
5) None of these

11. What is the total number of literate females?


1) 6400
2) 12800
3) 9600
4) 3200
5) None of these 

Directions (Q.12-16): Study the following table and answer the questions given below:
Following table shows the rural population and the percentage of total population living in
the rural areas of the country X.

Censes Population (in million) Percentage


1901 213 89.2
1911 246 89.7 
1921 223 88.8
1931 246 88.0
1941 275 86.1
1951 299 82.7
1961 360 82.0
1971 439 80.1
1981 524 76.7
1991 629 74.2
2001 743 72.3
12. Approximately what was the urban population of country X in the census year
1981?1) 109 million
2) 129 million
3) 159 million
4) 218 million
5) 155 million

13. In which of the following census years was the population of the urban area 79
million?
1) 1951
2) 1961
3) 1971
4) 1981
5) 1991

14. Approximately what was total population of the country X in the census year
2001?
1) 1050 million
2) 1129 million
3) 1000 million
4) 743 million
5) 1029 million

15. The total population of the country X was approximately how much more in the
census year 1931 with respect to the same in the census year 1921?
1) 23 million
2) 29 million
3) 25 million
4) 32 million
5) 34 million

16. The population of urban area in the census year 1941 was approximately what
percent of the same in the census year 1951?
1) 55%
2) 60%
3) 62%
4) 65%
5) 70%

Passage(Questions From 17-21): A spate of soul-searching is guaranteed by two major


anniversaries that loom this year: the abolition of the slave trade in the British empire in
1807, and the Act of Union of England and Scotland in 1707. Both will feed into Britain's
nagging sense of self-doubt: who are we? As the debates around integrated and multi-
culturalism show no sign of flagging, both anniversaries will be mind for their contemporary
relevance.
Television programmes, books, ceremonies, conferences, and newspaper supplements have
been in the planning for months.

Some might regard this self-referentialism as tedious; they might advocate an apology for
the slave trade and let's be done with 2007's anniversaries. But our reckoning with British
history has been so limited that these two anniversaries provide us with a good opportunity
for an overdue reality check.

Any chance of reinventing a plausible national identity now (as many are keen to do) is only
possible if we develop a much better understanding of how our nation behaved in the past
and how nationalisms (English, Scottish, and British) were elaborately created over the past
few hundred years — and how incomplete and fragile that process always was.
The coincidence of these two anniversaries is fortuitous. The abolition of the slave trade is a
painful reminder of British imperial history, which we have, incredible, managed to largely
forget. Who remembers the Bengal famine or Hola camp, the empire's opium trade with
China or our invention of concentration camps in the Boer war? We too easily overlook how
empire was a linchpin to British national identity, vital to welding Scotland and England
together. Indeed, historian Linda Colley suggests three ingredients for British identity:
“Great Britain is an invented nation that was not founded on the suppression of older
loyalties so much as superimposed on them, and that was heavily dependent for its raison
d'etre on a broadly Protestant culture, on the treat and tonic of recurrent war, especially war
with France, and on the triumphs, profits and Otherness represented by a massive overseas
empire.”

These three props for Britishness have collapsed: Protestant Christianity has declined
sharply, war with France is the pastime only of a few drunken football fans, and the empire
is no more. No wonder Britishness is no the decline; over the past couple of decades, people
have become increasingly likely to define themselves in polls as English or Scottish rather
than British.

This is the social trend in defining identity that politicians such as Gordon Brown watch
closely. Could this re-emergence of the older loyalties to which Ms Colley refers have
political consequences? Could the Scottish National Party translate that into significant
electoral gains in the Scottish elections only a few days after the official commemoration of
the Act of Union in May?

It's not just the Scots who could decide they've had enough of the English — the feeling
could become mutual. The grumbles are getting louder about Scottish MPs who vote on
legislation affecting the English and the disproportionate amount of public spending
swallowed up by the Scots.

Mr Brown clearly has a vested interest in stilling such complaints. He's been at the forefront
of an establishment attempt to redefine Britishness on the grounds of “common values”
such as fair play and tolerance.

Who is going to define Englishness? Julian Baggini has a stab at it in a book to be published
in March, Welcome to Every town: A Journey into the English Mind. He spent six months
living in Rotherham to get beyond the metropolitan, liberal elite's perceptions of Englishness
and establish what most people (that is, the white working class) understand by their
Englishness.

Parochial, tightly knit, focused on family and local communities; nostalgic, fearful of the
future and insecure; a dogged belief in common sense: these are his conclusions. Mr Baggini
confesses to feeling that his six months in Rotherham was like visiting a foreign country,
and no doubt many of the people he met would regard six months in London as profoundly
alienating. How do you weld national identities out of global metropolises disconnected from
hinterland? Englishness is riven with huge regional and class divides. The stakes are high —
for example, a rising British National Party vote, a fear of asylum, and hostility to Islam. The
anniversary of the Act of union will provide a stage for all this to be played out. It's just as
painful a commemoration for the English as for the Scottish. It required one nation to lose
its sovereignty and the other its identity.

17. According to the passage, the two major anniversaries will


1) give an impetus to the questioning of British national identity.
2) set the Britons thinking who they really are.
3) be just another occasion to raise the issue of British national identity.
4) be just another occasion to give rise to a debate on multiculturalism.
5) not be celebrated because of the shame attached with slave trade.

18. According to Linda Colley, Great Britain owes its nation-state concept to
1) ceding of its territory by Scotland to England.
2) a shared relation of race, religion and economy.
3) what can today be seen as a concept of free trade area.
4) the perpetuation of slave trade.
5) commonality of interest between its constituents.

19. Going by the passage, which of the following may instill a sense of national
identity among the Britons?
1) The return of Catholics to the Protestant fold
2) Britain going to war with Germany
3) Britain going to war as an Allied force
4) Regular football matches between British and French clubs
5) Any of the above

20. According to the facts stated in the passage, if England and Scotland decide to
split,
1) it is the former that stands to gain.
2) it is the latter that stands to gain.
3) it will be a win-win situation.
4) it will be a lose-lose situation.
5) both the parties will lose their face but gain materially

21. According to the passage, the post-modern mind views imperialism as


1) something that was necessary in the context of the times.
2) a thing of the past which need not be mentioned further.
3) a blot on the history of mankind.
4) the white man's burden.
5) a concept relevant even in the present times, given the inability of the developing
countries to catch up with the West.

22. Oranges are bought at 7 for Rs.3. At what rate per hundred must they be sold
to gain 33%?
(1) Rs.56
(2) Rs.60
(3) Rs.58
(4) Rs.57
23.The cost price of 36 books is equal to the selling price of 30 books. The gain is :
(1) 20%
(2) 16%
(3) 18%
(4) 82%

24.A person sells two machines at Rs.396 each. On one he gains 10% and on the
other he loses 10% .His profit or loss in the whole transaction is :
(1) No gain, no loss
(2) 1% loss
(3) 1% profit
(4) 8% profit
25.A trader bought 10kg of apples for Rs.405 out of which 1kg of apples were
found to be rotten. If he wishes to make a profit of 10%, at what rate should he
sell the remaining apples per kg?
(1) Rs.45
(2) Rs.49.50
(3) Rs.50
(4) Rs. 51

ANSWERS:
1. (5) 2. (2) 3. (4) 4. (1) 5. (3) 6. (1) 7. (1) 8. (1) 9. (2) 10. (3) 11. (2) 12.(3) 13.
(2) 14. (5) 15. (2) 16. (5) 17. (1) 18. (5) 19. (2) 20. (1) 21. (3) 22.(4) 23.(1) 24
(2) 25(2)
 

HCL Placement Question Paper: Solved (C Language)


Instructions:
1. Please ignore any case-sensitive errors and un-included libraries.
2. You may use the back of this question paper for any rough work.

Q1.
main()
{
int i;
clrscr();
printf("%d", &i)+1;
scanf("%d", i)-1;
}
a. Runtime error.
b. Runtime error. Access violation.
c. Compile error. Illegal syntax
d. None of the above

Ans: d,printf( ) prints address/garbage of i,


scanf() dont hav & sign, so scans address for i
+1, -1 dont hav any effect on code

Q2.
main(int argc, char *argv[])
{
(main && argc) ? main(argc-1, NULL) : return 0;
}
a. Runtime error.
b. Compile error. Illegal syntax
c. Gets into Infinite loop
d. None of the above

Ans: b) illegal syntax for using return

Q3.
main()
{
int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);
}
a. Runtime error.
b. 100
c. Some Integer not 100
d. None of the above

Ans: d) 0

Q4.
main()
{
int i = 0xff ;
printf("\n%d", i<<2);
}

a. 4
b. 512
c. 1020
d. 1024

Ans: c) 1020

Q5.
#define SQR(x) x * x
main()
{
printf("%d", 225/SQR(15));
}

a. 1
b. 225
c. 15
d. none of the above

Ans: b) 225

Q6.
union u
{
struct st
{
int i : 4;
int j : 4;
int k : 4;
int l;
}st;
int i;
}u;
main()
{
u.i = 100;
printf("%d, %d, %d",u.i, u.st.i, u.st.l);
}

a. 4, 4, 0
b. 0, 0, 0
c. 100, 4, 0
d. 40, 4, 0

Ans: c) 100, 4, 0

Q7.
union u
{
union u
{
int i;
int j;
}a[10];
int b[10];
}u;
main()
{
printf("\n%d", sizeof(u));
printf(" %d", sizeof(u.a));
// printf("%d", sizeof(u.a[4].i));
}

a. 4, 4, 4
b. 40, 4, 4
c. 1, 100, 1
d. 40 400 4

Ans: 20, 200, error for 3rd printf

Q8.
main()
{
int (*functable[2])(char *format, ...) ={printf, scanf};
int i = 100;
(*functable[0])("%d", i);
(*functable[1])("%d", i);
(*functable[1])("%d", i);
(*functable[0])("%d", &i);

a. 100, Runtime error.


b. 100, Random number, Random number, Random number.
c. Compile error
d. 100, Random number

Q9.
main()
{
int i, j, *p;
i = 25;
j = 100;
p = &i; // Address of i is assigned to pointer p
printf("%f", i/(*p) ); // i is divided by pointer p
}
a. Runtime error.
b. 1.00000
c. Compile error
d. 0.00000

Ans: c) Error becoz i/(*p) is 25/25 i.e 1 which is int & printed as a float,
So abnormal program termination,
runs if (float) i/(*p) -----> Type Casting

Q10.
main()
{
int i, j;
scanf("%d %d"+scanf("%d %d", &i, &j));
printf("%d %d", i, j);
}
a. Runtime error.
b. 0, 0
c. Compile error
d. the first two values entered by the user

Ans: d) two values entered, 3rd will be null pointer assignment

Q11.
main()
{
char *p = "hello world";
p[0] = 'H';
printf("%s", p);
}

a. Runtime error.
b. “Hello world”
c. Compile error
d. “hello world”

Ans: b) Hello world


Q12.
main()
{
char * strA;
char * strB = I am OK;
memcpy( strA, strB, 6);
}
a. Runtime error.
b. I am OK
c. Compile error
d. I am O

Ans: c) I am OK is not in " "

Q13. How will you print % character?


a. printf(“\%”)
b. printf(“\\%”)
c. printf(“%%”)
d. printf(“\%%”)

Ans: c) printf(" %% ");

Q14.
const int perplexed = 2;
#define perplexed 3
main()
{
#ifdef perplexed
#undef perplexed
#define perplexed 4
#endif
printf("%d",perplexed);
}

a. 0
b. 2
c. 4
d. none of the above

Ans: c)

Q15.
struct Foo
{
char *pName;
};
main()
{
struct Foo *obj = malloc(sizeof(struct Foo));
clrscr();
strcpy(obj->pName,"Your Name");
printf("%s", obj->pName);
}
a. Your Name
b. compile error
c. Name
d. Runtime error

Ans a)

Q16.
struct Foo
{
char *pName;
char *pAddress;
};
main()
{
struct Foo *obj = malloc(sizeof(struct Foo));
clrscr();
obj->pName = malloc(100);
obj->pAddress = malloc(100);

strcpy(obj->pName,"Your Name");
strcpy(obj->pAddress, "Your Address");

free(obj);
printf("%s", obj->pName);
printf("%s", obj->pAddress);
}

a. Your Name, Your Address


b. Your Address, Your Address
c. Your Name Your Name
d. None of the above

Ans: d) printd Nothing, as after free(obj), no memory is there containing


obj->pName & pbj->pAddress

Q17.
main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcat(a,b));
}
a. Hello
b. Hello World
c. HelloWorld
d. None of the above

Ans: b)

Q18.
main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcpy(a,b));
}

a. “Hello”
b. “Hello World”
c. “HelloWorld”
d. None of the above

Ans: d) World, copies World on a, overwrites Hello in a.

Q19.
void func1(int (*a)[10])
{
printf("Ok it works");
}
void func2(int a[][10])
{
printf("Will this work?");
}

main() 

int a[10][10];
func1(a); 
func2(a);
}

a. Ok it works
b. Will this work?
c. Ok it worksWill this work?
d. None of the above

Ans: c)

Q20.
main()
{
printf("%d, %d", sizeof('c'), sizeof(100));
}
a. 2, 2
b. 2, 100
c. 4, 100
d. 4, 4

Ans: a) 2, 2

Q21.
main()
{
int i = 100;
clrscr();
printf("%d", sizeof(sizeof(i)));
}
a. 2
b. 100
c. 4
d. none of the above

Ans: a) 2

Q22.
main()
{
int c = 5;
printf("%d", main||c);
}

a. 1
b. 5
c. 0
d. none of the above

Ans: a) 1, if we use main|c then error, illegal use of pointer

Q23.
main()
{
char c;
int i = 456;
clrscr();
c = i;
printf("%d", c);
}
a. 456
b. -456
c. random number
d. none of the above

Ans: d) -56

Q24.
void main ()
{
int x = 10;
printf ("x = %d, y = %d", x,--x++);
}
a. 10, 10
b. 10, 9
c. 10, 11
d. none of the above
Ans: d) Lvalue required

Q25.
main()
{
int i =10, j = 20;
clrscr();
printf("%d, %d, ", j-- , --i);
printf("%d, %d ", j++ , ++i);
}
a. 20, 10, 20, 10
b. 20, 9, 20, 10
c. 20, 9, 19, 10
d. 19, 9, 20, 10

Ans: c)

Q26.
main()
{
int x=5;
clrscr();

for(;x==0;x--) {
printf("x=%d\n”", x--);
}
}

a. 4, 3, 2, 1, 0
b. 1, 2, 3, 4, 5
c. 0, 1, 2, 3, 4
d. none of the above

Ans: d) prints nothing, as condition x==0 is False

Q27
main()
{
int x=5;
for(;x!=0;x--) {
printf("x=%d\n", x--);
}
}

a. 5, 4, 3, 2,1
b. 4, 3, 2, 1, 0
c. 5, 3, 1
d. none of the above

Ans: d) Infinite loop as x is decremented twice, it never be 0


and loop is going on & on

Q28
main()
{
int x=5;
clrscr();
for(;x<= 0;x--)
{
printf("x=%d ", x--);
}
}
a. 5, 3, 1
b. 5, 2, 1,
c. 5, 3, 1, -1, 3
d. –3, -1, 1, 3, 5

Ans: prints nothing, as condition in loop is false.

Q29.
main()
{
{
unsigned int bit=256;
printf("%d", bit);
}
{
unsigned int bit=512;
printf("%d", bit);
}
}
a. 256, 256
b. 512, 512
c. 256, 512
d. Compile error

Ans: 256, 512, becoz these r different blocks, so declaration allowed

Q30.
main()
{
int i;
clrscr();
for(i=0;i<5;i++)
{
printf("%d\n", 1L << i);
}
}
a. 5, 4, 3, 2, 1
b. 0, 1, 2, 3, 4
c. 0, 1, 2, 4, 8
d. 1, 2, 4, 8, 16

Ans: d) L does't make any diff.


Q31.
main()
{
signed int bit=512, i=5;
for(;i;i--)
{
printf("%d\n", bit = (bit >> (i - (i -1))));
}
}

a. 512, 256, 128, 64, 32


b. 256, 128, 64, 32, 16
c. 128, 64, 32, 16, 8
d. 64, 32, 16, 8, 4

Ans: b)

Q32.
main()
{
signed int bit=512, i=5;
for(;i;i--)
{
printf("%d\n", bit >> (i - (i -1)));
}
}

a. 512, 256, 0, 0, 0
b. 256, 256, 0, 0, 0
c. 512, 512, 512, 512, 512
d. 256, 256, 256, 256, 256

Ans: d) bit's value is not changed

Q33.
main()
{
if (!(1&&0))
{
printf("OK I am done.");
}
else
{
printf("OK I am gone.");
}
}
a. OK I am done
b. OK I am gone
c. compile error
d. none of the above

Ans: a)
Q34
main()
{
if ((1||0) && (0||1))
{
printf("OK I am done.");
}
else
{
printf("OK I am gone.");
}
}
a. OK I am done
b. OK I am gone
c. compile error
d. none of the above

Ans: a)

Q35
main()
{
signed int bit=512, mBit;
{
mBit = ~bit;
bit = bit & ~bit ;

printf("%d %d", bit, mBit);


}
}

a. 0, 0
b. 0, 513
c. 512, 0
d. 0, -513

Ans: d)

Paper : Campus Placement Papers HCL


Aptitude Questions

1. Which of the following involves context switch,


(a) system call
(b) priviliged instruction
(c) floating poitnt exception
(d) all the above
(e) none of the above

Ans: (a)

2. In OST, terminal emulation is done in


(a) sessions layer
(b) application layer
(c) presentation layer
(d) transport layer

Ans: (b)

3. For 1 MB memory, the number of address lines required,


(a)11
(b)16
(c)22
(d) 24

Ans. (b)

4. Semaphore is used for


(a) synchronization
(b) dead-lock avoidence
(c) box
(d) none

Ans. (a)

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

6.Preproconia.. does not do which one of the following


(a) macro
(b) conditional compliclation
(c) in type checking
(d) including load file
Ans. (c)

7. Piggy backing is a technique for


a) Flow control
b) Sequence
c) Acknowledgement
d) retransmition
Ans. (c)

8. Given the following statement


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
Ans (e)

9. Find the output for the following C program


i=20,k=0;
for(j=1;j9 && Y++!=10 && Y++>10)
{printf("%d", Y);
else
printf("%d", Y);
}

Ans. 13

12. Find the output for the following C program


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

Ans. (a)

13. What is the sizeof(long int)


(a) 4 bytes
(b) 2 bytes
(c) compiler dependent
(d) 8 bytes

Ans: (a) or (c)

14.1. a=2, b=3, c=6


Find the value of c/(a+b)-(a+b)/c
Ans : 0.3 or 3/10

15.. What does the hexanumber E78 in radix 7.


(a) 12455
(b) 14153
(c) 14256
(d) 13541
(e) 131112

Ans. (d)

16.. 10 : 4 seconds :: ? : 6 minutes

Ans. 900

17.. 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 18 - 22 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

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

19. If B occurs which must occur


(a) D
(b) D and G
(c) G and H
(d) F and G
(e) J
Ans. (a)

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

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

22. E occurs which one cannot occurs


(a) A
(b) F
(c) D
(d) C
(e) J
Ans. (b)

[ Draw table and see ]


23.A man fixed an appointment to meet the manager, Manager asked him to come two days
after the day before the day after tomorrow. Today is Friday. When will the manager expect
him? (repeated from previous papers)
Ans: Monday

[Don't confuse it with Tuesday.the correct answer is Monday]

24.A man said he spent 1/6 of his as a child, 1/12 as salesman in a liquor shop, 1/7 and 5
years as a politician and a good husband respectively. At that time Jim was born. Jim was
elected as Alderman four years back.when he was half of his age. What is his age?
(repeated from previous papers)

Ans: 84 years

[Assume that he lived x years.


X/6 + x/12 + x/7 + 5 + 4 + x/2 = x. Solving x= 84, Same as Question in Shakundala Devi
book]

25.Jack,Doug and Ann, 3 children had a running race while returning from school.Mom
asked who won the race. Then Jack replied" I wont tell u.I wil give u a clue,When Ann takes
28 steps Doug takes 24 steps, meantime I take 21 steps. Jack explained that his 6 steps
equals Droug's 7 steps and Ann's 8 steps. Who won the race? (repeated from previous
papers)

Ans: Doug

[ Ann steps = 8,16,24,28 --- finished by 3 & half full steps


Doug steps=7,14,21,24 --- finished before 3 & half full steps
Jack steps= 6,12,18,21 --- finished by 3 & half full steps
So Doug won the race ]

26. Every day a cyclist meets a car at the station.The road is straight and both are travelling
in the same direction. The cyclist travels with a speed of 12 mph.One day the cyclist comes
late by 20 min. and meets the car 5miles before the Station. What is the speed of the car?

Ans: 60 mph

[Very similar to Shakuntala Devi puzzles to puzzle you problem no: 38 ]

27.A lady goes for shopping. She bought some shoestrings. 4 times the number of
shoestrings, she bought pins and 8 times, handkerchiefs. She paid each item with their
count as each piece's cost. She totally spent Rs. 3.24.How many handkerchiefs did she buy?
(repeated from previous papers)

28. Complete the series :

a) 3,6,13,26,33,66,____(repeated from previous papers)


b) 364,361,19,16,4,1,___( " " " )

Ans : a) 63
b) 1
29. Lucia is a wonderful grandmother. Her age is between 50 and 70.Each of her sons have
as many sons as they have brothers. Their combined number gives Lucia?s age. What is the
age?

Ans: 64

30.There are two towers A and B. Their heights are 200ft and 150ft respectively and the
foot of the towers are 250ft apart. Two birds on top of each tower fly down with the same
speed and meet at the same instant on the ground to pick a grain. What is the distance
between the foot of tower A and the grain?

Ans:90ft

31. Grass in lawn grows equally thick and in a uniform rate. It takes 40 days for 40 cows
and 60 days for 30 cows to eat the whole of the grass. How many days does it take for 20
cows to do the same?

Ans: 120

32. Four tourists A,B,C,D and four languages English, German, French and Italian. They are
not able to converse among themselves in one language. Though A does not know English
he can act as an interpreter between B and C. No one spoke both French and German. A
knows German and was able to converse with D who doesn?t know a word in German. Only
one language was spoken by more than two persons. Each spoke two languages. Find who
spoke what.

Ans : A- German,Italian
B- French,Italian
c- German,English
D- Italian,English

33. There is a five digit number. It has two prime digits (1 is not a prime number). Third
digit is the highest. Second digit is the lowest. First digit is one less than the third digit. The
fifth digit is half of the fourth. The sum of 4th and 5th is less than the first. Find the number.

Ans ? 71842

34. Four persons A, B, C and D are playing cards. Each person has one card, laid down on
the table below him, which has two different colours on either side. No card has the same
color on both sides. The colours visible on the table are Red, Green, Red and Blue
respectively. They see the color on the reverse side and give the following comment.

A: Yellow or Green
B: Neither Blue nor Green
C: Blue or Yellow
D: Blue or Yellow

Given that out of the 4 people 2 always lie find out the colours on the cards each person.

Ans: A- Yellow
B- Yellow
C- Green
D- Red

35. A 1 k.m. long wire is held by n poles. If one pole is removed, the length of the gap
becomes 12/3m. What is the number of poles initially?

Ans:6km

36. Find the digits X,Y,Z


XXXX
YYYY+
ZZZZ
--------------
YXXXZ
----------------
Ans: X Y Z
918

37. A man starts walking at 3 pm . ha walks at a speed of 4 km/hr on level ground and at a
speed of 3 km/hr on uphill , 6 km/hr downhill and then 4 km/hr on level ground to reach
home at 9 pm. What is the distance covered on one way?

Ans: 12 km

38. A grandma has many sons; each son has as many sons as his brothers. What is her age
if it?s the product of the no: of her sons and grandsons plus no: of her sons?(age b/w 70
and 100).

Ans: 81

39. An electric wire runs for 1 km b/w some no: of poles. If one pole is removed the
distance b/w each pole increases by 1 2/6 (mixed fraction). How many poles were there
initially?

40. There is a church tower 150 feet tall and another catholic tower at a distance of 350 feet
from it which is 200 feet tall. There is one each bird sitting on top of both the towers. They
fly at a constant speed and time to reach a grain in b/w the towers at the same time. At
what distance from the church is the grain?

Ans: 90

41. A person wants to meet a lawyer and as that lawyer is busy he asks him to come three
days after the before day of the day after tomorrow? on which day the lawyer asks the
person to come?

ans: thursday
42. A person is 80 years old in 490 and only 70 years old in 500 in which year is he born?

ans: 470

43.A person says that their speed while going to a city was 10mph however while returning
as there is no much traffic they came with a speed of 15mph. what is their average speed?
ans: 12mph

45. There is a peculiar island where a man always tells truth and a women never says two 2
consecutive truth or false statements that is if she says truth statement then she says false
statement next and vice versa. A boy and girl also goes in the same way. one day i asked a
child " what r u a boy or a girl" however the child replied in their language that i dint
understand but the parents knew my language and one parent replied that " kibi is a boy"
the other one said that "no kibi is a girl, kibi lied".
a: is kibi a boy or a girl
b: who ansered first mother or father?

ans: kibi is a girl and mother answered first.

46. The boy goes to school reaches railway station at his 1/3 of his journey& mill at 1/4 of
his journey the time taken him to walk between railway station & mill is 5 mins. Also he
reaches railway station at 7.35amwhen he started from house& when he reaches school?

Ans: 7:15to8.15

47. if a person is sitting in a exam having 30 questions (objective type) the examiner use
the formula to calculate the score is S=30+4c-w here c is number of correct answer and w
is number of wrong answer , the examiner find the score is more than 80, tell how may
questions are correct ? if the score is little less but still more than 80 then u wont be able to
answer.

ans :- 16

48. if a person having 1000 rs and he want to distribute this to his five children in the
manner that ecah son having 20 rs more than the younger one , what will be the share of
youngest child 
ans- 160

49.raju having some coins want to distribute to his 5 son , 5 daughter and driver in a
manner that , he gave fist coin to driver and 1/5 of remaining to first son he again gave one
to driver and 1/5 to 2nd son and so on.... at last he equally distributed all the coins to 5
daughters. how many coins raju initially have???

ans:-881

50. if ravi binded his book and the binder cut the pages of the book , ravi decided to mark
the pages by himself own , what he found that number of three appears 61 times find of
number of pages answer

ans - 300

51. a painter went in a exhibition to purchases some pictures where T,U,V,W,X,Y,Z pictures
were remaining , he want to buy only five in the condition on that if T is there then X should
not be there, if U is there than y should be there if if v is there then X should be there

which is the combination the painter can have


(a) T,U,V,W,Y
(b)T,Z,U,W,X
(c)T,X,U,V,W
(d)T,U,Y,W,Z

ans (d)

52.There are 100 men in town. Out of which 85% were married, 70% have a phone, 75%
own a car, 80% own
a house. What is the maximum number of people who are married, own a phone, own a car
and own a house ? ( 3 marks)

Sol: 15%

53. There are 10 Red, 10 Blue, 10 Green, 10 Yellow, 10 White balls in a bag. If you are
blindfolded and asked to pick up the balls from the bag, what is the minimum number of
balls required to get a pair of atleast one colour ? ( 2 Marks)

Sol :6 balls.

54. Triplet who usually wear same kind and size of shoes, namely, Annie, Danny, Fanny.
Once one of them broke a glass in kitchen and their shoe prints were there on floor of
kitchen. When their mother asked who broke Annie said, ?I didn?t do it?; Fanny said ?Danny
did it?; Danny said ?Fanny is lieing?; here two of them are lieing, one is speaking truth. Can
you find out who broke it ? (3 Marks)

Sol : Annie

PAPER: HCL Placement Paper (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
murderer. as q is not murderer, he is telling 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)

3) 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 abilities.
e) Statistics sometimes present a wrong picture of things

4) 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:
ABCDE
X4
EDCBA

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

Six knights - P,Q,R,S,T and U - assemble for a long journey in two traveling parties. For
security, each travelingparty 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 theknights can, if they wish,
rearrange their traveling parties before continuing, again in two parties along
separatenorthern 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 travel in the same party with S Q can't travel by the southern route U can't
change routes

11) 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
12) If each of the two parties of knights consists of exactly three members, which of the
following is not a possible traveling 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

13) If one of the two parties of knights consists 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
Ans: c

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

15) If, when the two parties of knights encounter one another after a month, exactly one
knight changes from one traveling party to the other traveling party, that knight must be
a) P
b) Q
c) R
d) S
e) T

Ans: e

Paper : HCL Campus Selection Placement Paper Pattern( Aptitude, C, Puzzle etc)

Aptitude Questions

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 1 MB memory, the number of address lines required,


(a)11
(b)16
(c)22
(d) 24
Ans. (b)

4. Semaphore is used for


(a) synchronization
(b) dead-lock avoidance
(c) box
(d) none
Ans. (a)

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

6.Preproconia.. does not do which one of the following


(a) macro
(b) conditional complication
(c) in type checking
(d) including load file
Ans. (c)

7. Piggy backing is a technique for


a) Flow control
b) Sequence
c) Acknowledgement
d) retransmission
Ans. (c)

8. Given the following statement


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
Ans (e)

9. Find the output for the following C program


i=20,k=0;
for(j=1;j9 && Y++!=10 && Y++>10)
{printf("%d", Y);
else
printf("%d", Y);
}

Ans. 13

12. Find the output for the following C program


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

Ans. (a)

13. What is the sizeof(long int)


(a) 4 bytes
(b) 2 bytes
(c) compiler dependent
(d) 8 bytes
Ans: (a) or (c)

14. a=2, b=3, c=6


Find the value of c/(a+b)-(a+b)/c
Ans : 0.3 or 3/10

15.. What does the hexanumber E78 in radix 7.


(a) 12455
(b) 14153
(c) 14256
(d) 13541
(e) 131112
Ans. (d)

16.. 10 : 4 seconds :: ? : 6 minutes


Ans. 900

17.. 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 18 - 22 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
18. 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)

19. If B occurs which must occur


(a) D
(b) D and G
(c) G and H
(d) F and G
(e) J
Ans. (a)

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

21. 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)
22. E occurs which one cannot occurs
(a) A
(b) F
(c) D
(d) C
(e) J
Ans. (b)

23.A man fixed an appointment to meet the manager, Manager asked him to come two
days after the day before the day after tomorrow. Today is Friday. When will the manager
expect him? (repeated from previous papers)
Ans: Monday
[Don't confuse it with Tuesday. the correct answer is Monday]
24.A man said he spent 1/6 of his as a child, 1/12 as salesman in a liquor shop, 1/7 and 5
years as a politician and a good husband respectively. At that time Jim was born. Jim was
elected as Alderman four years back. when he was half of his age. What is his age?
(repeated from previous papers)
Ans: 84 years
[Assume that he lived x years.
X/6 + x/12 + x/7 + 5 + 4 + x/2 = x. Solving x= 84, Same as Question in Shakundala Devi
book]

25.Jack,Doug and Ann, 3 children had a running race while returning from school.Mom
asked who won the race. Then Jack replied" I wont tell you I will give u clue, When Ann
takes 28 steps Doug takes 24 steps, meantime
I take 21 steps. Jack explained that his 6 steps equals Droug's 7 steps and Ann's 8 steps.
Who won the race? (repeated from previous papers)
Ans: Doug

[ Ann steps = 8,16,24,28 --- finished by 3 & half full steps


Doug steps=7,14,21,24 --- finished before 3 & half full steps
Jack steps= 6,12,18,21 --- finished by 3 & half full steps
So Doug won the race ]

26. Every day a cyclist meets a car at the station. The road is straight and both are
traveling in the same direction. The cyclist travels with a speed of 12 mph.One day the
cyclist comes late by 20 min. and meets the car 5miles before the Station. What is the
speed of the car?
Ans: 60 mph
[Very similar to Shakuntala Devi puzzles to puzzle you problem no: 38 ]
27.A lady goes for shopping. She bought some shoestrings. 4 times the number of
shoestrings, she bought pins and 8 times, handkerchiefs. She paid each item with their
count as each piece's cost. She totally spent Rs. 3.24.How many handkerchiefs did she buy?
(repeated from previous papers)

28. Complete the series :


a) 3,6,13,26,33,66,____(repeated from previous papers)
b) 364,361,19,16,4,1,___( " " " )
Ans : a) 63
          b) 1

29. Lucia is a wonderful grandmother. Her age is between 50 and 70.Each of her sons have
as many sons as they have brothers. Their combined number gives Lucia?s age. What is the
age?
Ans: 64

30.There are two towers A and B. Their heights are 200ft and 150ft respectively and the
foot of the towers are 250ft apart. Two birds on top of each tower fly down with the same
speed and meet at the same instant on the ground to pick a grain. What is the distance
between the foot of tower A and the grain?
Ans:90ft

31. Grass in lawn grows equally thick and in a uniform rate. It takes 40 days for 40 cows
and 60 days for 30 cows to eat the whole of the grass. How many days does it take for 20
cows to do the same?
Ans: 120
32. Four tourists A,B,C,D and four languages English, German, French and Italian. They are
not able to converse among themselves in one language. Though A does not know English
he can act as an interpreter between B and C. No one spoke both French and German. A
knows German and was able to converse with D
who doesn't know a word in German. Only one language was spoken by more than two
persons. Each spoke two languages. Find who spoke what.
Ans : A- German, Italian
B- French, Italian
c- German, English
D- Italian, English

33. There is a five digit number. It has two prime digits (1 is not a prime number). Third
digit is the highest. Second digit is the lowest. First digit is one less
than the third digit. The fifth digit is half of the fourth. The sum of 4th and 5th is less than
the first. Find the number.
Ans ? 71842

34. Four persons A, B, C and D are playing cards. Each person has one card, laid down on
the table below him, which has two different colors on either side.
No card has the same color on both sides. The colors visible on the table are Red, Green,
Red and Blue respectively. They see the color on the reverse side and give the following
comment.
A: Yellow or Green
B: Neither Blue nor Green
C: Blue or Yellow
D: Blue or Yellow

Given that out of the 4 people 2 always lie find out the colours on the cards each person.
Ans: A- Yellow
         B- Yellow
         C- Green
         D- Red

35. A 1 k.m. long wire is held by n poles. If one pole is removed, the length of the gap
becomes 12/3m. What is the number of poles initially?
Ans:6km

36. Find the digits X,Y,Z


XXXX
YYYY+
ZZZZ
--------------
YXXXZ
----------------
Ans: X Y Z
918

37. A man starts walking at 3 pm . ha walks at a speed of 4 km/hr on level ground and at a
speed of 3 km/hr on uphill , 6 km/hr downhill and then 4 km/hr on level ground to reach
home at 9 pm. What is the distance covered on one way?
Ans: 12 km

38. A grandma has many sons; each son has as many sons as his brothers. What is her age
if it's the product of the no: of her sons and grandsons plus no: of her sons? (age b/w 70
and 100).
Ans: 81

39. An electric wire runs for 1 km b/w some no: of poles. If one pole is removed the
distance b/w each pole increases by 1 2/6 (mixed fraction). How many poles were there
initially?
40. There is a church tower 150 feet tall and another catholic tower at a distance of 350
feet from it which is 200 feet tall. There is one each bird sitting on top of both the towers.
They fly at a constant speed and time to reach a grain in b/w the towers at the same time.
At what distance from the church is the grain?
Ans: 90

41. A person wants to meet a lawyer and as that lawyer is busy he asks him to come three
days after the before day of the day after tomorrow? on which day the lawyer asks the
person to come?
Ans: thursday

42. A person is 80 years old in 490 and only 70 years old in 500 in which year is he born?
Ans: 470

43.A person says that their speed while going to a city was 10mph however while returning
as there is no much traffic they came with a speed of 15mph. what is their average speed?
Ans: 12mph

45. There is a peculiar island where a man always tells truth and a women never says two 2
consecutive truth or false statements that is if she says truth statement then she says false
statement next and vice versa. A boy and girl also goes in the same way. one day i asked a
child " what r u a boy or a girl" however the child replied in their language that i dint
understand but the parents knew my language and one parent replied that " kibi is a boy"
the other one said that "no kibi is a girl, kibi lied".
a: is kibi a boy or a girl
b: who answered first mother or father?

Ans:  kibi is a girl and mother answered first.

46. The boy goes to school reaches railway station at his 1/3 of his journey& mill at 1/4 of
his journey the time taken him to walk between railway station & mill is 5 mins. Also he
reaches railway station at 7.35amwhen he started from house& when he reaches school?

Ans: 7:15to8.15

47. If a person is sitting in a exam having 30 questions (objective type) the examiner use
the formula to calculate the score is S=30+4c-w here c is number
of correct answer and w is number of wrong answer , the examiner find the score is more
than 80, tell how may questions are correct ? if the score is little less but still more than 80
then u wont be able to answer.
Ans :- 16

48. If a person having 1000 Rs and he want to distribute this to his five children in the
manner that each son having 20 Rs more than the younger one , what will be the share of
youngest child
Ans- 160

49.Raju having some coins want to distribute to his 5 son , 5 daughter and driver in a
manner that , he gave fist coin to driver and 1/5 of remaining to first son he again gave one
to driver and 1/5 to 2nd son and so on.... at last he equally distributed all the coins to 5
daughters. how many coins raju initially have???
Ans:-881

50. if ravi binded his book and the binder cut the pages of the book , ravi decided to mark
the pages by himself own , what he found that number of three appears 61 times find of
number of pages answer
Ans - 300

51. a painter went in a exhibition to purchases some pictures where T,U,V,W,X,Y,Z pictures
were remaining , he want to buy only five in the condition on that
if T is there then X should not be there,
if U is there than y should be there
if if v is there then X should be there

which is the combination the painter can have


(a) T,U,V,W,Y
(b)T,Z,U,W,X
(c)T,X,U,V,W
(d)T,U,Y,W,Z
Ans (d)

52.There are 100 men in town. Out of which 85% were married, 70% have a phone, 75%
own a car, 80% own a house. What is the maximum number of people who are married,
own a phone, own a car and own a house ? ( 3 marks)
Sol: 15%

53. There are 10 Red, 10 Blue, 10 Green, 10 Yellow, 10 White balls in a bag. If you are
blindfolded and asked to pick up the balls from the bag, what is the minimum number of
balls required to get a pair of at least one colour ? ( 2 Marks)
Sol :6 balls.

54. Triplet who usually wear same kind and size of shoes, namely, Annie, Danny, Fanny.
Once one of them broke a glass in kitchen and their shoe prints were there on floor of
kitchen. When their mother asked who broke Annie said, ?I didn't do it?; Fanny said ?Danny
did it?; Danny said ?Fanny is lying?; here two of them are lieing, one is speaking truth. Can
you find out who broke it ? (3 Marks)
Sol : Annie

55. 4 players were playing a card game. Cards had different colours on both sides. Neither
of cards had same colour on both sides. Colors were 2 Red, 2 Blue, 2 Green, 2 Yellow. Cards
were lying in front of each player. Now, each player knew the colour on other side of his
card. They are required to tell their colour. Statement given by each of them was :
Annie : Blue or Green
Bobby : Neither Blue nor Green
Cindy : Blue or Yellow
Danny : Blue or Yellow
colors of cards that are visible to all were Red, Blue, Green, Blue in order of their names.
Exactly two of them are telling truth and exactly two of them are lieing. Can you tell the
colour on other face of card for each player ? (6 Marks)
Sol : Annie : Yellow (Lying)
Bobby : Yellow (Telling truth)
Cindy : Blue (Telling truth)
Danny : Green (Lieing)

56. In a game i won 12 games, each game if i loose i will give u one chocolate, You have 8
chocolates how many games played.
Ans : 32

57. 75 persons Major in physics, 83 major in chemistry, 10 not at major in these subjects u
want to find number of students majoring in both subjects
Ans 68.

58. if A wins in a race against B by 10 mts in a 100 Meter race. If B is behind of A by 10


mts. Then they start running race, who will won?
Ans .A

59. A+B+C+D=D+E+F+G=G+H+I=17
given A=4.Find value of G and H?
Ans : G = 5 E=1

60. One guy has Rs. 100/- in hand. He has to buy 100 balls. One football costs Rs. 15/, One
Cricket ball costs Re. 1/- and one table tennis ball costs Rs. 0.25 He spend the whole Rs.
100/- to buy the balls. How many of each balls he bought?
Ans :F=3,T=56,C=41

61. The distance between Station Atena and Station Barcena is 90 miles. A train starts from
Atena towards Barcena. A bird starts at the same time from Barcena straight towards the
moving train. On reaching the train, it instantaneously turns back and returns to Barcena.
The bird makes these journeys from Barcena to
the train and back to Barcena continuously till the train reaches Barcena. The bird finally
returns to Barcena and rests. Calculate the total distance in miles the bird travels in the
following two cases:
(a) The bird flies at 90 miles per hour and the speed of the train is 60 miles per hour.
(b) the bird flies at 60 miles per hour and the speed of the train is 90 miles per hour
Ans: time of train=1hr.so dist of bird=60*1=60miles

62. A tennis championship is played on a knock-out basis, i.e., a player is out of the
tournament when he loses a match.
(a) How many players participate in the tournament if 15 matches are totally played?
(b) How many matches are played in the tournament if 50 players totally participate?
Ans: (a)16
         (b)49

63.When I add 4 times my age 4 years from now to 5 times my age 5 years from now, I get
10 times my current age. How old will I be 3 years from now?
Ans: Age=41 years.

64.A rich merchant had collected many gold coins. He did not want anybody to know about
them. One day, his wife asked, "How many gold coins do we have?" After pausing a
moment, he replied, "Well! If I divide the coins into two unequal numbers, then 37 times the
difference between the two numbers equals the difference between the squares of the two
numbers." The wife looked puzzled. Can you help the merchant's wife by finding out how
many gold R
Ans:37
66. A set of football matches is to be organized in a "round-robin" fashion, i.e., every
participating team plays a match against every other team once and only once. If 21
matches are totally played, how many teams participated?
Ans :7

66. Glenn and Jason each have a collection of cricket balls. Glenn said that if Jason would
give him 2 of his balls they would have an equal number; but, if Glenn would give Jason 2 of
his balls, Jason would have 2 times as many balls as Glenn. How many balls does Jason
have?
Ans: 14

67. Suppose 8 monkeys take 8 minutes to eat 8 bananas.


a) How many minutes would it take 3 monkeys to eat 3 bananas?
(b) How many monkeys would it take to eat 48 bananas in 48 minutes

Ans: a)48
         B)6

68. It was vacation time, and so I decided to visit my cousin's home. What a grand time we
had! In the mornings, we both would go for a jog. The evenings were spent on the tennis
court. Tiring as these activities were, we could manage only one per day, i.e., either we
went for a jog or played tennis each day. There were days when we felt lazy and stayed
home all day long. Now, there were 12 mornings when we did nothing, 18 evenings when
we stayed at home, and a total of 14 days when we jogged or played tennis. For how many
days did I stay at my cousin's place?
Ans : 22 days

69 A 31" x 31" square metal plate needs to be fixed by a carpenter on to a wooden board.
The carpenter uses nails all along the edges of the square such that there are 32 nails on
each side of the square. Each nail is at the same distance from the neighboring nails. How
many nails does the carpenter use?
Ans :124

70. Given that A,B,C,D,E each represent one of the digits between 1 and 9 and that the
following multiplication holds:
ABCDE
X4
--------------
EDCBA
-------------- what digit does E represent ?
a) 4
b) 6
c) 8
d) 7
Ans: c
71. (16)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
72.(18)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

73.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
74.. 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

Ans : d) compilation error

75. 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
Ans :c)

76. 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
Ans : a) 10,6

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

Ans: b) Prints : Jan..

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

Ans: d) NULL
.
79.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
Ans : a) 8

80.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
Ans:b)20,12
81. 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
Ans : c)

82. 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
Ans: c)x/y=2

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

84. output of the following.


main()
{
int i;
char *p;
i=0X89;
p=(char *)i;
p++;
printf("%x\n",p);
}
Ans:0X8A
85. which of the following is not a ANSI C language keyword? 
Ans: Function.

86. 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
Ans: a)

87. 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
Ans : d)float

88. What is the value of the expression (3^6) + (a^a)?


a) 3 b) 5 c) 6 d) a+18 e) None
Ans : 5
89. 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: c)
Questions 90-94
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.

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

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

92.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
93.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

94. if, when the two parties of knights encounter one another after a month, exactly one
knight changes from one travelling party to the other traveling party, that knight must be
a) P
b) Q
c) R
d) S
e) T
Ans: e
95. How many of the integers between 25 and 45 are even ?
(A)21 (B)20 (C)11 (D)10 (E)9
Ans:d)10

96. 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
97. 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)

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

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

100.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%

101.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%
Ans :c) 50%

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

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

104.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
105.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%

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

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

 
 
Model Papers
ENGLISH COMPREHENSION
In the following question select the word which is OPPOSITE in the
meaning of the given word.

Q1. INDISCREET
a. reliable
b. honest
c. prudent
d. stupid

Q2. SOLICITUDE

a. insouciance
b. ingenuity
c. propriety
d. austerity

Q3. In the sentence there is a bold word or phrase. One of the words or
phrases given in the options conveys almost the same meaning as the bold
word or phrase in the sentence. Select that option which is nearest in
meaning.

It is preposterous on your part to look for a job without first completing your
education.

a. Wise
b. Imperative
c. Advisable
d. Most admirable
e. Very absurd

In the following questiones, fill in the blank space.

Q4. The success that he has gained, though striking enough, does not, however,
commensurate . . . . the efforts made by him.

a. About
b. From
c. With
d. Beside
e. Over

Q5. Vinod took his meals after he . . . .

a. Had completed his work


b. Had been completing his work
c. Was completing his work
d. Had been completed his work
e. Had got completed his work

In the following questions, select the word or phrase that is similar in


meaning to the given word.

Q6. Nonchalance

a. Neutrality
b. Indifference
c. All-knowing
d. Ignorance
e. Untimeliness
Q7. Conceal

a. Hide
b. Seal
c. Ceiling
d. Horrifying

Q8. Read the sentence to find out whether there is any grammatical error
in it. The error, if any, will be in one part of the sentence. The letter of that
part is the answer. If there is no error, the answer is 'D'. (Ignore - the
errors of punctuation,if any)

(A) The whole thing moves/ (B) around the concept of building a small
dynamic/(C) organisation into a larger one./(D) No error.

a. (A)
b. (B)
c. (C )
d. (D)

Q9. In the question a part of the sentence is italicised. Alternatives to the


italicised part is given which may improve the sentence. Choose the
correct alternative. In case no improvement is needed. Option 'D' is the
answer.

She gave most of her time to music.

a. spent
b. lent
c. devoted 
d. No improvement

Q10. The given sentences when properly sequenced, form a coherent


paragraph. Each sentence is labelled with a number. Choose the most
logical order of sentences from among the four given choices to construct
a coherent paragraph.

1. He was so busy with them that he did not get time to eat. 2. Thousands of
people came to him and asked different types of questions. 3. No one cared to see
that he had his food or rest that night. 4. Swami Vivekanand once stayed in a
small village. 

a. 2341
b. 3214
c. 4213
d. 4231

Answer the question based on the given passage

Management is a set of processes that can keep a complicated system of people


and technology running smoothly. The most important aspects of management
include planning, budgeting, organising, staffing, controlling, and problem-solving.
Leadership is a set of processes that creates organisations in the first place or
adapts them to significantly changing circumstances. Leadership defines what the
future should look like, aligns people with that vision, and inspires them to make it
happen despite the obstacles. This distinction is absolutely crucial for our purposes
here: Successful transformation is 70 to 90 per cent leadership and only 10 to 30
percent management. Yet for historical reasons, many organisations today don't
have much leadership. And almost everyone thinks about the problem here as one
of managing change. For most of this country, as we created thousands and
thousands of large organisations for the first time in human history, we didn't have
enough good managers to keep all those bureaucracies functioning. So many
companies and universities developed management programs and hundreds and
thousands of people were encouraged to learn management on the job. And they
did. But, people were taught little about leadership. To some degree, management
was emphasised because it's easier to teach than leadership. But even more so,
management was the main item on the twentieth-century agenda because that's
what was needed. For every entrepreneur or business builder who was a leader,
we needed hundreds of managers to run their ever-growing enterprises.
Unfortunately for us today, this emphasis on management has often been
institutionalised in corporate cultures that discourage employees from learning how
to lead. Ironically, past success is usually the key ingredient in producing this
outcome. The syndrome, as I have observed it on many occasions, goes like this:
success creates some degree of marked dominance which in turn produces much
growth. After a while keeping the ever-larger organisation under control becomes
the primary challenge. So attention turns inward and managerial competencies are
nurtured. With a strong emphasis on management but not leadership, bureaucracy
and an inward focus takeover. But with continued success, the result mostly of
market dominance, the problem often goes unaddressed and an unhealthy
arrogance begins to evolve. All of these characteristics then make any
transformation effort much more difficult. Arrogant managers can over-evaluate
their current performance and competitive position, listen poorly and learn slowly.
Inwardly focused employees can have difficulty seeing the very forces that present
threats and opportunities. Bureaucratic cultures can smother those who want to
respond to shifting conditions. And the lack of leadership leaves no force inside
these organisations to break out of the morass.

Q11. Why did companies and universities develop programmes to prepare


managers in such a large number?

a. (A) Companies and universities wanted to generate funds through these


programmes
b. (B) The large number of organisations were created as they needed managers in
good number
c. (C) Organisations did not want to spend their scarce resources in training
managers
d. (D) Organisations wanted to create communication network through trained
managers

Q12. How has the author defined management?

a. It is the process of adapting organisations to changing circumstances.


b. It is the system of aligning people with the direction it has taken.
c. It refers to creating a vision to help direct the change effectively.
d. Creating better performance through customer orientation.

Q13. What is the historical reason for many organisations not having
leadership?

a. A view that leaders are born, they are not made


b. Leaders lack managerial skills and organisations need managers
c. Leaders are weak in carrying out traditional functions of management
d. Leaders allow too much complacency in organisations
Q14. Which of the following characteristics help organisations in their
transformation efforts?

a. Emphasis on leadership but not management


b. A strong and dogmatic culture
c. Bureaucratic and inward looking approach 
d. Failing to acknowledge the value of customers and shareholders

Q15. Which of the following is similar in meaning of the word 'smother' as


used in the passage?

a. Suppress
b. Encourage
c. Instigate
d. Criticise

QUANTITATIVE ABILITY
Q1. In a kilometre race, if A gives B a 40 m start, A wins by 19 s. But if A
gives B a 30 s start, B wins by 40 m. Find the time taken by B to run 5,000
m?

a. 150 s
b. 450 s
c. 750 s
d. 825 s

Q2. Pipe A takes 16 min to fill a tank. Pipes B and C, whose cross-sectional
circumferences are in the ratio 2:3, fill another tank twice as big as the
first. If A has a cross-sectional circumference that is one-third of C, how
long will it take for B and C to fill the second tank? (Assume the rate at
which water flows through a unit cross-sectional area is same for all the
three pipes.)

a. 66/13
b. 40/13
c. 16/13
d. 32/13 

Q3. Three consecutive whole numbers are such that the square of the
middle number is greater than the product of the other two by 1. Find the
middle number.

a. 6
b. 18
c. 12
d. All of these

Q4. The arithmetic mean of 2 numbers is 34 and their geometric mean is


16. One of the numbers will be

a. 4
b. 16
c. 18
d. 12

Q5. If x% of a is the same as y% of b, then z% of b is : 

a. (xy/z)% of a
b. (yz/x)% of a
c. (xz/y)% of a
d. None of these

Q6. The letters of the word WOMAN are written in all possible orders and
these words are written out as in a dictionary ,then the rank of the word
'WOMAN' is 

a. 117
b. 120
c. 118
d. 119

Q7. What least number must be subtracted from 9400 to get a number
exactly divisible by 65?

a. 40
b. 20
c. 80
d. none of these

Q8. If 2505 / 0.5 = 5010 then 25.05 / 0.5 = ?

a. 5.010
b. 50.10
c. 501.0
d. None of these

Q9. Which pair of rational numbers lie between 1/5 and 2/5 -

a. 262/1000, 275/1000
b. 362/1000, 562/1000
c. 451/1000, 552/1000
d. 121/1000,131/1000

Q10. What is the value of the following expression: 2 log10 5 + log10 4 ?

a. 2
b. 2.5
c. 3
d. None of these

Q11. If x increases linearly, how will a-x behave (a>1) ?

a. Increase linearly
b. Decrease linearly
c. Increase exponentially
d. Decrease exponentially

Q12. What is the probability of getting the sum 5 in two throws of the
dice?
a. 1/12                    b. 1/5                  c. 1/9                                       d. None of
these

LOGICAL ABILITY
Q1. The question shows a pair of words in which the first is related to the
second in some way. It is followed by a single word which bears a similar
relation to one of the given alternatives. Find the correct alternative to
complete the analogy.

Melt:Liquid::Freeze: ?

a. Ice
b. Condense
c. Solid
d. Crystal

Q2. Fill in the blankGuilt is to Past as Hope is to ......

a. Present
b. Future
c. Today
d. Despair
e. Hopeless

Q3. From the given choices select the odd man out:

a. Bird
b. Kite
c. Crow
d. Pigeon
e. Sparrow

Q4. Find the missing pattern

BOQD : ERTG :: ANPC : ?

a. DQSF
b. FSHU
c. SHFU
d. DSQF

Q5. Find the missing number

5 : 24 :: 8 : ?

a. 65
b. 63
c. 62
d. 64

Q6. From the given choices select the odd man out

a. DFHEG
b. TWXUV
c. OQSPR
d. JLNKM
Q7. If HARD is coded as 1357 and SOFT is coded as 2468, what will 21448
stand for? 

a. SHAFT
b. SHORT
c. SHOOT
d. SHART

Q8. Find the next number in the series

1, 6, 13, 22, 33, ......

a. 44
b. 45
c. 46
d. 47

Q9. The question contains some statements followed by some conclusions.


Decide which of the given conclusions logically follow from the given
statements, disregarding commonly known facts.

Statements:
I) All tomatoes are red.
II) All grapes are tomatoes.
Conclusions:
I) All grapes are red.
II) Some Tomatoes are grapes.

a. Only conclusion I follows.


b. Only conclusion II follows.
c. Neither I nor II follows
d. Both I and II follow.
e. Either I or II follows

Q9. Old woman's son is my daughter's uncle, then what relation has the
old woman to me ?

a. Sister
b. Mother
c. Grandmother
d. Mother - in - law

Q10. Ramu was facing East.He walked 4 km forward and then after
turning to his right walked 6 km. Again he turned to his right and walked 7
km. After this he turned back.Which direction was he facing at the time?

a. East
b. North
c. South
d. West
e. North-East

Q11. Raman is not wearing purple and Aman is not wearing black.Raman
and Sahil wear different colours.Avinash alone wears green.What is Sahil's
colour, if all four of them are wearing different colours.

a. Green
b. Black
c. Purple
d. Can't Say

Q12. The question is followed by two arguments numbered I and II. You
have to decide which of the arguments is a strong argument and which is
a weak argument. 

Statement :
Should a total ban be put on trapping wild animals?
Arguments :
I. Yes, Trappers are making a lot of money.
II. No, bans on hunting and trapping are not effective.

a. Only argument I is strong.


b. Only argument II is strong.
c. Either I or II is strong.
d. Neither I nor II is strong.
e. Both I and II are strong

Q13. The question contains a statement followed by two Assumptions I


and II. Find out which assumption(s) is implicit.

Statements:
Vitamin E tablets improve circulation, keep your complexion in glowing condition.
Assumptions :
I. People like glowing complexion.
II. Complexion becomes dull in the absence of circulation. 

a. Only assumption I is implicit


b. Only assumption II is implicit
c. Both assumption I and II are implicit.
d. Neither assumption I nor II is implicit

Q14. Study the statement(s) and the conclusions and select the correct
option.

Statement :
No country is absolutely self - dependent these days.
Conclusions :
I. It is imposible to grow and produce all that a country needs.
II. Countrymen in general have become lazy.

a. Only Conclusion I follows


b. Only Conclusion II follows
c. Both the conclusion I and II follow
d. Either conclusion I or II follows
e. Neither conclusion I nor II follows

Q15. In the question a statement is followed by some courses of action . A


course of action is a step or administrative decisions to be taken for
improvement, follow-up, or further action in regard to the problem, policy,
etc.You have to assume everything in the statement to be true and then
decide which of the given suggested course(s) of action logically follows
for pursuing.

Statement:
'The World Bank has approved a $ 300 million loan to finance a project to construct
coal ports by Madras Port Trusts.
Courses of Action :
I. India should take financial help from other international financial institutions to
develop such ports in other places.
II. India should not seek any help from the international financial institutions.

a. Only I follows
b. Only II follows
c. Either I or II follows
d. Neither I nor II follows
e. Both I and II follow.

 
(Optional module)

COMPUTER PROGRAMMING PRINCIPLES AND APPLICATIONS

Q1. A 8-bit signed integer has the following range:

a. 0 to 255
b. -128 to 127
c. -255 to 254
d. 0 to 509

Q2. What will be the output of the following code statements?


integer x = 34.54, y = 20, z = -5
print ( y > 50 AND z > 10 or x > 30 )

a. 0
b. 1
c. -1
d. 10

Q3. Pankaj makes a program to print the product of cubes of the first 10
whole numbers. She writes the following program:
integer x = 0 // statement 1
integer sum = 0 // statement 2
while ( x < 10 ) // statement 3
{
  sum = x*x*x // statement 4
  x = x + 1 // statement 5
}   
print sum // statement 6

Is her program correct? If not, which statement will you modify to correct it?
a. No error, the program is correct.
b. Statement 1
c. Statement 4
d. statement 6

Q4. I have a problem to solve which takes as input a number n. The


problem has a property that given the solution for (n-1), I can easily solve
the problem for n. Which programming technique will I use to solve such a
problem?
a. Iteration
b. Decision-making
c. Object Oriented Programming
d. Recursion

Q5. Given:

integer x = 40, y = 35, z = 20, w = 10

Comment about the output of the following two statements:


print x * y / z - w
print x * y / (z - w)

a. Differ by 80
b. Same
c. Differ by 50
d. Differ by 160

Q6. Data and function in which area of a class are directly accessible
outside the class?
a. Public
b. Private
c. Protected
d. None of these

Q7. Here is an infix notation: ((A+B)*C-(D-E))^(F+G) Choose the correct


postfix notation of the above from the given options. 
a. AB+CD*E--FG+^
b. AB+C*DE--FG+^
c. AB+C*DE-FG-+^
d. A+BC*DE-FG-+^

Q8. If the depth of a tree is 3 levels, then what is the size of the Tree?

a. 2
b. 4
c. 6
d. 8

Q9. One of the following options is a form of access used to add and
remove nodes from a queue.

a. LIFO
b. FIFO
c. Both LIFO and FIFO
d. None of these

Q10. What is the time complexity of adding three matrices of size NXN
cell-by-cell?

a. O(N)
b. O(N^2)
c. O(N^3)
d. None of these
Section-I

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) In signed magnitude notation what is the minimum value that


can be represented with 8 bits
a) -128 b) -255 c) -127 d) 0

5) c 20

6) a 120

7) b synchronise the access

8) a system call

9) b the operating system

10) a 177333

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

12) b has to be unique in the sub network

13) 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 employee no. from employee A , where exists from employee B where
A employee no. >= B employee having (count(*) mod n)=0
b) Select employee no. from employee A, employee B where A employee no.>=B
employee no. grouply employee no. having(count(*) mod n=0 )
c) Both a& b
d) None of the above

14)Q. type duplicates of a row in a table customer with non uniform key feild
customer no. you can see
a) delete from costomer where customer no. exists ( select distinct customer no.
from customer having count )
b) Delete customer a where customer no. in b rowid
c) Delete customer a where custermor no. in ( select customer no. from customer
a, customer b )
d) None of the above

15) C Volatile modifier

Section I over with 15 quetions


Section-II

Section II is not covered completly But it is easy


1) Ans: recursion
2) Long int size
a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
Ans: Compiler dependent
Note: order of a,b,c,d are doubt but answer is correct.

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

4) if(x>2)?3:4
-
7) Ans: C 6 ( quetion on enum )
--
--
-
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
--
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).

9. what does the hexanumber E78 in radix 7.


(a) 12455 (b) 14153 (c) 14256 (d) 13541 (e) 131112

Ans: (d)

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

(from GRE book page no:411)


data:
A causes B or C, but not both
F occurs only if B occurs
D occurs if B or C occurs
E occurs only if C occurs
J occurs only if E or F occurs
D causes G,H or both
H occurs if E occurs
G occurs if F occurs

Note: Check following answers.

11. If A occurs which of the following must occurs

I. F & G
II. E and H
III. D
(a) I only (b) II only (c) III only (d) I,II, & III
(e) I & II (or) II & III but not both

Ans: (e)

12. If B occurs which must occur


(a) D (b) D and G (c) G and H (d) F and G (e) J

Ans: (a)

13. If J occurs which must have occured


a) E (b) either B or C (c) both E & F (d) B (e) both B & C

Ans: (b)

14. which may occurs as a result of cause 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)

15. E occurs which one cannot occurs


(a) A (b) F (c) D (d) C (e) J
Ans: (b)

11 to 15: ----------- e , a , b , c , b ---------------

Below are in order:


16. to 20. answers:
e
a
c
a

 Placement Paper For  HCL | Oct 2007 ( Campus Recruitment) 


Directions (Q. 1-5): In each of the following number series one of the given numbers is
wrong. Find out the wrong number.
1. 8 34 207 1661 16617 199417
1) 8
2) 34
3) 207
4) 1661
5) None of these

2. 7 75 395 2379 11879 47541


1) 7
2) 75
3) 395
4) 2379
5) None of these

3. 420 70 75 300 197 148.5


1) 70
2) 75
3) 300
4) 197
5) None of these

4. 9 21 51 155 540 2163


1) 9
2) 21
3) 51
4) 2163
5) None of these

5. 22 37 59 97 155 251


1) 37
2) 59
3) 97
4) 155
5) None of these

6. An angry Arjun carried some arrows for fighting with Bheeshm. With half the
arrows, he cut down the arrows thrown by Bheeshm on him and with six other
arrows he killed the Chariot driver of Bheeshm. With one arrow each he knocked
down respectively the Chariot, the flag and the bow of Bheeshm. Finally, with one
more than four times the square root of arrows he laid Bheeshm unconscious on
an arrow bed. Find the total number of arrows Arjun had.
1) 100
2) 121
3) 144
4) 169
5) None of these

Directions (Q. 7-11): Study the following information carefully and answer the questions
given below:
Total population of a village is 64000. Out of this 65% is literate. 60% of the total
population is male. Out of the total illiterate population, males and female are in the ratio
3:4
7. What is the ratio of illiterate females to literate ones?
1) 1:1
2) 1:2
3) 4:7
4) Data inadequate
5) None of these

8. Among the males what is the ratio of literate ones to illiterate ones?
1) 3:1
2) 1:3
3) 9:4
4) Data inadequate
5) None of these

9. What is the ratio of literate males to literate females?


1) 4:9
2) 9:4
3) 9:13
4) Data inadequate
5) None of these

10. What is the total number of illiterate males?


1) 6400
2) 12800
3) 9600
4) 3200
5) None of these

11. What is the total number of literate females?


1) 6400
2) 12800
3) 9600
4) 3200
5) None of these 

Directions (Q.12-16): Study the following table and answer the questions given below:
Following table shows the rural population and the percentage of total population living in
the rural areas of the country X.
Cences              Population(in million)         Percentage
1901                        213                                89.2
1911                        246                                89.7            
1921                        223                                88.8
1931                        246                                88.0
1941                        275                                86.1
1951                        299                                82.7
1961                        360                                82.0
1971                        439                                80.1
1981                        524                                76.7
1991                        629                                74.2
2001                        743                                72.3
12. Approximately what was the urban population of country X in the census year
1981?1) 109 million
2) 129 million
3) 159 million
4) 218 million
5) 155 million

13. In which of the following census years was the population of the urban area 79
million?
1) 1951
2) 1961
3) 1971
4) 1981
5) 1991

14. Approximately what was total population of the country X in the census year
2001?
1) 1050 million
2) 1129 million
3) 1000 million
4) 743 million
5) 1029 million

15. The total population of the country X was approximately how much more in the
census year 1931 with respect to the same in the census year 1921?
1) 23 million
2) 29 million
3) 25 million
4) 32 million
5) 34 million

16. The population of urban area in the census year 1941 was approximately what
percent of the same in the census year 1951?
1) 55%
2) 60%
3) 62%
4) 65%
5) 70%

Passage(Questions From 17-21):


A spate of soul-searching is guaranteed by two major anniversaries that loom this year: the
abolition of the slave trade in the British empire in 1807, and the Act of Union of England
and Scotland in 1707. Both will feed into Britain's nagging sense of self-doubt: who are we?
As the debates around integrated and multi-culturalism show no sign of flagging, both
anniversaries will be mind for their contemporary relevance.
Television programmes, books, ceremonies, conferences, and newspaper supplements have
been in the planning for months.
Some might regard this self-referentialism as tedious; they might advocate an apology for
the slave trade and let's be done with 2007's anniversaries. But our reckoning with British
history has been so limited that these two anniversaries provide us with a good opportunity
for an overdue reality check.

Any chance of reinventing a plausible national identity now (as many are keen to do) is only
possible if we develop a much better understanding of how our nation behaved in the past
and how nationalisms (English, Scottish, and British) were elaborately created over the past
few hundred years — and how incomplete and fragile that process always was.
The coincidence of these two anniversaries is fortuitous. The abolition of the slave trade is a
painful reminder of British imperial history, which we have, incredible, managed to largely
forget. Who remembers the Bengal famine or Hola camp, the empire's opium trade with
China or our invention of concentration camps in the Boer war? We too easily overlook how
empire was a linchpin to British national identity, vital to welding Scotland and England
together. Indeed, historian Linda Colley suggests three ingredients for British identity:
“Great Britain is an invented nation that was not founded on the suppression of older
loyalties so much as superimposed on them, and that was heavily dependent for its raison
d'etre on a broadly Protestant culture, on the treat and tonic of recurrent war, especially war
with France, and on the triumphs, profits and Otherness represented by a massive overseas
empire.”

These three props for Britishness have collapsed: Protestant Christianity has declined
sharply, war with France is the pastime only of a few drunken football fans, and the empire
is no more. No wonder Britishness is no the decline; over the past couple of decades, people
have become increasingly likely to define themselves in polls as English or Scottish rather
than British.

This is the social trend in defining identity that politicians such as Gordon Brown watch
closely. Could this re-emergence of the older loyalties to which Ms Colley refers have
political consequences? Could the Scottish National Party translate that into significant
electoral gains in the Scottish elections only a few days after the official commemoration of
the Act of Union in May?

It's not just the Scots who could decide they've had enough of the English — the feeling
could become mutual. The grumbles are getting louder about Scottish MPs who vote on
legislation affecting the English and the disproportionate amount of public spending
swallowed up by the Scots.

Mr Brown clearly has a vested interest in stilling such complaints. He's been at the forefront
of an establishment attempt to redefine Britishness on the grounds of “common values”
such as fair play and tolerance.

Who is going to define Englishness? Julian Baggini has a stab at it in a book to be published
in March, Welcome to Every town: A Journey into the English Mind. He spent six months
living in Rotherham to get beyond the metropolitan, liberal elite's perceptions of Englishness
and establish what most people (that is, the white working class) understand by their
Englishness.
Parochial, tightly knit, focused on family and local communities; nostalgic, fearful of the
future and insecure; a dogged belief in common sense: these are his conclusions. Mr Baggini
confesses to feeling that his six months in Rotherham was like visiting a foreign country,
and no doubt many of the people he met would regard six months in London as profoundly
alienating. How do you weld national identities out of global metropolises disconnected from
hinterland? Englishness is riven with huge regional and class divides. The stakes are high —
for example, a rising British National Party vote, a fear of asylum, and hostility to Islam. The
anniversary of the Act of union will provide a stage for all this to be played out. It's just as
painful a commemoration for the English as for the Scottish. It required one nation to lose
its sovereignty and the other its identity.

17. According to the passage, the two major anniversaries will


1) give an impetus to the questioning of British national identity.
2) set the Britons thinking who they really are.
3) be just another occasion to raise the issue of British national identity.
4) be just another occasion to give rise to a debate on multiculturalism.
5) not be celebrated because of the shame attached with slave trade.

18. According to Linda Colley, Great Britain owes its nation-state concept to


1) ceding of its territory by Scotland to England.
2) a shared relation of race, religion and economy.
3) what can today be seen as a concept of free trade area.
4) the perpetuation of slave trade.
5) commonality of interest between its constituents.

19. Going by the passage, which of the following may instill a sense of national
identity among the Britons?
1) The return of Catholics to the Protestant fold
2) Britain going to war with Germany
3) Britain going to war as an Allied force
4) Regular football matches between British and French clubs
5) Any of the above

20. According to the facts stated in the passage, if England and Scotland decide to
split,
1) it is the former that stands to gain.
2) it is the latter that stands to gain.
3) it will be a win-win situation.
4) it will be a lose-lose situation.
5) both the parties will lose their face but gain materially

21. According to the passage, the post-modern mind views imperialism as


1) something that was necessary in the context of the times.
2) a thing of the past which need not be mentioned further.
3) a blot on the history of mankind.
4) the white man's burden.
5) a concept relevant even in the present times, given the inability of the developing
countries to catch up with the West.

22. Oranges are bought at 7 for Rs.3. At what rate per hundred must they be sold
to gain 33%?
(1) Rs.56
(2) Rs.60
(3) Rs.58
(4) Rs.57
23.The cost price of 36 books is equal to the selling price of 30 books. The gain is :
(1) 20%
(2) 16%
(3) 18%
(4) 82%

24.A person sells two machines at Rs.396 each. On one he gains 10% and on the
other he loses 10% .His profit or loss in the whole transaction is :
(1) No gain, no loss
(2) 1% loss
(3) 1% profit
(4) 8% profit
25.A trader bought 10kg of apples for Rs.405 out of which 1kg of apples were
found to be rotten. If he wishes to make a profit of 10%, at what rate should he
sell the remaining apples per kg?
(1) Rs.45
(2) Rs.49.50
(3) Rs.50
(4) Rs. 51
ANSWERS:   1. (5) 2. (2)   3. (4)   4. (1)   5. (3)   6. (1)   7. (1)   8. (1)   9. (2)   10.
(3)    11. (2)   12.(3)   13. (2) 14. (5)   15. (2)   16. (5)   17. (1)   18. (5)   19. (2)  
20. (1)   21. (3)    22.(4)   23.(1)  24(2)   25(2)

HCL Technology Latest Placement Paper | 12th


January 2010
Directions (1-7): Study the following arrangement and answer the questions given below: 
R4TM7W%J95I#1PB2TA3D$6ENF8UH@
1.) How many such vowels are there in the above arrangement, each of which is
immediately preceded by a number and not immediately followed by a consonant?
1) None
2) One
3) Two
4) Three
5) Four

2.) What should come in place of the question mark (?) in the following series
based on the above arrangement?
TM% 951 B23 ?
1) $EF
2) $6F
3) D$N
4) $E8
5) None of these

3.) How many such consonants are there in the above arrangement, each of which
is neither preceded by a number nor followed by a consonants?
1) None
2) One
3) Two
4) Three
5) More than three

4.) Four of the following five are alike in a certain way based on their positions in
the above arrangement and so from a group. Which is the one that does not belong
to that group?
1) 5J1
2) 7TJ
3) 8N@
4) 32$
5) 6DF

5.) Which of the following is sixth to the right of the fourteenth from the right end?
1) 5
2) 6
3) I
4) $
5) None of these

6.) How many such consonants are there in the above arrangement, each of which
is immediately followed by a symbol but not immediately preceded by another
consonant?
1) None
2) One
3) Two
4) Three
5) None of these

7.) Which of the following is the eighth to the left of the sixteenth from the left
end?
1) J
2) E
3) %
4) 6
5) None of these

Directions (8-12): In the following questions, the symbols @, ?, %, ?, and $ are used with
the following meanings illustrated. 'P % Q' means 'P is either greater than or equal to Q'.
'P ? Q' means 'P is neither greater that nor smaller than Q'.
'P $ Q' means 'P is smaller than Q'. 'P @ Q' means 'P is either smaller than or equal to Q'.
'P ? Q' means 'P is greater than Q'. In each of the following questions assuming the given
statements to be true, find out which of the three conclusion I, II and III given below them
is/are definitely true and mark your answer accordingly. 

8.) Statements: M $ T, T@ K, K ? D
Conclusions: I. D % T II. K? M III. D ? M
1) Only I and II are true
2) Only I and III are true
3) Only II and III are true
4) All are true
5) None of these

9.) Statements: B ? H, H % A, A ? K
Conclusions: I.B % K II. K@ H III.A $ B
1) Only I and II are true
2) Only I and III are true
3) Only II and III are true
4) Only II is true.
5) None of these

10.) Statements: W % N, N? R, R @ F
Conclusions: I.F ? N II. W ? N III.R $ W
1) None is true
2) Only III is true
3) Only I and II are true
4) Only II and III are true
5) None of these

11.) Statements: F ? K, K ? M, M @ V
Conclusions: I. F % V II. V @ K III.M ? K
1) Only I is true
2) Only II is true
3) Only III is true
4) All are true
5) None of these

12.) Statements: N @ D, D $ T, T % J
Conclusions: I.J $ D II. N ? J III.T ? N
1) Only III is true
2) Only II is true
3) Only I and II are true
4) Only I is true
5) None of these

13.) Four of the following five are alike in a certain way and so form a group.
Which is the one that does not belong to that group?
1) Building
2) Toy
3) Vehicle
4) Mountain
5) Machine

14.) In a certain code language 'pik na ha' means 'who is there ', 'na ta ka' means
'what is that' and 'ha ja pa' means 'here and there’. Which of the following means
'here' in that code language?
1) ha
2) pa
3) ja
4) pa or ja
5) None of these

15.) Four of the following five are alike in a certain way and so form a group.
Which of the following does not belong to that group?
1) HR
2) PR
3) NP
4) BE
5) VX

Directions (Q. 16-22): In each of the following sentences there are two blank spaces.
Below each sentence there are five pairs of words denoted by numbers 1), 2), 3), 4) and 5).
Find out which pair of words can be filled up in the blanks in the sentence in the same
sequence to make it meaningfully complete.

16.) The truth is that in a highly capital-intensive business _______ deep pockets,
domestic civil aviation is _______ undercapitalized.
1) ascertaining, highly
2) requiring, woefully
3) sustaining, alarmingly
4) balancing, astonishingly
5) demanding, niggardly

17.) Time has now come for all agencies working in the development sector to
launch a multi-pronged __________ to _________ malnutrition.
1) system, abjure
2) weapon, annihilate
3) policy, deviate
4) strategy, eradicate
5) fact, demolish

18.) A well- _________, physically and mentally active ________ alone can
contribute to the speedier economic progress of a nation.
1) educated, subjects
2) organized, systems
3) advanced, brethren
4) formulated, citizens
5) nourished, populace

19.) We must develop _____ systems from the village upwards and up to the
national level to constantly _______ the nutritional status of the people.
1) monitoring, review
2) machinery, tackle
3) efficient, emancipate
4) sound, harbour
5) inherent, inundate

20.) Democracy has taken a ______ in a system which promotes sycophancy and
_____.
1) dive, bureaucracy
2) delve, dictatorship
3) beating, mediocrity
4) ride, heredity
5) privilege, intolerance

21.) People in power love to _______ the freedom of expression by the players
because it might ______ their position.
1) suppress, undermine
2) counter, reveal
3) contradict, focus
4) exploit, hamper
5) violate, degrade
22.) Rituals play an important role in ____ growth and growth of our minds to its
full _____.
1) cultural, measure
2) religious, maximum
3) mystical, exposure
4) traditional, limits
5) spiritual, potential

23.) If it is possible to make only one meaningful English word with the first, the
fifth, the seventh and the eighth letters of the word ORGANISED, which of the
following will be the third of that word? If no such word can be made give 'X' as
the answer and if more than one such word can be made, give 'Y' as the answer.
1) N
2) D
3) S
4) X
5) Y

24.) The position (s) of how many letters in the word PRODUCT will remain
unchanged, when the letters within the word are rearranged alphabetically?
1) None
2) One
3) Two
4) Three
5) More than three

25.) Mohan walked 25 metres towards South, took a right turn and walked 15
metres. He then took a left turn and walked 25 metres. Which direction is he now
from his starting point?
1) South-East
2) South
3) South-West
4) North-West
5) None of these

ANSWERS :
1. (2) 2. (2) 3. (5) 4. (4) 5. (2) 6. (4) 7. (1) 8. (4) 9. (3) 10. (2) 11. (5) 12. (1) 13.
(4) 14. (4) 15. (4) 16. (2) 17. (4) 18. (5) 19. (1) 20. (3) 21. (1) 22. (5) 23. (3) 24.
(2) 25. (3)

Latest Sample Placement Paper Of HCL For Year-2009-


10  ( Reasoning, English)   
Directions (1-7): Study the following arrangement and answer the questions given below:
R4TM7W%J95I#1PB2TA3D$6ENF8UH@
1.) How many such vowels are there in the above arrangement, each of which is
immediately preceded by a number and not immediately followed by a consonant?
1) None
2) One
3) Two
4) Three
5) Four

2.) What should come in place of the question mark (?) in the following series
based on the above arrangement?
TM% 951 B23 ?
1) $EF
2) $6F
3) D$N
4) $E8
5) None of these

3.) How many such consonants are there in the above arrangement, each of which
is neither preceded by a number nor followed by a consonants?
1) None
2) One
3) Two
4) Three
5) More than three

4.) Four of the following five are alike in a certain way based on their positions in
the above arrangement and so from a group. Which is the one that does not belong
to that group?
1) 5J1
2) 7TJ
3) 8N@
4) 32$
5) 6DF

5.) Which of the following is sixth to the right of the fourteenth from the right end?
1) 5
2) 6
3) I
4) $
5) None of these

 6.) How many such consonants are there in the above arrangement, each of which
is immediately followed by a symbol but not immediately preceded by another
consonant?
1) None
2) One
3) Two
4) Three
5) None of these

7.) Which of the following is the eighth to the left of the sixteenth from the left
end?
1) J
2) E
3) %
4) 6
5) None of these

Directions (8-12): In the following questions, the symbols @, ?, %, ?, and $ are used with
the following meanings illustrated. 'P % Q' means 'P is either greater than or equal to Q'.
'P ? Q' means 'P is neither greater that nor smaller than Q'.
'P $ Q' means 'P is smaller than Q'. 'P @ Q' means 'P is either smaller than or equal to Q'.
'P ? Q' means 'P is greater than Q'. In each of the following questions assuming the given
statements to be true, find out which of the three conclusion I, II and III given below them
is/are definitely true and mark your answer accordingly. 

8.) Statements: M $ T, T@ K, K ? D
Conclusions:  I. D % T   II. K? M   III. D ? M
1) Only I and II are true
2) Only I and III are true
3) Only II and III are true
4) All are true
5) None of these

9.) Statements: B ? H, H % A, A ? K
Conclusions: I.B % K   II. K@ H   III.A $ B
1) Only I and II are true
2) Only I and III are true
3) Only II and III are true
4) Only II is true.
5) None of these

10.) Statements: W % N, N? R, R @ F
Conclusions: I.F ? N   II. W ? N   III.R $ W
1) None is true
2) Only III is true
3) Only I and II are true
4) Only II and III are true
5) None of these

11.) Statements: F ? K, K ? M, M @ V
Conclusions: I. F % V II. V @ K III.M ? K
1) Only I is true
2) Only II is true
3) Only III is true
4) All are true
5) None of these

12.) Statements: N @ D, D $ T, T % J
Conclusions: I.J $ D II. N ? J III.T ? N
1) Only III is true
2) Only II is true
3) Only I and II are true
4) Only I is true
5) None of these

13.) Four of the following five are alike in a certain way and so form a group.
Which is the one that does not belong to that group?
1) Building
2) Toy
3) Vehicle
4) Mountain
5) Machine
14.) In a certain code language 'pik na ha' means 'who is there ', 'na ta ka' means
'what is that' and 'ha ja pa' means 'here and there’. Which of the following means
'here' in that code language?
1) ha
2) pa
3) ja
4) pa or ja
5) None of these

15.) Four of the following five are alike in a certain way and so form a group.
Which of the following does not belong to that group?
1) HR
2) PR
3) NP
4) BE
5) VX

Directions (Q. 16-22): In each of the following sentences there are two blank
spaces. Below each sentence there are five pairs of words denoted by numbers 1),
2), 3), 4) and 5). Find out which pair of words can be filled up in the blanks in the
sentence in the same sequence to make it meaningfully complete.

16.) The truth is that in a highly capital-intensive business _______ deep pockets,
domestic civil aviation is _______ undercapitalized.
1) ascertaining, highly
2) requiring, woefully
3) sustaining, alarmingly
4) balancing, astonishingly
5) demanding, niggardly

17.) Time has now come for all agencies working in the development sector to
launch a multi-pronged __________ to _________ malnutrition.
1) system, abjure
2) weapon, annihilate
3) policy, deviate
4) strategy, eradicate
5) fact, demolish

18.) A well- _________, physically and mentally active ________ alone can
contribute to the speedier economic progress of a nation.
1) educated, subjects
2) organized, systems
3) advanced, brethren
4) formulated, citizens
5) nourished, populace

19.) We must develop _____ systems from the village upwards and up to the
national level to constantly _______ the nutritional status of the people.
1) monitoring, review
2) machinery, tackle
3) efficient, emancipate
4) sound, harbour
5) inherent, inundate
20.) Democracy has taken a ______ in a system which promotes sycophancy and
_____.
1) dive, bureaucracy
2) delve, dictatorship
3) beating, mediocrity
4) ride, heredity
5) privilege, intolerance

21.) People in power love to _______ the freedom of expression by the players
because it might ______ their position.
1) suppress, undermine
2) counter, reveal
3) contradict, focus
4) exploit, hamper
5) violate, degrade

22.) Rituals play an important role in ____ growth and growth of our minds to its
full _____.
1) cultural, measure
2) religious, maximum
3) mystical, exposure
4) traditional, limits
5) spiritual, potential

23.) If it is possible to make only one meaningful English word with the first, the
fifth, the seventh and the eighth letters of the word ORGANISED, which of the
following will be the third of that word? If no such word can be made give 'X' as
the answer and if more than one such word can be made, give 'Y' as the answer.
1) N
2) D
3) S
4) X
5) Y

24.) The position (s) of how many letters in the word PRODUCT will remain
unchanged, when the letters within the word are rearranged alphabetically?
1) None
2) One
3) Two
4) Three
5) More than three

25.) Mohan walked 25 metres towards South, took a right turn and walked 15
metres. He then took a left turn and walked 25 metres. Which direction is he now
from his starting point?
1) South-East
2) South
3) South-West
4) North-West
5) None of these
ANSWERS :  1. (2)   2. (2)   3. (5)   4. (4)   5. (2)   6. (4)   7. (1)   8. (4)   9. (3)  
10. (2)   11. (5)   12. (1)   13. (4)   14. (4) 15. (4)   16. (2)   17. (4)  18. (5)   19.
(1)   20. (3)   21. (1)   22. (5)   23. (3)   24. (2)   25. (3)
HCL Placement Question Paper: Solved (C Language)
Instructions:
1. Please ignore any case-sensitive errors and un-included libraries.
2. You may use the back of this question paper for any rough work.

Q1.
main()
{
int i;
clrscr();
printf("%d", &i)+1;
scanf("%d", i)-1;
}
a. Runtime error.
b. Runtime error. Access violation.
c. Compile error. Illegal syntax
d. None of the above

Ans: d,printf( ) prints address/garbage of i,


scanf() dont hav & sign, so scans address for i
+1, -1 dont hav any effect on code

Q2.
main(int argc, char *argv[])
{
(main && argc) ? main(argc-1, NULL) : return 0;
}
a. Runtime error.
b. Compile error. Illegal syntax
c. Gets into Infinite loop
d. None of the above

Ans: b) illegal syntax for using return

Q3.
main()
{
int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);
}
a. Runtime error.
b. 100
c. Some Integer not 100
d. None of the above
Ans: d) 0

Q4.
main()
{
int i = 0xff ;
printf("\n%d", i<<2);
}

a. 4
b. 512
c. 1020
d. 1024

Ans: c) 1020

Q5.
#define SQR(x) x * x
main()
{
printf("%d", 225/SQR(15));
}

a. 1
b. 225
c. 15
d. none of the above

Ans: b) 225

Q6.
union u
{
struct st
{
int i : 4;
int j : 4;
int k : 4;
int l;
}st;
int i;
}u;
main()
{
u.i = 100;
printf("%d, %d, %d",u.i, u.st.i, u.st.l);
}

a. 4, 4, 0
b. 0, 0, 0
c. 100, 4, 0
d. 40, 4, 0

Ans: c) 100, 4, 0

Q7.
union u
{
union u
{
int i;
int j;
}a[10];
int b[10];
}u;
main()
{
printf("\n%d", sizeof(u));
printf(" %d", sizeof(u.a));
// printf("%d", sizeof(u.a[4].i));
}

a. 4, 4, 4
b. 40, 4, 4
c. 1, 100, 1
d. 40 400 4

Ans: 20, 200, error for 3rd printf

Q8.
main()
{
int (*functable[2])(char *format, ...) ={printf, scanf};
int i = 100;
(*functable[0])("%d", i);
(*functable[1])("%d", i);
(*functable[1])("%d", i);
(*functable[0])("%d", &i);

a. 100, Runtime error.


b. 100, Random number, Random number, Random number.
c. Compile error
d. 100, Random number

Q9.
main()
{
int i, j, *p;
i = 25;
j = 100;
p = &i; // Address of i is assigned to pointer p
printf("%f", i/(*p) ); // i is divided by pointer p
}
a. Runtime error.
b. 1.00000
c. Compile error
d. 0.00000

Ans: c) Error becoz i/(*p) is 25/25 i.e 1 which is int & printed as a float,
So abnormal program termination,
runs if (float) i/(*p) -----> Type Casting

Q10.
main()
{
int i, j;
scanf("%d %d"+scanf("%d %d", &i, &j));
printf("%d %d", i, j);
}
a. Runtime error.
b. 0, 0
c. Compile error
d. the first two values entered by the user

Ans: d) two values entered, 3rd will be null pointer assignment

Q11.
main()
{
char *p = "hello world";
p[0] = 'H';
printf("%s", p);
}

a. Runtime error.
b. “Hello world”
c. Compile error
d. “hello world”

Ans: b) Hello world

Q12.
main()
{
char * strA;
char * strB = I am OK;
memcpy( strA, strB, 6);
}
a. Runtime error.
b. I am OK
c. Compile error
d. I am O
Ans: c) I am OK is not in " "

Q13. How will you print % character?


a. printf(“\%”)
b. printf(“\\%”)
c. printf(“%%”)
d. printf(“\%%”)

Ans: c) printf(" %% ");

Q14.
const int perplexed = 2;
#define perplexed 3
main()
{
#ifdef perplexed
#undef perplexed
#define perplexed 4
#endif
printf("%d",perplexed);
}

a. 0
b. 2
c. 4
d. none of the above

Ans: c)

Q15.
struct Foo
{
char *pName;
};
main()
{
struct Foo *obj = malloc(sizeof(struct Foo));
clrscr();
strcpy(obj->pName,"Your Name");
printf("%s", obj->pName);
}

a. Your Name
b. compile error
c. Name
d. Runtime error

Ans a)

Q16.
struct Foo
{
char *pName;
char *pAddress;
};
main()
{
struct Foo *obj = malloc(sizeof(struct Foo));
clrscr();
obj->pName = malloc(100);
obj->pAddress = malloc(100);

strcpy(obj->pName,"Your Name");
strcpy(obj->pAddress, "Your Address");

free(obj);
printf("%s", obj->pName);
printf("%s", obj->pAddress);
}

a. Your Name, Your Address


b. Your Address, Your Address
c. Your Name Your Name
d. None of the above

Ans: d) printd Nothing, as after free(obj), no memory is there containing


obj->pName & pbj->pAddress

Q17.
main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcat(a,b));
}
a. Hello
b. Hello World
c. HelloWorld
d. None of the above

Ans: b)

Q18.
main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcpy(a,b));
}

a. “Hello”
b. “Hello World”
c. “HelloWorld”
d. None of the above

Ans: d) World, copies World on a, overwrites Hello in a.

Q19.
void func1(int (*a)[10])
{
printf("Ok it works");
}
void func2(int a[][10])
{
printf("Will this work?");
}

main() 

int a[10][10];
func1(a); 
func2(a);
}

a. Ok it works
b. Will this work?
c. Ok it worksWill this work?
d. None of the above

Ans: c)

Q20.
main()
{
printf("%d, %d", sizeof('c'), sizeof(100));
}
a. 2, 2
b. 2, 100
c. 4, 100
d. 4, 4

Ans: a) 2, 2

Q21.
main()
{
int i = 100;
clrscr();
printf("%d", sizeof(sizeof(i)));
}
a. 2
b. 100
c. 4
d. none of the above
Ans: a) 2

Q22.
main()
{
int c = 5;
printf("%d", main||c);
}

a. 1
b. 5
c. 0
d. none of the above

Ans: a) 1, if we use main|c then error, illegal use of pointer

Q23.
main()
{
char c;
int i = 456;
clrscr();
c = i;
printf("%d", c);
}
a. 456
b. -456
c. random number
d. none of the above

Ans: d) -56

Q24.
void main ()
{
int x = 10;
printf ("x = %d, y = %d", x,--x++);
}
a. 10, 10
b. 10, 9
c. 10, 11
d. none of the above

Ans: d) Lvalue required

Q25.
main()
{
int i =10, j = 20;
clrscr();
printf("%d, %d, ", j-- , --i);
printf("%d, %d ", j++ , ++i);
}
a. 20, 10, 20, 10
b. 20, 9, 20, 10
c. 20, 9, 19, 10
d. 19, 9, 20, 10

Ans: c)

Q26.
main()
{
int x=5;
clrscr();

for(;x==0;x--) {
printf("x=%d\n”", x--);
}
}

a. 4, 3, 2, 1, 0
b. 1, 2, 3, 4, 5
c. 0, 1, 2, 3, 4
d. none of the above

Ans: d) prints nothing, as condition x==0 is False

Q27
main()
{
int x=5;
for(;x!=0;x--) {
printf("x=%d\n", x--);
}
}

a. 5, 4, 3, 2,1
b. 4, 3, 2, 1, 0
c. 5, 3, 1
d. none of the above

Ans: d) Infinite loop as x is decremented twice, it never be 0


and loop is going on & on

Q28
main()
{
int x=5;
clrscr();
for(;x<= 0;x--)
{
printf("x=%d ", x--);
}
}
a. 5, 3, 1
b. 5, 2, 1,
c. 5, 3, 1, -1, 3
d. –3, -1, 1, 3, 5

Ans: prints nothing, as condition in loop is false.

Q29.
main()
{
{
unsigned int bit=256;
printf("%d", bit);
}
{
unsigned int bit=512;
printf("%d", bit);
}
}
a. 256, 256
b. 512, 512
c. 256, 512
d. Compile error

Ans: 256, 512, becoz these r different blocks, so declaration allowed

Q30.
main()
{
int i;
clrscr();
for(i=0;i<5;i++)
{
printf("%d\n", 1L << i);
}
}
a. 5, 4, 3, 2, 1
b. 0, 1, 2, 3, 4
c. 0, 1, 2, 4, 8
d. 1, 2, 4, 8, 16

Ans: d) L does't make any diff.

Q31.
main()
{
signed int bit=512, i=5;
for(;i;i--)
{
printf("%d\n", bit = (bit >> (i - (i -1))));
}
}
a. 512, 256, 128, 64, 32
b. 256, 128, 64, 32, 16
c. 128, 64, 32, 16, 8
d. 64, 32, 16, 8, 4

Ans: b)

Q32.
main()
{
signed int bit=512, i=5;
for(;i;i--)
{
printf("%d\n", bit >> (i - (i -1)));
}
}

a. 512, 256, 0, 0, 0
b. 256, 256, 0, 0, 0
c. 512, 512, 512, 512, 512
d. 256, 256, 256, 256, 256

Ans: d) bit's value is not changed

Q33.
main()
{
if (!(1&&0))
{
printf("OK I am done.");
}
else
{
printf("OK I am gone.");
}
}
a. OK I am done
b. OK I am gone
c. compile error
d. none of the above

Ans: a)

Q34
main()
{
if ((1||0) && (0||1))
{
printf("OK I am done.");
}
else
{
printf("OK I am gone.");
}
}
a. OK I am done
b. OK I am gone
c. compile error
d. none of the above

Ans: a)

Q35
main()
{
signed int bit=512, mBit;
{
mBit = ~bit;
bit = bit & ~bit ;

printf("%d %d", bit, mBit);


}
}

a. 0, 0
b. 0, 513
c. 512, 0
d. 0, -513

Ans: d)

HCL Fresher Recruitment Placement Paper Jan - 2010 (Aptitude Test, Technical
Round-1, Client/Manager Interview)
1. 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%
Ans :c) 50%

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

3. 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 Answer :D)8

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

5. 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%

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

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

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
murderer. as q is not murderer, he is telling 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)

3) 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 abilities.
e) Statistics sometimes present a wrong picture of things

4) 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:
ABCDE
X4
EDCBA

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

Six knights - P,Q,R,S,T and U - assemble for a long journey in two traveling parties. For
security, each travelingparty 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 theknights can, if they wish,
rearrange their traveling parties before continuing, again in two parties along
separatenorthern 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 travel in the same party with S Q can't travel by the southern route U can't change
routes
11) 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

12) If each of the two parties of knights consists of exactly three members, which
of the following is not a possible traveling 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

13) If one of the two parties of knights consists 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
Ans: c

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

15) If, when the two parties of knights encounter one another after a month,
exactly one knight changes from one traveling party to the other traveling party,
that knight must be
a) P
b) Q
c) R
d) S
e) T

Ans: e

PAPER - II
1. How many of the integers between 25 and 45 are even ?
(A)21 
(B)20 
(C)11 
(D)10 
(E)9
Ans:d)10
2. 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
3. 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)
4. 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
5. 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
6. 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%
7. 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
8. 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%
9. 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
10. 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
11. 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
12 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%
13. 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
14. 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
15. 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

16. 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
17. 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

Placement Paper For  HCL | June 2008 ( Campus Recruitment) 


Directions (1-7): Study the following arrangement and answer the questions given below:
R4TM7W%J95I#1PB2TA3D$6ENF8UH@

1.) How many such vowels are there in the above arrangement, each of which is
immediately preceded by a number and not immediately followed by a consonant?
1) None
2) One
3) Two
4) Three
5) Four

2.) What should come in place of the question mark (?) in the following series
based on the above arrangement?
TM% 951 B23 ?
1) $EF
2) $6F
3) D$N
4) $E8
5) None of these

3.) How many such consonants are there in the above arrangement, each of which
is neither preceded by a number nor followed by a consonants?
1) None
2) One
3) Two
4) Three
5) More than three

4.) Four of the following five are alike in a certain way based on their positions in
the above arrangement and so from a group. Which is the one that does not belong
to that group?
1) 5J1
2) 7TJ
3) 8N@
4) 32$
5) 6DF

5.) Which of the following is sixth to the right of the fourteenth from the right end?
1) 5
2) 6
3) I
4) $
5) None of these

 6.) How many such consonants are there in the above arrangement, each of which
is immediately followed by a symbol but not immediately preceded by another
consonant?
1) None
2) One
3) Two
4) Three
5) None of these

7.) Which of the following is the eighth to the left of the sixteenth from the left
end?
1) J
2) E
3) %
4) 6
5) None of these

Directions (8-12): In the following questions, the symbols @, ?, %, ?, and $ are used with
the following meanings illustrated. 'P % Q' means 'P is either greater than or equal to Q'.
'P ? Q' means 'P is neither greater that nor smaller than Q'.
'P $ Q' means 'P is smaller than Q'. 'P @ Q' means 'P is either smaller than or equal to Q'.
'P ? Q' means 'P is greater than Q'. In each of the following questions assuming the given
statements to be true, find out which of the three conclusion I, II and III given below them
is/are definitely true and mark your answer accordingly.

8.) Statements: M $ T, T@ K, K ? D
Conclusions:  I. D % T   II. K? M   III. D ? M
1) Only I and II are true
2) Only I and III are true
3) Only II and III are true
4) All are true
5) None of these

9.) Statements: B ? H, H % A, A ? K
Conclusions: I.B % K   II. K@ H   III.A $ B
1) Only I and II are true
2) Only I and III are true
3) Only II and III are true
4) Only II is true.
5) None of these

10.) Statements: W % N, N? R, R @ F
Conclusions: I.F ? N   II. W ? N   III.R $ W
1) None is true
2) Only III is true
3) Only I and II are true
4) Only II and III are true
5) None of these

11.) Statements: F ? K, K ? M, M @ V
Conclusions: I. F % V II. V @ K III.M ? K
1) Only I is true
2) Only II is true
3) Only III is true
4) All are true
5) None of these

12.) Statements: N @ D, D $ T, T % J
Conclusions: I.J $ D II. N ? J III.T ? N
1) Only III is true
2) Only II is true
3) Only I and II are true
4) Only I is true
5) None of these

13.) Four of the following five are alike in a certain way and so form a group.
Which is the one that does not belong to that group?
1) Building
2) Toy
3) Vehicle
4) Mountain
5) Machine

14.) In a certain code language 'pik na ha' means 'who is there ', 'na ta ka' means
'what is that' and 'ha ja pa' means 'here and there’. Which of the following means
'here' in that code language?
1) ha
2) pa
3) ja
4) pa or ja
5) None of these

15.) Four of the following five are alike in a certain way and so form a group.
Which of the following does not belong to that group?
1) HR
2) PR
3) NP
4) BE
5) VX

Directions (Q. 16-22): In each of the following sentences there are two blank spaces.
Below each sentence there are five pairs of words denoted by numbers 1), 2), 3), 4) and 5).
Find out which pair of words can be filled up in the blanks in the sentence in the same
sequence to make it meaningfully complete.

16.) The truth is that in a highly capital-intensive business _______ deep pockets,
domestic civil aviation is _______ undercapitalized.
1) ascertaining, highly
2) requiring, woefully
3) sustaining, alarmingly
4) balancing, astonishingly
5) demanding, niggardly

17.) Time has now come for all agencies working in the development sector to
launch a multi-pronged __________ to _________ malnutrition.
1) system, abjure
2) weapon, annihilate
3) policy, deviate
4) strategy, eradicate
5) fact, demolish

18.) A well- _________, physically and mentally active ________ alone can
contribute to the speedier economic progress of a nation.
1) educated, subjects
2) organized, systems
3) advanced, brethren
4) formulated, citizens
5) nourished, populace

19.) We must develop _____ systems from the village upwards and up to the
national level to constantly _______ the nutritional status of the people.
1) monitoring, review
2) machinery, tackle
3) efficient, emancipate
4) sound, harbour
5) inherent, inundate

20.) Democracy has taken a ______ in a system which promotes sycophancy and
_____.
1) dive, bureaucracy
2) delve, dictatorship
3) beating, mediocrity
4) ride, heredity
5) privilege, intolerance

21.) People in power love to _______ the freedom of expression by the players
because it might ______ their position.
1) suppress, undermine
2) counter, reveal
3) contradict, focus
4) exploit, hamper
5) violate, degrade

22.) Rituals play an important role in ____ growth and growth of our minds to its
full _____.
1) cultural, measure
2) religious, maximum
3) mystical, exposure
4) traditional, limits
5) spiritual, potential

23.) If it is possible to make only one meaningful English word with the first, the
fifth, the seventh and the eighth letters of the word ORGANISED, which of the
following will be the third of that word? If no such word can be made give 'X' as
the answer and if more than one such word can be made, give 'Y' as the answer.
1) N
2) D
3) S
4) X
5) Y

24.) The position (s) of how many letters in the word PRODUCT will remain
unchanged, when the letters within the word are rearranged alphabetically?
1) None
2) One
3) Two
4) Three
5) More than three

25.) Mohan walked 25 metres towards South, took a right turn and walked 15
metres. He then took a left turn and walked 25 metres. Which direction is he now
from his starting point?
1) South-East
2) South
3) South-West
4) North-West
5) None of these
ANSWERS :  1. (2)   2. (2)   3. (5)   4. (4)   5. (2)   6. (4)   7. (1)   8. (4)   9. (3)  
10. (2)   11. (5)   12. (1)   13. (4)   14. (4) 15. (4)   16. (2)   17. (4)  18. (5)   19.
(1)   20. (3)   21. (1)   22. (5)   23. (3)   24. (2)   25. (3)

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 declaration is a function returning a pointer to aninteger and the second is a
pointer to function returning int
d) Both are different ways of declaring 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 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 function 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 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

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.

PAPER: HCL Placement Paper (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
murderer. as q is not murderer, he is telling 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)

3) 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 abilities.
e) Statistics sometimes present a wrong picture of things

4) 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:
ABCDE
X4
EDCBA

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

Six knights - P,Q,R,S,T and U - assemble for a long journey in two traveling parties. For
security, each travelingparty 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 theknights can, if they wish,
rearrange their traveling parties before continuing, again in two parties along
separatenorthern 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 travel in the same party with S Q can't travel by the southern route U can't
change routes

11) 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
12) If each of the two parties of knights consists of exactly three members, which of the
following is not a possible traveling 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

13) If one of the two parties of knights consists 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
Ans: c

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

15) If, when the two parties of knights encounter one another after a month, exactly one
knight changes from one traveling party to the other traveling party, that knight must be
a) P
b) Q
c) R
d) S
e) T

Ans: e

PAPER : HCL Technical Placement Paper Pattern

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 size of the address bus and data bus in 8086?

11) 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?

PAPER : HCL Placement Paper Pattern (Computer Concepts)

NOTE : This is a system paper and not application paper.

Section 1- General Computer Concepts

1. Piggy backing is a technique for


a) Flow control b) Sequence c) Acknowledgement d) retransmition
Ans. (c)

2. In OSI, terminal emulation is done in


(a) sessions layer (b) application layer (c) presentation layer (d) transport layer
Ans: (b)

3.Bit parity check,when performed on a byte ,cancatch


a)odd number of errors b)even number of errors c)any number of errors
d)none of the above
Ans: (a)

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

5. For 1 MB memory, the number of address lines required,


(a)11(b)16(c)20(d) 24 Ans. (c)

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

7. Semaphore is used for


(a) synchronization(b) dead-lock avoidence(c) both a and b(d) none Ans. (c)

8. Which of the following involves context switch,


(a) system call(b) priviliged instruction(c) floating poitnt exception(d) all the above
(e) none of the above Ans: (a)

9.Virtual address are translated to physicaladdress 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)

11. OLE is a mechanism


a)in UNIX for network communication
b)in INTERNET for communication between nodes
c)for communication between processes in a NT system d)used as a network layer protocol
in NT & Windows systems

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

Paper : HCL Technologies Sample Paper Part - 2


 

1. Which of the following involves context switch,

(a) system call


(b) priviliged instruction
(c) floating poitnt exception
(d) all the above
(e) none of the above
Ans: (a)

2. In 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

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 avoidence
(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) inter connection 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) retransmition

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
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) & (b)
(d) none of the above

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

a) delete from costomer where customer number exists( select distinct customer number
from customer having count )
b) delete customer a where customer number in b rowid
c) delete customer a where custermor number in( select customer number from customer a,
customer b )
d) none of the above

Section B

1. Given the following statement 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. Find the output for the following C program

main
{int x,j,k;
j=k=6;x=2;
x=j*k;
printf("%d", x);

3. Find the output for the following C program

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

4. Find the output for the following C program

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. Find the output for the following C program

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

Ans. i=20

6. Find the output for the following C program

int x=5;
y= x&y

7.Find the output for the following C program

Y=10;
if( Y++>9 && Y++!=10 && Y++>10)
{printf("%d", Y);
else
printf("%d", Y);
}

Ans. 13

8. Find the output for the following C program


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

Ans. (a)

9. What is the sizeof(long int)

(a) 4 bytes
(b) 2 bytes
(c) compiler dependent
(d) 8 bytes

10. Which of the function operator cannot be over loaded

(a) <=
(b) ?:
(c) ==
(d) *

11. Find the output for the following C program

main()
{int x=2,y=6,z=6;
x=y==z;
printf(%d",x)
}

Section C (Programming Skills)

Answer the questions based on the following program

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
}

Q. In what case the prev was


(a) All cases
(b) It does not work for the last element
(c) It does not for the first element
(d) None of these

Answer the questions based on the following program

VOID FUNCTION(INT KK)


{KK+=20;
}
VOID FUNCTION (INT K)
INT MM,N=&M
KN = K
KN+-=10;
}

Q. What is the output of the following program

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

Section D

1. a=2, b=3, c=6 Find the value of c/(a+b)-(a+b)/c

2. What does the hexanumber E78 in radix 7.

(a) 12455
(b) 14153
(c) 14256
(d) 13541
(e) 131112

Ans. (d)
3. 10 : 4 seconds :: ? : 6 minutes

Ans. 900

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

5. From the following statements determing the order of ranking


* M has double the amount as D
* Y has 3 rupess more than half the amount of 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

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

7. If B occurs which must occur

(a) D
(b) D and G
(c) G and H
(d) F and G
(e) J

Ans. (a)

8. If J occurs which must have occured

(a) E
(b) either B or C
(c) both E & F
(d) B
(e) both B & C

Ans. (b)

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

10. E occurs which one cannot occurs

(a) A
(b) F
(c) D
(d) C
(e) J

Ans. (b)

Section A
 1. Which of the following involves context switch,

 (a) system call


 (b) priviliged instruction
 (c) floating poitnt exception
 (d) all the above
 (e) none of the above

 Ans: (a)

 2. In 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

 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 avoidence
 (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) inter connection 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) retransmition

 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

 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) & (b)
 (d) none of the above

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

 a) delete from costomer where customer number  exists( select distinct customer number
from  customer having count )
 b) delete customer a where customer number in b  rowid
 c) delete customer a where custermor number in( select customer number from customer a,
customer b )
 d) none of the above

Section B

 1. Given the following statement  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. Find the output for the following C program

 main
 {int x,j,k;
 j=k=6;x=2;
 x=j*k;
 printf("%d", x);

 3. Find the output for the following C program

 fn f(x)
 { if(x<=0) > return;
 else f(x-1)+x;
 }

 4. Find the output for the following C program

 i=20,k=0;
 for(j=1;j {k+=j<10?4:3;> } 
printf("%d", k); 

Ans. k=4 

5. Find the output for the following C program 


int i =10 
main() 
{int i =20,n; 
for(n=0;n<=i;) > {int i=10; 
i++; 

printf("%d", i); 

Ans. i=20 

6. Find the output for the following C program 

int x=5; 
y= x&y 

7.Find the output for the following C program 

Y=10; 
if( Y++>9 && Y++!=10 && Y++>10) 
{printf("%d", Y); 
else 
printf("%d", Y); 

Ans. 13 

8. Find the output for the following C program 

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 

Ans. (a) 

9. What is the sizeof(long int) 

(a) 4 bytes 
(b) 2 bytes 
(c) compiler dependent 
(d) 8 bytes 

10. Which of the function operator cannot be over loaded 

(a) <= > (b) ?: 


(c) == 
(d) * 
11. Find the output for the following C program 

main() 
{intx=2,y=6,z=6; 
x=y==z; 
printf(%d",x) 

Section C (Programming Skills) 


Answer the questions based on the following program 

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 

Q. In what case the prev was 

(a) All cases 


(b) It does not work for the last element 
(c) It does not for the first element 
(d) None of these 

Answer the questions based on the following program 

VOID FUNCTION(INT KK) 


{KK+=20; 

VOID FUNCTION (INT K) 
INT MM,N=&M 
KN = K 
KN+-=10; 

Q. What is the output of the following program 

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 

Section D 
1. a=2, b=3, c=6  Find the value of c/(a+b)-(a+b)/c 

2. What does the hexanumber E78 in radix 7. 

(a) 12455 
(b) 14153 
(c) 14256 
(d) 13541 
(e) 131112 

Ans. (d) 

3. 10 : 4 seconds :: ? : 6 minutes 

Ans. 900 

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

5. From the following statements determing the order of ranking 


M has double the amount as D 
Y has 3 rupess more than half the amount of 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 

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

7. If B occurs which must occur 

(a) D 
(b) D and G 
(c) G and H 
(d) F and G 
(e) J 

Ans. (a) 

8. If J occurs which must have occured 

(a) E 
(b) either B or C 
(c) both E & F 
(d) B 
(e) both B & C 

Ans. (b) 

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

10. E occurs which one cannot occurs 

(a) A 
(b) F 
(c) D 
(d) C 
(e) J 
Ans. (b)

Aptitude.
1. a=2, b=3, c=6 Find the value of c/(a+b)-(a+b)/c Ans. 11/30

2. What does the hexa number E78 in radix 7. (a) 12455 (b) 14153 (c) 14256 (d) 13541 (e)
131112 Ans. (d)
3. 10 : 4 seconds :: ? : 6 minutes Freshersworld.com Ans. 90
4. 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
5. From the following statements determing the order of ranking M has double the amount as D
Y has 3 rupess more than half the amount of 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 Freshersworld.com G occurs if F occurs

6. 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)
7. If B occurs which must occur (a) D (b) D and G (c) G and H (d) F and G (e) J Ans. (a)
8. If J occurs which must have occured (a) E (b) either B or C (c) both E & F (d) B (e) both B &
C Ans. (b)
9. 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 Freshersworld.com Ans. (c)
10. E occurs which one cannot occurs (a) A (b) F (c) D (d) C (e) J Ans. (b)
11. 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%
12. 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
13. 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 Freshersworld.com e) S Ans: E
14. 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 < a="2,b="4,c="5" x="7;" y="3;" 2 =" 2"
expr="2" y="2" y="23." c ="(char" ip="(int" i="0X89;" p="(char" x =" b">8 ? b <<3>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,411. What is th output of the following program? Freshersworld.com int x= 0x65; main()
{ char x; printf("%d\n",x) } a) compilation error b) 'A' c) 65 d) unidentified12. 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,713. 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"); Freshersworld.com } } 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++; } )
"Hello World" b)"Hello" c)"World" d) NULL e) unidentified Answer: d) NULL15. 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); Freshersworld.com } a)8 b)6 c)5 d)4 e)none Answer : c)516. 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,2217. 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 error18. 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 Freshersworld.com20. 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. What is the difference between a latch and a flip flop. For the same input, how would the
output look for a latch and for a flip-flop. 

2. Finite state machines:

(2.1)Design a state-machine (or draw a state-diagram) to give an output '1' when the # of A's
are even and # of B's are odd. The input is in the form of a serial-stream (one-bit per clock
cycle). The inputs could be of the type A, B or C. At any given clock cycle, the output is a '1',
provided the # of A's are even and # of B's are odd. At any given clock cycle, the output is a '0',
if the above condition is not satisfied. 

(2.2). To detect the sequence "abca" when the inputs can be a b c d. 

3. minimize a boolean expression. 

4. Draw transistor level nand gate. 

5. Draw the cross-section of a CMOS inverter. 

6. Deriving the vectors for the stuck at 0 and stuck at 1 faults. 

7. Given a boolean expression he asked me to implement just with muxes but nothing else.

8. Draw Id Vds curves for mosfets and explain different regions. 

9. Given the transfer characteristics of a black box draw the circuit for the black box. 

10. Given a circuit and its inputs draw the outputs exact to the timing. 

11. Given an inverter with a particular timing derive an inverter using the previous one but with
the required timing other than the previous one. 

12. Change the rise time and fall time of a given circuit by not changing the transistor sizes but
by using current mirrors. 13. Some problems on clamping diodes.

These are some of the questions asked by Microsoft.


(I feel that these type of questions are asked even in Electrical Engineering interviews. Make sure you browse them.)

1. Given a rectangular (cuboidal for the puritans) cake with a rectangular piece removed (any size or
orientation), how would you cut the remainder of the cake into two equal halves with one straight cut of a knife ?
2. You're given an array containing both positive and negative integers and required to find the sub-array with
the largest sum (O(N) a la KBL).
Write a routine in C for the above.

3. Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in
it. You are allowed to destroy the array if you like.

4. Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations
at all.

5. Given only putchar (no sprintf, itoa, etc.) write a routine putlon the prints out an unsigned long in decimal.

6. Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

7. Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order
of the words (no characters) in it.

8. How many points are there on the globe where by walking one mile south, one mile east and one mile north
you reach the place where you started.

9. Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing
each bit is not a solution)

10. What are the different ways to say, the value of x can be either a 0 or a 1. Apparently the if then else solution
has a jump when written

out in assembly.
if (x == 0)
y=0
else
y =x

There is a logical, arithmetic and a datastructure soln to the above


problem.

Logic design:

1. Draw the transistor level CMOS #input NAND or NOR gate.After drawing it lot of qestions on that ckt will be asked.

2. Transistor sizing for given rise time and fall time. How do you size it for equal rise and fall time.

3. Given a function whose inputs are dependent on its outputs. Design a sequential circuit.

4. Design a finite state machine to give a modulo 3 counter when x=0 and modulo 4 counter when x=1.

5. Given a boolean equation minimize it.

6. Given a boolean equation draw the transistor level minimum transistor circuit.

7. What is the function of a D-flipflop, whose inverted outputs are connected to its input ?

8. What will you do if you want to drive a large capacitance ?

Layout related questions:

1. asked me to layout the 3 input nand gate.

2. Later he asked me to modify it to consume as much less space as


we can.

3. He also asked me about the transistor sizing.

1. He asked me to draw the cross section of an inverter and asked me


to show all the capacitances on it and reason for those capacitances.
2. Describe the latchup effect.

3. More about the tristate buffers.

3. What will be the voltage at the output node of a triostate buffer


in its high impedence state. He gave a waveform for the input and
asked me to draw the output waveform for that.

4. Posed a lot of questions on charge sharing problems and keeper


circuits.

5. Asked me to draw the Id Vds curves for mosfet. Asked me to


explain the regions and some couses for that curve like channel
width modulation.

6. He asked me about the electron migration effect and methods to


avoid it.

7. Asked me to draw the dynamic logic of a particular gate and then


posed lots of tricky questions from the previous discussion.

8. He asked me to draw the 6 transistor contemporary sram cell and asked


me to explain how the reading and writing is done in it.

9. Something about trip point.

Computer Architecture Questions:

1. Explain what is DMA?


2. what is pipelining?
3. what are superscalar machines and vliw machines?
4. what is cache?
5. what is cache coherency and how is it eliminated?
6. what is write back and write through caches?
7. what are different pipelining hazards and how are they eliminated.
8. what are different stages of a pipe?
9. eplain more about branch prediction in controlling the control hazards
10. Give examples of data hazards with pseudo codes.
11. Caluculating the number of sets given its way and size in a cache?
12. How is a block found in a cache?
13. scoreboard analysis.
14. What is miss penalty and give your own ideas to eliminate it.
15. How do you improve the cache performance.
16. Different addressing modes.
17. Computer arithmetic with two's complements.
18. About hardware and software interrupts.
19. What is bus contention and how do you eliminate it.
20. What is aliasing?
21) What is the difference between a latch and a flip flop?
22) What is the race around condition? How can it be overcome?
23) What is the purpose of cache? How is it used?
24) What are the types of memory management

C Interview Questions For Hardware Engineer

1. What are the total number of lines written in C/C++? What is the most
complicated/valuable program written in C/C++?
2. What compiler was used?
3. Have you studied buses? What types?
4. Have you studied pipelining? List the 5 stages of a 5 stage pipeline. Assuming 1 clock per
stage, what is the latency of an instruction in a 5 stage machine? What is the throughput
of this machine ?
5. How many bit combinations are there in a byte?
6. What is the difference between = and == in C?
7. Are you familiar with VHDL and/or Verilog?

TECHNICAL & HR INTERVIEW QUESTIONS OF GOOGLE,MICROSOFT,YAHOO AND MANY MORE


COMPANIES.

 Resume Tips
 Puzzles
 Crack The Interview
 Amazon Interviews
 Algorithms
 Data Structures
 ECE Interviews
 Home

ECE Frequently Asked Interview Questions

1. What is the difference between a latch and a flip flop. For the same input, how would the
output look for a latch and for a flip-flop. 

2. Finite state machines:

(2.1)Design a state-machine (or draw a state-diagram) to give an output '1' when the # of A's
are even and # of B's are odd. The input is in the form of a serial-stream (one-bit per clock
cycle). The inputs could be of the type A, B or C. At any given clock cycle, the output is a '1',
provided the # of A's are even and # of B's are odd. At any given clock cycle, the output is a '0',
if the above condition is not satisfied. 

(2.2). To detect the sequence "abca" when the inputs can be a b c d.  

3. minimize a boolean expression. 

4. Draw transistor level nand gate. 

5. Draw the cross-section of a CMOS inverter. 

6. Deriving the vectors for the stuck at 0 and stuck at 1 faults.  

7. Given a boolean expression he asked me to implement just with muxes but nothing else.

8. Draw Id Vds curves for mosfets and explain different regions. 

9. Given the transfer characteristics of a black box draw the circuit for the black box. 

10. Given a circuit and its inputs draw the outputs exact to the timing.  

11. Given an inverter with a particular timing derive an inverter using the previous one but with
the required timing other than the previous one. 

12. Change the rise time and fall time of a given circuit by not changing the transistor sizes but
by using current mirrors. 13. Some problems on clamping diodes.

These are some of the questions asked by Microsoft.


(I feel that these type of questions are asked even in Electrical Engineering interviews. Make sure you browse them.)

1. Given a rectangular (cuboidal for the puritans) cake with a rectangular piece removed (any size or
orientation), how would you cut the remainder of the cake into two equal halves with one straight cut of a knife ?

2. You're given an array containing both positive and negative integers and required to find the sub-array with
the largest sum (O(N) a la KBL).
Write a routine in C for the above.

3. Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in
it. You are allowed to destroy the array if you like.

4. Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations
at all.

5. Given only putchar (no sprintf, itoa, etc.) write a routine putlon the prints out an unsigned long in decimal.

6. Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

7. Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order
of the words (no characters) in it.

8. How many points are there on the globe where by walking one mile south, one mile east and one mile north
you reach the place where you started.

9. Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing
each bit is not a solution)

10. What are the different ways to say, the value of x can be either a 0 or a 1. Apparently the if then else solution
has a jump when written

out in assembly.
if (x == 0)
y=0
else
y =x

There is a logical, arithmetic and a datastructure soln to the above


problem.

Logic design:

1. Draw the transistor level CMOS #input NAND or NOR gate.After drawing it lot of qestions on that ckt will be asked.

2. Transistor sizing for given rise time and fall time. How do you size it for equal rise and fall time.

3. Given a function whose inputs are dependent on its outputs. Design a sequential circuit.

4. Design a finite state machine to give a modulo 3 counter when x=0 and modulo 4 counter when x=1.

5. Given a boolean equation minimize it.

6. Given a boolean equation draw the transistor level minimum transistor circuit.

7. What is the function of a D-flipflop, whose inverted outputs are connected to its input ?

8. What will you do if you want to drive a large capacitance ?

Layout related questions:


1. asked me to layout the 3 input nand gate.

2. Later he asked me to modify it to consume as much less space as


we can.

3. He also asked me about the transistor sizing.

1. He asked me to draw the cross section of an inverter and asked me


to show all the capacitances on it and reason for those capacitances.

2. Describe the latchup effect.

3. More about the tristate buffers.

3. What will be the voltage at the output node of a triostate buffer


in its high impedence state. He gave a waveform for the input and
asked me to draw the output waveform for that.

4. Posed a lot of questions on charge sharing problems and keeper


circuits.

5. Asked me to draw the Id Vds curves for mosfet. Asked me to


explain the regions and some couses for that curve like channel
width modulation.

6. He asked me about the electron migration effect and methods to


avoid it.

7. Asked me to draw the dynamic logic of a particular gate and then


posed lots of tricky questions from the previous discussion.

8. He asked me to draw the 6 transistor contemporary sram cell and asked


me to explain how the reading and writing is done in it.

9. Something about trip point.

Computer Architecture Questions:

1. Explain what is DMA?


2. what is pipelining?
3. what are superscalar machines and vliw machines?
4. what is cache?
5. what is cache coherency and how is it eliminated?
6. what is write back and write through caches?
7. what are different pipelining hazards and how are they eliminated.
8. what are different stages of a pipe?
9. eplain more about branch prediction in controlling the control hazards
10. Give examples of data hazards with pseudo codes.
11. Caluculating the number of sets given its way and size in a cache?
12. How is a block found in a cache?
13. scoreboard analysis.
14. What is miss penalty and give your own ideas to eliminate it.
15. How do you improve the cache performance.
16. Different addressing modes.
17. Computer arithmetic with two's complements.
18. About hardware and software interrupts.
19. What is bus contention and how do you eliminate it.
20. What is aliasing?
21) What is the difference between a latch and a flip flop?
22) What is the race around condition? How can it be overcome?
23) What is the purpose of cache? How is it used?
24) What are the types of memory management

HCL Placement Papers


 

Aptitude
1.  How many of the integers between 25 and 45 are
                  

even ?
 (A)21 (B)20 (C)11 (D)10 (E)9
 Ans:d)10
2. 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
3. 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)
4. 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
5. 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
6. 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%
7. 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
8. 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%
9. 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
10. 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
11. 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
12. 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%
13. 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
14. 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
15. 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
16.  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
17.  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
1. In ANSI C which is such thing is not in Java.
                  

     typedef struct node


            {
             int 
             NODEPTR * NODE
            }
2. 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
3.  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
4. Piggybacking is done for,
                  

Ans=>Acknowledgement.
5. WHICH IS NOT BASIC data type ans.Char*
                  

6. 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) 
7. Two variable cannt have the same name in
                  

 a)function b) block c) file d)--- C Section


8.  #define inc(x) x++
                  

  main()
    {
      int t=1;
      printf("%d",inc(t++));
    } 
9.  one or two que for the complicated
                  

declaration.          
10. Const char *a="Abcd"; char const *a="lmno";
              

base do this,Two que were there.


11. char *p ;
              

char q[20];
12.  int i,*p=&i;
              

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

 f(i)
 printf("%d",i);
14. #define val 1+2
              

printf("%d%d",val/val,val^3)
ans : 3 9
15. #define "this" "#"
              

#define (x,y) x##y


printf("this","this is")
ans: compilation error (tested)
16.                2^2)+(a^a)
17.  int a ,b=7
              

 a=b<4?b<<1:b>4?7>>1:a                                                  
                           
 ans.3
18. one que on c++ class member function
              

ans.d
19. work of memory management unit.
              

20. who relate virtual memory to physical memory  


              

ans.os
21. memory is allocated to variable
              

a)when declared b)when define c)...


22. Question on double linked list
              

23. Define success 1 


              

 define failure -1
 if(condition)
 printf(success);
 else
 printf(failure);
  ans success
24. 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;
25. 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
26. #define inc(x) x++
              

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

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

Vous aimerez peut-être aussi