Vous êtes sur la page 1sur 570

1.Three types of tea the a,b,c costs Rs. 95/kg,100/kg and70/kg respectively.

How many kgs of each should be blended to produce 100 kg of mixture worth Rs.90/kg,
given that the quntities of band c are equal
a)70,15,15
b)50,25,25
c)60,20,20
d)40,30,30
Ans: (b)
2.What is the maximum number of half-pint bottles of cream that can be filled with a 4gallon can of cream (2 pt. =1 qt. and 4 qt. =1 gal)
A.16
B.24
C.30
D.64
Ans: D
3.There are two circles, one circle is inscribed and another circle is circumscribed over a
square. What is the ratio of area of inner to outer
circle?
Ans: 1 : 2
4.In the following figure: A B C
D
EFG

H
I
Each of the digits 1, 2, 3, 4, 5, 6, 7, 8, and 9 is:
a)Represented by a different letter in the figure above.
b) Positioned in the figure above so that each of A + B + C,C + D +E,E + F + G, and G +
H + I is equal to 13.
Which digit does E represent?
Ans: E is 4
5.There are 12 boys and 15 girls, How many different dancing groups can be formed with
2 boys and 3 girls.
48Which of the following fractions is less than 1/3
(a) 22/62
(b) 15/46
(c) 2/3
(d) 1
Ans: (b)
6.One of Mr. Horton,his wife,their son,and Mr. Horton's mother is a doctor and another is
a lawyer.
a)If the doctor is younger than the lawyer, then the doctor and the lawyer are not blood
relatives.
b)If the doctor is a woman, then the doctor and the lawyer are blood relatives.
c)If the lawyer is a man, then the doctor is a man.
Whose occupation you know?

Ans: Mr. Horton:he is the doctor.


7.A person wants to buy 3 paise and 5 paise stamps costing exactly one rupee. If he buys
which of the following number of stamps he won't able to
buy 3 paise stamps.
Ans: 9
8.Mr. and Mrs. Aye and Mr. and Mrs. Bee competed in a chess tournament.Of the three
games played:
a)In only the first game werethe two players married to each other.
b)The men won two games and the women won one game.
c)The Ayes won more games than the Bees.
d)Anyone who lost game did not play the subsequent game.
Who did not lose a game?
Ans:Mrs.Bee did not lose a game.
9.Two cars are 15 kms apart. One is turning at a speed of 50kmph and the other at
40kmph . How much time will it take for the two cars to meet?
Ans: 3/2 hours
10.Three piles of chips--pile I consists one chip, pile II consists of chips, and pile III
consists of three chips--are to be used in game played by
Anita and Brinda.The game requires:
a)That each player in turn take only one chip or all chips from just one pile.
b)That the player who has to take the last chip loses.
c)That Anita now have her turn.

From which pile should Anita draw in order to win?


Ans:Pile II
11. 9.In a class composed of x girls and y boys what part of the class is composed of girls
A.y/(x + y)
B.x/xy
C.x/(x + y)
D.y/xy
Ans:C
12.One of the following is my secret word:AIM DUE MOD OAT TIE.With the list in
front of you, if I were to tell you any one of my secret word,
then you would be able to tell me the number of vowels in my secret word.Which is my
secret word?
Ans:TIE

13.If the operation,^ is defined by the equation x ^ y = 2x + y,what is the value of a in 2 ^


a=a^3
A.0
B.1
C.-1
D.4
Ans:B
14.A coffee shop blends 2 kinds of coffee,putting in 2 parts of a 33p. a gm. grade to 1
part of a 24p. a gm.If the mixture is changed to 1 part

of the 33p. a gm. to 2 parts of the less expensive grade,how much will the shop save in
blending 100 gms.
A.Rs.90
B.Rs.1.00
C.Rs.3.00
D.Rs.8.00
Ans:C
15.There are 200 questions on a 3 hr examination.Among these questions are 50
mathematics problems.It is suggested that twice as much time be
spent on each maths problem as for each other question.How many minutes should be
spent on mathematics problems
A.36
B.72
C.60
D.100
Ans:B

16.In a group of 15,7 have studied Latin, 8 have studied Greek, and 3 have not studied
either.How many of these studied both Latin and Greek
A.0 B.3 C.4 D.5
Ans.B
17.If 13 = 13w/(1-w) ,then (2w)2 =
A.1/4
B.1/2

C.1
D.2
Ans:C
18. If a and b are positive integers and (a-b)/3.5 = 4/7, then
(A) b < a
(B) b > a
(C) b = a
(D) b >= a
Ans: A
18. In june a baseball team that played 60 games had won 30% of its game played. After
a phenomenal winning streak this team raised its average
to 50% .How many games must the team have won in a row to attain this average?
A. 12
B. 20
C. 24
D. 30
Ans: C
19. M men agree to purchase a gift for Rs. D. If three men drop out how much more will
each have to contribute towards the purchase of the gift/
A. D/(M-3)
B. MD/3
C. M/(D-3)
D. 3D/(M2-3M)

Ans: D
20. A company contracts to paint 3 houses. Mr.Brown can paint a house in 6 days while
Mr.Black would take 8 days and Mr.Blue 12 days. After 8
days Mr.Brown goes on vacation and Mr. Black begins to work for a period of 6 days.
How many days will it take Mr.Blue to complete the contract?
A. 7
B. 8
C. 11
D. 12
Ans:C
21. 2 hours after a freight train leaves Delhi a passenger train leaves the same station
travelling in the same direction at an average speed of
16 km/hr. After travelling 4 hrs the passenger train overtakes the freight train. The
average speed of the freight train was?
A. 30
B. 40
C.58
D. 60
Ans: B
22. If 9x-3y=12 and 3x-5y=7 then 6x-2y = ?
A.-5
B. 4
C. 2
D. 8
Ans: D

23. There are 5 red shoes, 4 green shoes. If one draw randomly a shoe what is the
probability of getting a red shoe
Ans: 5c1/ 9c1
24. What is the selling price of a car? If the cost of the car is Rs.60 and a profit of 10%
over selling price is earned
Ans: Rs 66/-

25. 1/3 of girls , 1/2 of boys go to canteen .What factor and total number of classmates go
to canteen.
Ans: Cannot be determined.
26. The price of a product is reduced by 30% . By what percentage should it be increased
to make it 100%
Ans: 42.857%
27. There is a square of side 6cm . A circle is inscribed inside the square. Find the ratio of
the area of circle to square.
Ans: 11/14
28. There are two candles of equal lengths and of different thickness. The thicker one
lasts of six hours. The thinner 2 hours less than the
thicker one. Ramesh lights the two candles at the same time. When he went to bed he saw
the thicker one is twice the length of the thinner one. How
long ago did Ramesh light the two candles .
Ans: 3 hours.
29. If M/N = 6/5,then 3M+2N = ?

30. If p/q = 5/4 , then 2p+q= ?


31. If PQRST is a parallelogram what it the ratio of triangle PQS & parallelogram
PQRST .
Ans: 1:2
32. The cost of an item is Rs 12.60. If the profit is 10% over selling price what is the
selling price ?
Ans: Rs 13.86/33. There are 6 red shoes & 4 green shoes . If two of red shoes are drawn what is the
probability of getting red shoes
Ans: 6c2/10c2
34. To 15 lts of water containing 20% alcohol, we add 5 lts of pure water. What is %
alcohol.
Ans : 15%
35. A worker is paid Rs.20/- for a full days work. He works 1,1/3,2/3,1/8.3/4 days in a
week. What is the total amount paid for that worker ?
Ans : 57.50
36. If the value of x lies between 0 & 1 which of the following is the largest?
(a) x
(b) x2
(c) -x
(d) 1/x

Ans : (d)
37. If the total distance of a journey is 120 km .If one goes by 60 kmph and comes back
at 40kmph what is the average speed during the journey?
Ans: 48kmph
38. A school has 30% students from Maharashtra .Out of these 20% are Bombey
students. Find the total percentage of Bombay?
Ans: 6%
39. An equilateral triangle of sides 3 inch each is given. How many equilateral triangles
of side 1 inch can be formed from it?
Ans: 9
40. If A/B = 3/5,then 15A = ?
Ans : 9B
41. Each side of a rectangle is increased by 100% .By what percentage does the area
increase?
Ans : 300%
42. Perimeter of the back wheel = 9 feet, front wheel = 7 feet on a certain distance, the
front wheel gets 10 revolutions more than the back
wheel.What is the distance?
Ans : 315 feet.
43. Perimeter of front wheel =30, back wheel = 20. If front wheel revolves 240 times.
How many revolutions will the back wheel take?
Ans: 360 times

44. 20% of a 6 litre solution and 60% of 4 litre solution are mixed. What percentage of
the mixture of solution
Ans: 36%
45.City A's population is 68000, decreasing at a rate of 80 people per year. City B having
population 42000 is increasing at a rate of 120 people per year. In how many years both
the cities will have same population?
Ans: 130 years
Retrieved from "http://www.freshersonline.com/wiki/Aptitude_Questions_I"

Sample test paper conducted on 10th sep 2003.


1.

write the program/algorithm or pseudo code to do

following operation given matrix


Input Matrix
123
456
789
Output Matrix
987
654
321
the algo or program should be able to do this.

2.

Hotel owner to teacher: u know that mohan came here with 3 girl friends. if

multiply their ages the result will be 2450. and the sum of their ages is equal to u'r age.
the eldest girl is elder than mohan can u tell me mohan age.
3.

One more quetion answer approach is 2+3+.....127

ans: 137 (check it)


4.

One more quetion about 4 ships do it well ther are 7 conditions and 7th condition

will not be
satisfied.dont go for that consider the first 6 conditions
Interview questions:
5.

differecne b/w c and c++.

6.

polymorphism, decalring functions in structures,virtual base class.

7.

If it is HTML

8.

statements

A: I'am a doctor B is a barber and C is the taxi driver.


B: I'am an employee of water works dept, A is the taxi driver and
C is the doctor.
C: I'am a lawyer A is a taxi driver and B is the doctor.Who is the thief?
Ans:.......................
9.

In one country they prefer only boys to have. If it is a girl in the

first birth then there must be the other child to have,


if it is also a girl then they will go for the next birth and stops when
they got the boy. Then what is the proportion of
girl to boys in that country?
Ans: (n+1)/2:1
10.

While three friends Abe, Bob, Cort in a restaurant taking their snacks one lady

came and she asked them how many


children you have. One of them replied "By looking at the total number of children we
have you can uniquely identify
the no of children I'am having" but she failed to guess then he made the following
statements Abe is having atleast one
girl and twice as many boys as girls. Bob is having atleast one girl and thice as many
boys as girls. Cort is having
three more than boys that he have girls The no of children they have is less than 25.Who
has replied to that lady and
how many children he have. How many total no of children they have? Ans: Abe, and is
having 3children (1G+2B),
total is 12

iGate test conducted on 16.10.2004. at Crescent engineering college


Aptitude
1.

Select the odd one

(a) January (b) February (c) Wednesday (d) November


2.

Select the antonym of capture from the following

(a) attack (b) Release (c) condemn (d) None of the above
3.

Find the antonym of autumn

(a) Spring (b) Winter (c) Summer (d) None of the above
4.

One skirt requires 3.75 yards of cloth. How many skirts you can make from 45

yards?
Ans: 12 skirts
5.

Last month of an year

(a) January (b) February (c) December (d) November


6.

Is the meaning of Client and Customer,

(a) same (b) contradictory (c) no relation


7.

Is the meaning of Canvas and Canvass,

(a) same (b) contradictory (c) no relation


8.

Is the meaning of Ingenious and Ingenuous,

(a) same (b) contradictory (c) no relation


9.

Is the meaning of Credible and Credulous,

(a) same (b) contradictory (c) no relation


10.

Select the odd one out.

(a) 1/4 (b) 1/3 (c) 1/6 (d) 1/18


11.

Select the least from the following.

(a) 0.99 (b) 1 (c) 81 (d) 0.333


12.

Find the next number in the series. 1, 0.5, 0.25, 0.125

Ans: 0.0625
13.

One do llar is saved in one month. Then how much dollar is saved in one day?

Ans: 1/30 =0.0333$


14.

Y catches 5 times more fishes than X. If total number of fishes caught by X

and Y is 48, then number of fishes caught by X?


Ans: 8
15.

If a train covers 600m in 0.5 seconds, how long it will cover in 10 seconds?

Ans: 3000m = 3km

16.

The girl's age is twice that of boy, if the boy is four years old. After four years

the age of the girl is


Ans: 12 years
17.

Sister's age is twice than that of the brother. If the brother's age is six, what is

the sister's age after two years?


Ans: 14 Yrs.
18.

Two lemons cost 10 cents. Then one and a half dozen cost

Ans: 90 cents
19.

A clock is late by 1 minute 27 seconds in a month. Then how much will it be

late in 1 day?
Ans: 2.9 seconds
20.

Opposite of Remote?

(a) Far (b) Near (c) Huge (d) Village


21.

Statement A: All great men are ridiculous; Statement B: I am ridiculous ;

Inference : I am a great man;


(a) True (b) False (c) Not clear
22.

Statement: Normal children are active; Inference: All children are active;

(a) True (b) False (c) Uncertain


23.

Next number in the series 1, 1/2, 1/4, 1/8 ?

Ans: 1/16
24.

In 6 seconds a light flashes once. In one hour how many times it will flash?

Ans: 601 times


25.

At 20% discount, a cycle is sold at a selling price of 2500 Rs. What is the

actual price?
Ans: Rs. 3125
26.

Statement A: A & B have same age; Statement B: B is younger than C;

Inference : A is younger than C;


(a) True (b) False (c) Uncertain
27.

A invests $12000, B invests $8000, C invests $6000 and they got a profit of

$1200. How much share A got more than B and C?


Ans: 2/13 and 3/13
Technical

Questions contain Electronics and Computer Science

1.

Full form of TTL and CMOS

2.

Which is a good conductor (Extrinsic or Intrinsic)

3.

What are the different types of capacitors (Electrolytic, dielectric...etc)

4.

Select a passive component from the following (four choices were there)

5.

Minimum no. of lines required for communication using RS232

6.

To convert 1's complement to 2's complement and vice versa

7.

During which time we use 'size of' command.

8.

Out of four choice we have to identify which is a macro.

9.

There was one pointer _expression related question.

10.

To find post fix _expression.

11.

What type of operating system is unix

a)pre-emptive b)non-preemptive c)batch


12.

Where we use DFD(Data flow design)

a)structural languages b)object oriented languages c)UML d)none of these


13.

Name the error which occurs when we write on a page

a) segment fault b)permission fault c) page fault


14.

A question based on the representation of an array in C An array whose

elements are fn pointers which inturn returns a character

TCS PAPER
Synonym and antonym
1.Harbinger forerunner, portent, indication
2.Cacophony dissonance, disharmony
3.Divulge reveal, disclose
4.Clutch grasp, grab, clasp, hold
5.Acronym short form, contraction, ellipsis
6.Illustrious memorable, wellknown, famous
7.Prolific productive, abundant
8.Divergent different, deviating, conflicting
9.Jaded world-weary, tired, lackluster, worn-out, exhausted, bored, fed up
10. Mien appearance, demeanor
11. Mitigate alleviate, ease, lessen, soften, allay, moderate
12. Ambitious determined, grand, striving
13. Aberration deviation, abnormality, eccentricity, oddness
14. Foray raid, sortie, incursion, attack, venture
15. Denounce condemn, accuse, criticize
VERBAL SECTION:Directions for questions 1-15:Find the synonyms of the following words.
Synonyms: (Ref: Barrons Synonyms and Antonyms)
Ponderous heavy, tedious, cumbersome
Mundane ordinary, dull, monotonous, dreary
Icon image, idol, emblem, symbol
Brackish salty, briny
Mollify placate, pacify, calm, appease, soothe
Depreciation reduction, decline
Equanimity composure, poise, calmness, self-control

Gist general idea, substance, essence


Gaudy garish, flashy, extravagant, loud, showy, colorful
Awry skewed, crooked, wrong
Repartee banter, joking, word play
Boisterous energetic, animated
Ungainly clumsy, awkward, ungraceful, miserly, mean, inelegant, gawky
Whimsical fanciful, unusual, quirky, capricious
Asperity roughness, severity, brusqueness
Cavil quibble, complain, niggle, split hairs, carp
Quixotic idealistic, romantic, dreamy, unrealistic, impracticable
Profound deep, intense, thoughtful, reflective, philosophical, weighty, insightful
Incorrigible - habitual, persistent, inveterate, hopeless
Musty mildewed, moldy, stale, rank, fusty, stuffy
Waif stray, thing, lose, urchin, orphan
Irk displease, vex, annoy, trouble, bother, nag, rile
Interdict prohibit, veto, injunction, bar, embargo
Cohere - hold together
Rupture - break
Moribund dying, declining, waning
Dcollet low necked, revealing
Callow inexperienced, immature, youthful
Balmy mild, clement, pleasant
recalcitrant unruly, disobedient, obstinate, stubborn
guile cunningness, deviousness, slyness, cleverness, wiliness, astuteness

Antonyms
1.Compose x disturb
2.Pristine
x sullied
3.Turbid
x limpid
4.Monetary x non-economical
5. Revere
x threaten
6.Hamper
x facilitate
7.Transient x permanence
8.Fascinate x mundane
9.Fickle
x loyal
10.Contraband x legal goods
11.Repellent x attractive
12.Slur
x grace
13.Protean x constant
14.Hidebound x broadminded
15.Precipitate x dilatory/contradictory
Sentence completion
A passage is given with multiple blanks. There was a passage abt Artists,abt Money mgmt,abt
Cleanliness

SYNONYMS AND ANTONYMS.


Censure fault, criticize
Optimum best, most favorable
Candid frank, open, blunt, upfront, forth-right
Cite quote, name, mention, refer to, allude to
Effusive demonstrative, fussy, talkative, overenthusiastic, vociferous, extroverted

Voluble articulate, vociferous, talkative


Banal commonplace, trivial, predictable, trite, hackneyed
Standing rank, permanent, position, duration, status, reputation, eminence
Nascent budding, emerging, blossoming, embryonic
Clutch grasp, grab, hold
Generic general, basic, common
Empirical experimental, pragmatic, practical
Anomaly irregularity, glitch, difference
Circuitous roundabout, twisty, meandering, indirect, winding, tortuous
Surveillance observation, watch, shadowing
Objective aim, impartial, real, purpose, goal
Raucous rough, wild, hoarse, guttering
Voracious insatiable, avid, hungry, big, rapacious, greedy
Pedigree rare-breed, full-blooded, lineage
Fidelity loyalty, reliability
Augment supplement, boost, add to, bump up
Precarious unstable, shaky, risky, uncertain
Derogatory disparaging, critical, insulting, offensive
Onus responsibility, burden, obligation, duty
Analogous - similar, akin, related
Expedient measure, convenient, device, maneuver
Compliance fulfillment, obedience
Diffident shy, insecure, timid
Plaintive mournful, sad, melancholic, nostalgic, lamenting
Insinuate imply, suggest, make-out, ingratiate yourself
Misdemeanor wrong, sin, crime, offense
Exonerate clear, forgive, absolve
Gregarious outgoing, extroverted, sociable, expressive, unreserved
Benign kind, benevolent, compassionate
Attenuate satisfy, calm, soothe, ease
Sonorous loud, deep, resonant, echoing
Bolster boost, strengthen, reinforce, encourage
Heterodox unorthodox, dissenting, contrary to accepted belief, heretical, deviating
Restiveness impatience, restlessness, nervousness
Effigy image, statue, model
Retrograde retrospective, traditional, conservative, nostalgic,forward-looking(antonym)
Sacrosanct sacred, holy, revered
Dangle hang down, sway, droop, swing, suspend
Cryptic mysterious, enigmatic, puzzling, hidden
Debilitate incapacitate, weaken, hamper, encumber, hinder
Divulge reveal, disclose
Spendthrift wastrel, squanderer, compulsive shopper
Indigenous native, original, local
Erroneous mistaken, flawed, incorrect
Minion follower, subordinate, underling, gofer
Veracity reality, truth, sincerity

VERBAL REASONING
SYNONYMS:
1. CIRCUMSPECT
(i) CONDITION (ii) INSPECT (iii) CAUTIOUS (IV) RECKLESS
2. ABYSMAL - terrible
(i) SLIGHT (ii) DEEP (iii) ILLUSTRIOUS (iv) PROLIFIC
3. DILIGENT hardworking, industrious, meticulous, careful
(i) INTELLIGENT (ii)..(iii)(iv)
4.VEHEMENT
(i) PASSIONATE (ii) CONFESY (iii) NOISY (iv) MOQULIS
5) IMPETUS
(i) CONNECT
(ii) CRUCIAL
(iii) STIMULUS (iv) IMMEDIATE
6) ACRONYM
(i) ABBREVIATION (ii) SIMILAR
7) DISSEMINATE
(i) FORECAST (ii) SPREAD (iii) BRANSP
8) HARBINGER
(i) NAVAL (ii) UNCOMMON (iii) FORE RUNNER (iv) GLORY
ANTONYMS:
1) TRACTABLE
(i) OBJECTIONABLE (ii) ENJOYABLE (iii) ADAPTABLE (iv) OBSTINATE
2) COVERT
(i) MANIFEST (ii) INVISIBLE (iii) SCARED (iv) ALTER
3) PENSIVE
(i) REPENTENT (ii) SAD (iii) THOUGHTLESS
(iv) CARELESS
4) MITIGATE
(i) AGGRAVATE (ii) RELIEVE (iii) ELEMINATE
(iv) EXHUMAN
5) DIVERGENT
(i) CONTRARY
(ii) COMING TOGETHER
(iii) CONVERSANT
(iv) CONTROVERSY
6) DOGMATIC
(i) SCEPTICAL (ii) RESILIENT (iii) STUBBORN (iv) SUSPICIOUS
7) CLUTCH
(i) HOLD (ii) GRAB (iii) RELEASE
(iv) SPREAD
8) MOTLEY
(i) BULKY (ii) SPECKLED (iii) HOMOGENEOUS (iv) DIFFERENT
9) RELINQUISH
(i) PURSUE
(ii) VANQUISH (iii) DESTROY
(iv) DEVASTATE
10) TRANSIENT
(i) PERMANENT
(ii) REMOVED
TCS PAPER ON 1st APRIL

admonish = usurp (reprove)


merry = gay
alienate = estrange (isolate)
instigate = incite
dispel
= dissipate (dismiss)
1. Furtive
- stealthy (secret)
belief
=
conviction
2. Pretentious
- ostentatious (affected)
covet
= crave (desire)
3. Incentive
- provocation
belated
= too late - prudence
4. Discretion
solicit
= beseech (seek)
5. Meager
- scanty
brim
=
border
6. Cargo
- freight (load)
subside
=
wane
(drop)
7. Baffle
- frustrate
renounce
8. Efface= reject - obliterate (wipe out)
hover
= linger (stay close)
9. Lament
- mourn
divulge
= reveal
10. Compunction
- remorse (regret)
heap
= to pile (collect)
11. Amiable
- friendly
adhesive
= tenacious- coax, flatter
12. Cajole
veer
diverge (turn)- hug (hold-cuddle)
13. =Embrace
hamper
= obstruct - potential
14. Latent
caprice
=
whim (impulse)
15. Confiscate
- appropriate (to take
tocharge)
merit = to deserve
stifle
= suffocate (smother)
16. Emancipate
- liberate
inert
=
passive
17. Misery
- distress
latitude
= scope
18. Annihilate
- to destroy
momentary
= transient
20. Acumen
- exactness
tranquil
= serene (calm)
21. Metamorphosis
- transform
admonish
=
cautious
22. Scrutiny
- close examination
efface
= obliterate(wipe
out)
23. Obstinate
- stubborn
conciliation=
make
less
angry
or more friendly
24. Fuse
- combine
intermittent
then starting
25. Whet = stopping
- and
sharpen
preponderant= superiority of power or quality
vacillate = undecided or dilemma
deprecate = feel and express disapproval
assess = determine the amount or value
litigation = engaging in a law suit
negotiate = discuss or bargain
expedient = fitting proper, desirable
conglomeration = group, collection
connotation = suggest or implied meaning of
expression

discretion = prudence
compunction = remorse (regret)
amiable = friendly
cajole = coax (wheedle sweet talk)
incentive
= provocation
1.
Momentary
transient
embrace
=
hug
(hold-cuddle)
2. Latitude
scope
latent
= potential 3.
Heap
to pile (collect)
confiscate
=
appropriate
(to
take charge)
4. Adhesive
tenacious
emancipate
= liberate5.
Veer
diverge (turn)
lament
=
mourn
6. Concur
agree (accept)
confiscate
=
appropriate
7. Subside
wane (drop)
obstinate
= stubborn 8.
Enounce
reject
acumen
=
exactness
9. Hover
linger (stay close)
metamorphosis
= transform
10.
Tranquil
serene (calm)
scrutiny
=
close
examination
11. Admonish
usurp (reprove)
annihilate
= to destroy
12.
Alienate
estrange (isolate)
whet
= sharpen
13.
Instigate
dissipate (dismiss)
behest
= request
14.
Belief
conviction
adage
=
proverb
15. Covet
crave (desire)
penitence
16.
Belated= to repeattoo late
lethargy
17.
Solicit= stupor (lazy)
beseech (seek)
volume
=
quantity
18. Brim
border
furtive
= stealthy (secret)
19.
Divulge
reveal
meager
= scanty
20.
Tamper
obstruct
cargo
= freight(load) 21.
Caprice
whim (impulse)
baffle
=
frustrate
22. To merit
to deserve
pretentious
23.
Stifle = ostentatious(affected)
suffocate
volatile = ever changing
(smother)
expedite
= hasten
24.
Lethargy
stupor (lazy)
surplus = excessive
affinity = strong liking
fluctuation = wavering
empirical = experimental
retrospective = review
fallible = liable to error
egregious = bad
truncate = shorten by cutting
decomposition = rotten
equivocate = lie, mislead

1] Depreciation = deflation, depression,


devaluation
2] Deprecate = feel and express disapproval
3] Incentive
= thing one encourages one to do
4] Echelon
= level of authority or
responsibility
5] Innovation = make changes or introduce
new
things
6] Intermittent = externally stopping and
then
starting
7] Detrimental = harmful
8] Conciliation = make less angry or more
friendly
9] Orthodox = conventional or superstitious
10] Fallible
= liable to errors
12] Volatile = ever changing
13] Manifestation = clear or obvious
14] Connotation = idea
15] Reciprocal = reverse, opposite
16] Agrarian
= related to agriculture
17] Vacillate
= undecided or dilemma
18] Simulate = produce artificially resembling
an existing one
20] Access
= to approach
21] Compensation= salary
22] Truncate
= shorten by cutting
23] Adherence = stick
24] Heterogeneous = non-similar things
25] Surplus
= excessive

26] Assess
= determine the amount or
value
27] Cognizance = knowledge
28] Retrospective = review
29] Naive
= innocent , rustic
30] Equivocate = tallying on both sides
31] Postulate
= frame a theory
32] Latent
= potential
33] Fluctuate
= wavering
34] Eliminate = to reduce
35] Affinity
= strong liking
36] Expedite
= hasten
37] Console
= to show sympathy
38] Adversary = opposition
39] Affable
= lovable, approachable
40] Decomposable = rotten
41] Egregious
= especially bad
42] Conglomeration = group
43] Aberration
= deviation
44] Erudite
= wise, profound
45] Augury
= prediction
46] Credibility
= ability to common
belief, quality of being credible

1. Admonish= usurp
2. Alienate = estrange
3. Belief = conviction
4. Baffle = puzzle
5. Brim = edge
6. Covet = to desire
7. Caprice = whim
8. Concur = agree
9. Confiscate = appropriate
10. Cargo = load, luggage
11. Dispel = scatter
12. Divulge = reveal, make known, disclose
13. Discretion = prudence
14. Emancipate = liberate
15. Efface = obliterate
16. Embrace = hug, hold, cuddle
17. Furtive = stealthy
18. Hamper = obstruct
19. Heap = to pile
20. Hover = linger

21. Incentive = spur


22. Instigate = incite
23. Inert = passive
24. Latitude = freedom from narrow
limitations
25. Lament = wail
26. Momentary = for small time
27. Merit = to deserve
28. Miserable = unhappy, sad
29. Obstinate = stubborn
30. Overt = obvious, clear, explicit, open
31. Pretentious = ostentatious
32. Potential = latent
33. Renounce= give up, reject
34. Solicit = Humble, urge
35. Subside = settle down, descend
36. Stifle = suppress, extinguish
37. Tranquil = calm, silent, serene
38. To merit = to deserve
39. Volume = quantity
40. Veer = change in direction

Choose the word or phrase that is most nearly similar in meaning to the word in capital
letters.
11. RIFE
(1) direct (2) scant

(3) peaceful

12. APOCALYPTIC
(1) insular (2) complaisant

(4) grim

(3) crass

13. CAVIL
(1) starry (2) criticize

(3) cold

14. BLAND
(1) caustic (2) meager

(3) soft

(5) mature

(4) prophetic (5) false


(4) fundamental

(4) uncooked

(5) porous

(5) helpless

15 CORROBORATE
(1) confirm
(2) orate

(3) disturb

(4) apply

16. JAUNTY
(1) youthful (2) ruddy

(3) strong

(4) untravelled

(5) whisper
(5) sedate

17. BOISTEROUS
(1) successful (2) democratic (3) noisy

(4) ambitious

(5) lamentable

18.TENUOUS
(1) vital (2) thin (3) careful (4) dangerous (5) necessary
19. ALIMENTARY
(1) nourishing (2) prior

(3) exterior

(4) private (5) cautious

20.DELETERIOUS
(1) delaying (2) experimental (3) harmful (4) graduating (5) glorious
Answers
11.(2)
14.(4)
17.(3)
20.(3)

12.(4)
15.(1)
18.(2)

13.(2)
16.(5)
19.(1)

The exam had three sets-X,Y,Z i got Z which was the toughest
section A was english,
there was paragraph making which i cud not do it was very tough, so i guessed the
answers and hoped atleast few hits the target the RC had a passage from pg 99 of barons,i
had practiced all the barrons RC aand it helped .
i wud recommend the same for all as if u hv practiced the RC it saves a lot of time and
TCS keeps repeating the RC from Barrons.Infact instead of remembering all th ewords
from barrons its better to remember all the RCs as u will get 6 marks without wasting ne
time whereas others may hv to waste 15-20 mins on RC
aptitute was easy,just do ne previous yr question,they repeat the same questions again and
again,infact just remember all the answers as i had done,i helps..............
And yes there were few wrong questions and u need not waste time on them
Critical reasoning was from 12th edition Barrons model test papers.......
1>>toll brigde prob
2>>red and brown marriage
3>>>All A's is B's......
THE interview from a cool affair......
1>First was tell me something abt urself:
ans>blah blah

2> write the code for bubble sort


ans>wich i wrote
3>then he asked me wats function overloading,function overriding,function
signature,virtual function....
4>difference b/w public,protected and private
5>diff b/w yagi-uda and normal anteena
6>B.W. range of FM
7>wat r cipher and encryption(my project was on nt security)
8>wats a IC
9>truth table of XOR gate and its apllication(ADDER ckt)
10>wats i/p bias current
the HR round was nothing as he just asked meaning of my name and my background and
y i choosed Electronics
The results were out the nxt day and i was selected and so were 297 other students from
my coll
MY ADVICE TO ALL WUD B TO REMAIN COOL AND DNT PANIC AT
INTERVIEW.TCS GUYS ARE VERY FRIENDLY AND THEY TAKE BODY LNAG
VERY SERIOUSLY,SO B SOBER BUT CONFIDENT AND YES SPEAK GUD
ENGLISH
BY,

TCS PAPER AT NIT,BHOPAL


You can refer to Barrons most frequently used words list for a close recap.
Vocabulary Section:
(Time : 28 mins)
Synonyms 1.Moribund declining, dilapidated, waning
2.Repudiate reject, disclaim, renounce, deny
3.Translucent transparent, semi- transparent, lucid, lucent, clear, see through
4. Mitigate- alleviates, lessen, ease, alley, tune down, dull, Assuage
5. Inundate flood, overwhelm, swamp
6. Bilk deceive, trick, swindle, con
7.Nettle annoy, irritate, vex

8.Impugn hold responsible, charge, censure, accuse


9.Mulch
10.Tenacity stubbornness, resolve, firmness, persistence, insistence, determination
11.Sobriety temperance, moderation, abstemiousness, soberness
12.Degrade shame, disgrace, mortify, humiliate
13.Hidebound - narrow-minded, conservative, prejudiced
14.Waif stray, sole, thing
15.Hamper basket, hinder
16.Retrograde nostalgic, retrospective, traditional and conservative
17.Despondent hopeless, low, dejected
18.Debacle disaster, tragedy, catastrophe
19.Nebulous vague, hazy, unformulated, tenuous
20.Inconsistent conflicting, contradictory, unreliable , incompatible, inhoherent
21.Paradox inconsistency, irony, absurdity

Exercise 1:
The passage given below is followed by questions based on its content. Read
the passage & choose the best answer 4 the questions
The Death Car
It was cold night in September. The rain was drumming on the car roof as George &
Marie Winstion drove through the empty country roads towards the house of their
friends, the Harrissons, where they were going to attend a party to celebrate the
engagement of the Harrisons daughter, Lisa. As they drove, they listened to the local
radio station, which was playing classical music. They were about 5 miles from the
destination when the music on the radio was interrupted by a news announcement: The
Cheshire police have issued a serious warning after a man escaped from Colford Mental
Hospital earlier this evening. The man, John Downey, is murderer who killed 6 people
before he was captured 2 years ago. He is described as large, very strong & extremely
dangerous. People in the Cheshire area are warned to keep their doors & windows locked,
& to call the police immediately if they se anyone acting strangely. Marie shivered, A
crazy killer. And hes out there somewhere. Thats scary.Dont worry about it, said
her husband. Were nearly there now. Anyway, we have more important things to worry
about. This car is losing power for some reasonit must be that old problem with the
carburetor, If it gets any worse, well have to stay at the Harrisons tonight & get it fixed
before we travel back tomorrow, As he spoke, the car began to slow down, George
pressed the accelerator, but the engine only coughed. Finally they rolled to a halt, as the
engine died completely, Just as they stopped, George pulled the car off the road, & it
came to rest under a large tree. Blast! said George angrily. Now well have to walk in
the rain. But thatll take us an hour at least, said Marie. And I have my high-held
shoes & my nice clothes on. Theyll be ruined! Well, youll have to wait while I run to
the nearest house & call the Harissons. Someone can come out & picks us up, said
George. But George! Have you forgotten what the radio said? Theres a homicidal
maniac out there! You cant leave me alone here! Youll have to hide in the back of the
car. Lock all the doors & lie on the floor in the back, under this blanket. No-one will see
you, when I come back, Ill knock 3 times on the door. Then you can get up & open it.
Dont open it unless you here 3 knocks. George opened the door & slipped out into the

rain. He quickly disappeared into the blackness. Marie quickly locked the doors & settled
down under the blanket in the back for a long wait. She was frightened & worried, but
she was a strong-minded woman. She had not been waiting long, however, when she
heard a strange scratching noise. It seemed to be coming from the roof of the car. Marie
was terrified. She listened, holding her breath. Then she heard 3 slow knocks, one after
the other, also on the roof of the car. Was it her husband? Should she open the door?
Then she heard another knock, and another. This was not her husband. It was somebody-or something--else. She was shaking with fear. But she forced herself to lie still. The
knocking continued-- bump, bump, bump, bump Many hours later, as the sun rose, she
was still lying there. She had not slept for a moment. The knocking had never stopped, all
night long. She did not know what to do. Where was George? Why had he not come for
her?
Suddenly, she heard the sound of 3 or 4 vehicles, racing quickly down the road. All of
them pulled up around her, their tires screeching on the road. At last! Some one had
come! Marie sat up quickly & looked out the window.
The 3 vehicles were all police cars, & 2 still had their lights flashing. Several policemen
leap out. One of them rushed towards the car as Marie opened the door. He took her by
the hand.
Get out of the car & walk with me to the police vehicle. miss. Youre safe now. Look
straight ahead. Keep looking at police car. Dont look back. Just dont look back.
Something in the way he spoke filled Marie with cold horror. She could not help herself.
After 10 yards from the police car, she stopped, turned & looked back at the empty
vehicle.
George was hanging from the tree above the car, a rope tied around his neck. As the wind
blew his body back & forth, his feet were bumping gently on the roof of the car-- bump,
bump, bump, bump
1) What was the reason for the news announcement on the radio?
a) 6 people. Including John Downey, had been murdered?
b) A dangerous prisoner had escaped
c) The police were warning of accidents on the roads in the bad weather
d) Some people had bens en acting strangely in the Cheshire area

2) What did George think was causing trouble with the car?

a) The carburetor
b) The rain drumming on the roof
c) The accelerator
d) He had no idea

3) Why did he pull the car off the road?


a) To have a rest
b) To go for a walk
c) To walk to the nearest house
d) It broke down

4) Why did Marie stay in the car when George left?


a) She was afraid to go out in the dark
b) So no one could steel the car
c) Her clothes werent suitable for the rain
d) She wanted to get some sleep

5) Where did George set off to walk?


a) The mental hospital
b) The nearest house
c) The Harrisons house
d) The police station

6) What made Marie so frightened as she waited in the car?


a) There was a strange sound coming from the roof
b) She could see a man strangely outside the car
c) Some police cars came racing down the road
d) She was afraid of the rain and the dark

Exercise 2:
Each sentence below has 1 or 2 blanks each blank indicating that
something has been omitted. Beneath the sentence are some words. Choose the word
for each blank that best fits the meaning of the sentence as a whole

7) Athletes have so perfected their techniques in track and field events that the
_________ becomes _________ before record books
a) Announcement public
b) Meet.official
c) Time.authentic
d) Fantastic...common place

8) A________ child, she was soon bored in class; she already knew more mathematics
than her junior school teachers
a) Obdurate
b) Precocious
c) Recalcitrant
d) Contemporary

9) The subtle shades of meaning, & still subtler echoes of association, make language an
instrument which scarcely anything short of genius can wield with ____________ &
________________
a) Confidence----------aloofness
b) Definiteness---------certainty
c) Sincerity--------------hope
d) Eloquence------------ruthlessness

10) Unwilling to admit that they had been in error, the researchers tried to_______ tried
case with more data obtained from dubious sources
a) Ascertain
b) Buttress
c) Refute
d) Dispute

11) His one vice was gluttony & so it is not surprising that as he aged he became
increasingly_______________
a) Despondent
b) Corpulent
c) Carping
d) Lithe
Exercise 3:
Please read all the questions in the table below (12-21) as one continuous
passage. Tick the varb with right tense or the correct word to fill in the gaps in each
of the sentences.

Statement
12) A famous singer had been contracted to
sign at a Paris opera house & ticket
sales_______________ booming.

Options
a) is
b) are
c) were

13) In fact, the night of the concert, the house


was packed; every ticket ________________

d) have been
a) is selling
b) was selling
c) sold
d) had been sold

14) The feeling of anticipation & excitement


a) took
was in the air as the house
manager__________ the stage & said, Ladies b) takes
& gentlemen, thank you for your enthusiastic
support!
c) had taken
15) I am afraid that due to illness, the man
whom youve all come to
hear________________ performing tonight

d) was taking
a) will not be
b) has not been
c) had not been
d) was not
a) are finding

16) However, we _________ a suitable


substitute who, we hope, will provide you
with comparable entertainment.

b) were finding
c) had found

17) The crowd____________ in


disappointment & failed to hear the announcer
mention the stand-ins name

d) have found
a) groans
b) groaned
c) had groaned

d) were groaning
18) The environment turned from excitement
to frustration

a) will give
b) had given

The stand-in performer__________ the


performance everything he had.
19) When he had finished, there was nothing
but an uncomfortable silence. No one
_____________

c) gave
d) gives
a) Applauded
b) Applauds
c) Was applauding

20) Suddenly, from the balcony, a little boy


stood up and____________, Daddy, I think
youre wonderful!

d) Has applauded
a)shouts
b) was shouting
c) had shouted

21) The crowd_________________ into


thunderous applause

d) shouted
a) breaks
b) broke
c) had broken
d) was breaking

Exercise 4:
From each group of sentences given below, indicate the sentence that
contains the error:

22) Group 1
a) Driving long distances causes sleepiness, & sleepiness causes serious accidents.
b) On a table at the rear of the room was a notebook, a pair of scissors, & a
biology textbook

c) Finally, there seems to be a growing interest in vegetarianism in this country


d) Either the local chief of police or his officers are guilty of violating the rights
of prisoners

23) Group 2
a) Simple cookbooks for inexperienced cooks have become quite popular in
recent years they are available at many bookstores
b) Some cookbooks, such as The Joy of cooking, have been classics for
generations
c) One popular cookbook is The Art of French Cooking, by Julia Child, a colorful
character who charmed television audiences for many years
d) The Art of French Cooking blends classic recipes with meticulous explanation;
ordinary cooks find the recipes manageable

24) Group 3
a) Around 50% of the forest are destroyed every year
b) The bus leaves tomorrow morning
c) A tiger is a dangerous animal
d) Can you please the sugar?

25) Group 4
a) There must be some mistake. I should have scored more marks
b) The number of trainees are hundred
c) 50% of the houses need repairs
d) The Commissioner, along with his family members was seen the party

26) Group 5
a) The scissors is very sharp
b) Congratulations are in order
c) One of the cases is open
d) She plays tennis well but shell never be a Steffi Graf

Exercise 5:
Please mark the correct statement from the pairs given below:

27) Pair 1
a) Repeated occurrences cannot be ignored
b) Repeated occurences cannot be ignored

28) Pair 2
a) We need to get a consensus on the decision
b) We need to get a concensus on the decision

29) Pair 3
a) Only authority personnel are allowed in this area
b) Only authorized personnel are allowed in this area

30) Pair 4
a) The actress decided to sue the sleazy tabloid for deformation of her character

b) The actress decided to sue the sleazy tabloid for defamation of her character

31) Pair 5
a) Everyone knows that Hogwarts in the Harry Potter series is a mythical school
b) Everyone knows that Hogwarts in the Harry Potter series is a legendary school

32) Pair 6
a) Most people think caffeine is not good for health
b) Most people think caffiene is not good for health

Exercise 6:
Select the best word/phrase/line to complete each sentence in the most
appropriate manner

33) Reemas bad-mouthing Peter only because she is jealous of him.


Means______________
a) Peter really is a nice person
b) Peter really is a mean person
c) Peter really is a difficult person
d) Peter really is a tough person

34) If some one is gung ho, they are_______


a) stupid
b) Childish

c) Enthusiastic
d) Loud

35) Mr. Hughes has been asked to___________ this difficult project because of his
experience working for many years in Iran
a) undergo
b) understand
c) undervalue
d) undertake

36) Stop talking to those angry men, you are just adding fuel to the fire is the same
as________
a) Stop talking to those angry men, you are just coming in the way
b) Stop talking to those angry men, you are just making it worse
c) Stop talking to those angry men, you are just adding to the noise
d) Stop talking to those angry men, you are just talking too much

37) Sudhirs work is behind schedule I think he bit more than he could chew is the
same as________
a) Sudhir has taken too much of work
b) Sudhir takes very long breaks
c) Sudhir does not know how to do the work
d) Sudhir is a lazy person

38) There are many__________ to our rules, and I do not think thats fair.

a) examples
b) exceptions
c) instances
d) provisions
Exercise 7:
Choose the correct / most appropriate word/s to fill in the gap in the
sentences given below.

39) I didnt set _________ to do this but Im pleased with the result.
a) in
b) out
c) on
d) down

40) This looks too heavy,______________ pick it up?


a) Can I
b) may I
c) need I
d) would I

41) I am glad so many people have passed the test. In fact, there were_________ who
havent.
a) little
b) a little

c) few
d) a few

42) Pope John Paul II ___________ more than 90 countries.


a) has visited
b) was visited
c) visits
d) has been visiting

43) I _____________ Carl since I ______________ a little child.


a) have known, have been
b) have known, was
c) knew, have been
d) knew, was

44) I wonder if _____________ will show up at the meeting?


a) someone
b) anyone
c) one
d) everyone

45) Have you given up______________.


a) to smoke

b) smoke
c) some smoking
d) smoking
TCS ENGLISH SAMPLE PAPER 23rd SEPTEMBER 2006 AT HYDERABAD
Word
Abysmal

Circumspect

Meaning
Adj. Bottomless Use : His arrogance is
exceeded only by his abysmal
ignorance
n. A word formed by the initial letters
of a multi-word name
v. warn strongly, reprove Use: He
admonished his listeners to change
their wicked ways
v. Investigation before acting,

Conciliation

Use: She tried always to be


circumspect
n. the act of placating

acronym
admonish

Connotation

covert

Covetous

Deprecate

Diligence

Synonyms
Terrible, awful,
dreadful, appalling,
very bad,
Contraction, ellipsis,

Antonyms
Superb

Reprove, reprimand,
chide, rebuke, usurp

Approve

Cutious, prudent,
careful, guarded, wary,
judicious, vigilant,

reckless

Appeasement,
pacification,
propitiation
n. Suggested or implied meaning of an Nuance, suggestion,
expression. Use: Foreigners frequently implication, undertone,
are unaware of the connotations of the overtone, subtext,
words they use.
Adj. secret or hidden, not openly
Clandestine, concealed,
practiced or vowed n. a covering that
stealthy, underground,
serves to conceal or shelter something copse, wood, thicket
Use: Investigations of CIA reveal that
such covert operations can get out of
control
Adj. avaricious, eagerly desirous of
envious, jealous,
Use: The child was covetous by nature desirous, greedy
and wanted to take the toys belonging
to his classmates
v. express disapproval of, protest
Denounce, deplore,
against, belittle Use: A firm believer of condemn, censure,
old-fashioned courtesy, Miss Post,
denigrate, decry,
deprecated the modern tendency to
belittle.
address new acquaintances by their
first names.
n. care and perseverance in carrying
Hard-working,
out tasks. Use : Her employers were
assiduousness,

Incitement

Open

Generous,
temperate
Approve

Laziness,
carelessness,

greatly impressed by her diligence and


offered her a partnership in the firm
Discretion

n. ability to adjust action to


circumstances Use: Use your
discretion in this matter and do not
discuss the matter with anyone.
dispel
v. scatter, drive away, cause to vanish
Use: The bright sunlight eventually
dispelled the morning mist
Dissemination v. Opening to public discussion or
debate, the act of spreading something,
Use:By their use of the internet,
propagandists, have been able to
disseminate their pet doctrines to new
audiences around the globe
Dogmatic
Adj. Opinionated Use: We tried to
discourage him from being so
dogmatic, but nothing could convince
him that his opinions might be wrong
echelon
n. A body of troops arranged in a line
fallible
Harbinger

illustrious
impetus

Intermittent

Latent

Adj. Liable to err. Use: I Know I am


fallible, but I feel confident that I am
right this time
n. an indication of the approach of
something or someone, forerunner v.
fore shadow or presage Use: The
crocus is an early harbinger of spring
Adj. Widely known and esteemed
n. A force that moves something
along, incentive, stimulus Use: A new
federal highway program would create
jobs and will give added impetus to
our economic recovery
Adj. Periodic Use: The outdoor
wedding reception had to be shifted
indoor to avoid the intermittent
showers that fell on and of all
afternoon.
Adj. Potentially existing, but not
presently evident or realized Use:
Polaroid pictures are popular at the
parties because you can see the latent
photographic image gradually appear

meticulousness,
conscientiousness,
painstakingness
Prudence, caution,
acumen, predilection,
sagacity, wariness,
volition
Disperse

negligence
Indiscretion

Attract

Broadcasting,
diffusion, propagation,

Arbitrary, doctrinal,
unbending, inflexible,
authoritarian,
Level, stratum, rank,
height
Imperfect, unsound,
mortal, weak, frail,

Flexible

Perfect

Forerunner, herald,
potent, omen,
Memorable, wellknown, famous
Momentum, thrust,
motivation

Inglorious,
shameful
inertia

Alternating, sporadic

Constant

Dormant, embryonic,
suppressed,
undeveloped,

Overt

Latitude
Manifestation

mitigate

motley

pensive

prolific
relinquish

solicit
tractable

veer
Vehement

Caprice

before your eyes


n. freedom from narrow limitations
Use: I think you have permitted your
son too much latitude in this manner
n. outward demonstration, indication
Use: Mozarts early attraction to the
harpsichord was the first manifestation
of his pronounced musical bent
v. lessen or try to lessen the
seriousness or extent of Use: Nothing
he could do to mitigate her anger, she
refused to forgive him
Adj. Multicolored or mixed Use: he
wore a motley tunic, red and green and
blue and gold all patched together
haphazardly
Adj. Dreamily thoughtful, thoughtful
with a hint of sadness Use: The
pensive lover gazed at the portrait of
his beloved and sighed deeply.
Adj. Abundantly fruitful Use: She was
a prolific writer, who produced as
meany as three books a years
v. give up something with reluctance,
yield Use: once you get used to fringes
like expense account meal and
company car, it is very difficult to
relinquish them
v. request earnestly, seek Use: The
Mayor telephoned all the member of
the city council to solicit their votes
Adj. Docile, easily managed,
susceptible to suggestion Use:
Although Susan seemed to be a
tractable young woman, she had a
stubborn streak of independence
v. change in direction Use: After what
seemed to be en eternity, the wind
veered to the east and the storm abated
Adj. Forceful, intensely emotional;
with marked vigor Use: He became so
Vehement in describing what had
happened with him that he started
jumping up and down
n. whim, a sudden desire. Use: She
was an unpredictable creature, acting

Leeway, freedom,
autonomy, liberty,
room, rope
Sign, demonstration,
expression, symptom,
Appease, alleviate,
allay, assuage, mollify,
extenuate, palliate

Aggrevate,
exacerbate

Assorted, diversed,
mixed, dissimilar,

Uniform,
homogenous,
monochrome

Brooding, pondering,
meditative,
contemplative
Productive, abundant,
fecund

Unproductive,
scarce

Surrender, renounce,
abandon, repudiate,
cede,

Vanquish,
retain,

Importune, implore,
crave, beseech,

Grant

Obedient, dutiful, wellmannered

Disobedient,
intractable

Turn, swerve
Fervent, passionate,

Whim, impulse, quirk,


fad, fancy, notion

Apathetic

on caprice, never taking thought of


consequences
v. suppress, extinguish, inhibit Use:
Halfway through the boring picture,
Laura gave up trying to stifle he
yawns.
v. agree Use: Did you concur with the
decision of the court or did you find it
unfair?
v. lack of vitality or energy Use: A
complete days work left him in a state
of lethargy
Adj. stealthy, sneaky, secret and sly or
sordid Use: noticing the furtive glance
the customer gave the diamond
bracelet on the counter, the jeweler
wondered whether he had a potential
shoplifter in his hands
v. wipe out or make dim Use: The coin
had been handled so many times that
its date had been effaced
Adj. Intended to attract notice and
impress others, making unjustified
claims, overambitious Use: The other
prize winner isnt wearing her medal.;
isnt it a bit pretentious of you to wear
yours?
n. a feeling of deep regret (usually of
some misdeed) Use: The judge was
especially sever in his sentencing as
the criminal had shown no
compunction for his heinous crime

stifle

concur
lethargy
Furtive

efface
Pretentious

compunction

confiscate

Sample Test Paper


Section A: Aptitude
1.

0.03 of 0.05 is what

a. 15%
b. .15%

Smother, asphyxiate,
choke, suffocate,
strangle, curb, restrain,
repress,
Agre, harmonize,
coincide, assent,
acquiesce
Stupor, indolence,
weariness

Let out

Surreptitious,
clandestine

open

Obliterate, eradicate,

Engrave

Ostentatious, pompous,
conceited

Down-toearth

Regret, scruple, qualm,


guilt, reluctance,
hesitation,

Conflict,
resist
Get-up-andgo

c. 0.015%
d. 0.0015%
2.

x<y,y<z and z>w which of the follwing is always true

a. x<w
b. y<w
c. x>w
d. y>w
3.

12 men can do a job in 4 hours .in wat time the same job can be done by

15 men ( I did not do)


a. 3 hrs
b. 3 hrs 24 min
c. 2 hrs
d. 3 hrs 30 min
4.

30 socks r there in a basket.60% are red and rest are blue. How many

draws should be taken from the basket to make sure that u have 2 blue and 1 red
a. 2
b. 3
c. 14
d. 20
5.

When operator * is applied to a number the result is 10 subtracted from the

twice of the original number ,so wat is *(*9)


6.

A husband and wife has 6 sons and each has 5 children each, How many

are there in the family altogether


7.

3x-2y=8 so what is 4y-6x

a. 16
b. 16
c. data not sufficient
8.

From chennai to trichy it is 250 miles and from Chennai to pondicherry it is

120 miles.wat percentage of mile from Chennai to trichy is Chennai to pondi


a. 34

b. 20
c. 36
9.

City B is 8 miles east of City A.City C is 6 miles north of City B. City D is 16

miles east of city C. City E is north of City D by 12 miles .what is the shortest
distance from City A to City E
10.

An employer pays X,Y,Z a weekly wage of total 610. X gets 120% of Y, and

X gets 80% of Z wat is the weekly wage of X


11.

I think answer is 200.

There are 50 employees of a company .21 were in training for both

economics and science training.11 were in 2 different training programs .find how
many of them do not attend any training programfew questions were given with
some relationship like:
1 head is to cap as finger is to
Ring
Nail
Thumb
12.

In a certain code language RANGER was written as REGNAR .with the same

code how is TABLE written Elbat(reverse the word)


13.

In a certain code if READ is written as SEADR then how is SING written with

that code SINGS


14.

If kanchan is son of Sunils sons son then how is Sunil related to Kanchan-

grandson
15.

Find the odd one out

a. Caution
b. Tresspasers will b prosecuted
c. Only one way
d. Keep left
16.

One more odd man out was asked few questions on profit and loss were

asked
Technical
1.

A sorting program is given .You need to print the output of every outer for

loop.
Main()
{
int n=8,I,j,k;
int a[7]={44,55,42,12,6,94,67};
for(I=0;I<n-1;I++)
{
k=I;

x=a[k];
for(j=I+1;j<n;j++)
{
if(a[j]<k)
{
k=j;
x=a[k];
a[k]=a[I];
a[I]=x;
}
}
}
2.

The precedence of operators are given, you have to find the value highest :

+ followed by -,*,/ parentheses r given higher precedence to operators unary


operator - is always written within parentheses association is from right to left
3.

Questions were given like L-Value R-Value

a) z[I+2]
b)*x
c)&x
d)&(&x)
e)
4.

Assume the following:

a. A tape drive can store 4096 bytes/millimeter


b. Forgot
c. A IRG is necessary and the length is 2 millimeter
Answer the following question:
For storing 20MB how many millimeters of tape is required
What is the storage capacity if the tape is 10000meters long
For a infinite storage how many IRGs are required in a tape that stores 1 GB of
data.
5.

The following program is to calculate the number of lines, number of words,

number of characters from file. You got to complete the C program (15 marks)
# define IN 1
# define OUT -----main()
{
int nc=nw=nl= ------,state= ------.c;
while((----=getchar()!=EOF))
{

++ ----;
if (c= = \n)
++ ----;
if(c = = || c = = \n || c= =\t)
state= ----;
elseif(state = ----)
{
state= -----;
++ -----;
}
}
}
Test Pattern:
Paper1: 40 J2EE Questions (50 minutes)
Paper2: 40 JAVA Questions (50 minutes)
All questions are multiple-choice !
------------------------------------------------------------------J2EE PAPER:
------------------------------------------------------------------1. What exception is thrown when Servlet initialization fails ?
(a) IOException
(b) ServletException
(c) RemoteException
ANS: (b)
------------------------------------------------------------------2. How can a Servlet call a JSP error page ?
(a) This capability is not supported.
(b) When the servlet throws the exception, it will automatically be caught by the calling JSP
page.
(c) The servlet needs to forward the request to the specific error page URL. The exception is
passed along as an attribute named "javax.servlet.jsp.jspException".
(d) The servlet needs to redirect the response to the specific error page, saving the exception
off in a cookie.
ANS: (c)
------------------------------------------------------------------3. What is the key difference between using a <jsp:forward> and
HttpServletResponse.sendRedirect()?
(a) forward executes on the client while sendRedirect() executes on the server.
(b) forward executes on the server while sendRedirect() executes on the client.
(c) The two methods perform identically.

ANS: (b)
------------------------------------------------------------------4. Why beans are used in J2EE architecture in stead of writing all the code in JSPs ?
(a) Allows separation of roles between web developers and application developers
(b) Allows integration with Content Management tools
ANS: (a)
------------------------------------------------------------------5. Why DB connections are not written directly in JSPs ?
(a) Response is slow
(b) Not a standard J2EE architecture
(c) Load Balancing is not possible
(d) All the above
(e) Both (b) and (c)
ANS: I think answer is (e). I am not sure whether response from database is slow just
because we include the database access code in JSP page.
------------------------------------------------------------------6. How multiple EJB instances are managed ?
(a) Connection Pooling
(b) Caching of EJB instances
(c) EJB Passivation
(d) All the above
ANS: I think answer is (d)
------------------------------------------------------------------7. At what stage, the life cycle of a CMP bean can be assumed to be started ?
(a) before ejbCreate() method is executed
(b) after ejbCreate() method is executed
(c) in postCreate() method
(d) after executing ejbStore()
------------------------------------------------------------------8. Lot of Questions on "EJB Transactions" and how to manage them.
------------------------------------------------------------------9. In JSP, how can you know what HTTP method (GET or POST) is used by client request ?
(a) by using request.getMethod()
(b) by using request.setMethod()
(c) impossible to know
ANS: (a)
-------------------------------------------------------------------

10. What is legal about JSP scriplets


(a) A loop can begin in one Scriptlet and end in another
(b) Statements in Scriptlets should follow Java Syntax
(c) Semicolon is needed at the end of each statement in a Scriptlet
(d) All the above
ANS: (d)
------------------------------------------------------------------11. Which method is called first each time a Servlet is invoked ?
(a) Start()
(b) Run()
(c) Servive()
(d) init()
ANS: (d)
------------------------------------------------------------------12. The time between Command Execution and Response is called ______
(a) Granularity
(b) Latency
(c) Lag time
ANS: (c)
EXPLANATION:
Latency:
Latency is a measure of the temporal delay. Typically, in xDSL, latency refers to the delay in
time between the sending of a unit of data at the originating end of a connection and the
reception of that unit at the destination end.
In a computer system, latency is often used to mean any delay or waiting that increases real
or perceived response time beyond the response time desired. Within a computer, latency can
be removed or "hidden" by such techniques as prefetching (anticipating the need for data
input requests) and multithreading, or using parallelism across multiple execution threads.
In networking, the amount of time it takes a packet to travel from source to destination.
Together, latency and bandwidth define the speed and capacity of a network.
Granularity:
The extent to which a system contains separate components (like granules). The more
components in a system -- or the greater the granularity -- the more flexible it is.
Granularity is a term often used in parallel processing to indicate independent processes that
could be distributed to multiple CPUs. Fine granularity is illustrated by execution of statements
or small loop iterations as separate processes; coarse granularity involves subroutines or sets
of subroutines as separate processes. The more processes, the "finer" the granularity and the
more overhead required to keep track of them. Granularity can also be related to the temporal
duration of a "task" at work. It is not only the number of processes but also how much work
each process does, relative to the time of synchronization, that determines the overhead and
reduces speedup figures.
Lag Time:
Lag Time is the amount of time between making an online request or command and receiving
a response. A primary goal of advertising network efficiency is to minimize lag time.

------------------------------------------------------------------13. 2 Questions on RMI and EJB related (I don't reemember them)


------------------------------------------------------------------14. Purpose of <jsp:plugin> tag
(a) used to incorporate Java applets into a Web page.
(b) Downloads a plugin to the client Web browser to execute an applet or Bean.
(c) Both (a) & (b)
ANS: (c)
EXPLANATION:
JSP Syntax :
<jsp:plugin
type="bean|applet"
code="classFileName"
codebase="classFileDirectoryName"
[ name="instanceName" ]
[ archive="URIToArchive, ..." ]
[ align="bottom|top|middle|left|right" ]
[ height="displayPixels" ]
[ width="displayPixels" ]
[ hspace="leftRightPixels" ]
[ vspace="topBottomPixels" ]
[ jreversion="JREVersionNumber | 1.1" ]
[ nspluginurl="URLToPlugin" ]
[ iepluginurl="URLToPlugin" ] >
[ <jsp:params>
[ <jsp:param name="parameterName" value="parameterValue" /> ]+
</jsp:params> ]
[ <jsp:fallback> text message for user </jsp:fallback> ]

Description :
The <jsp:plugin> tag is replaced by either anor tag, whichever is most appropriate for the
client Web browser (the tag is for browsers that use HTML 4.0).
The <jsp:params> element sends parameter names and values to an applet or Bean at
startup. The <jsp:fallback> element provides a message for the user if the plugin does not
start. If the plugin starts but the applet or Bean does not, the plugin usually displays a popup
window explaining the error to the user.
The <jsp:plugin> tag takes most of its attributes from the HTML tags (in HTML 4.0). You may
want to refer to the official HTML specifications in which these tags are introduced:
For HTML 3.2: http://www.w3.org/TR/REC-html32.html
For HTML 4.0: http://www.w3.org/TR/REC-html40/

Attributes :
type="bean|applet"
The type of object the plugin will execute. You must specify either bean or applet, as this
attribute has no default value.
code="classFileName"
The name of the Java class file that the plugin will execute. You must include the .class
extension in the name following code. The filename is relative to the directory named in the
codebase attribute.
codebase="classFileDirectoryName"
The absolute or relative path to the directory that contains the applet's code. If you do not
supply a value, the path of the JSP file that calls <jsp:plugin> is used.
name="instanceName"
A name for the Bean or applet instance, which makes it possible for applets or Beans called by
the same JSP file to communicate with each other.
archive="URIToArchive, ..."
A comma-separated list of paths that locate archive files to be preloaded with a class loader
located in the directory named in codebase. The archive files are loaded securely, often over a
network, and typically improve the applet's performance.
align="bottom|top|middle|left|right"
The positioning of the image displayed by the applet or Bean relative to the line in the JSP
result page that corresponds to the line in the JSP file containing the <jsp:plugin> tag. The
results of the different values are listed below:
bottom Aligns the bottom of the image with the baseline of the text line.
top Aligns the top of the image with the top of the text line.
middle Aligns the vertical center of the image with the baseline of the text line.
left Floats the image to the left margin and flows text along the image's right side.
right Floats the image to the right margin and flows text along the image's left side.
height="displayPixels" width="displayPixels"
The initial height and width, in pixels, of the image the applet or Bean displays, not counting
any windows or dialog boxes the applet or Bean brings up.
hspace="leftRightPixels" vspace="topBottomPixels"
The amount of space, in pixels, to the left and right (or top and bottom) of the image the
applet or Bean displays. Must be a small nonzero number.
jreversion="JREVersionNumber|1.1"
The version of the Java Runtime Environment (JRE) the applet or Bean requires. The default
value is 1.1.
nspluginurl="URLToPlugin"
The URL where the user can download the JRE plugin for Netscape Navigator. The value is a

full URL, with a protocol name, optional port number, and domain name.
iepluginurl="URLToPlugin"
The URL where the user can download the JRE plugin for Internet Explorer. The value is a full
URL, with a protocol name, optional port number, and domain name.
<jsp:params> [ <jsp:param name="parameterName" value="parameterValue" /> ]+
</jsp:params>
The parameters and values that you want to pass to the applet or Bean. To specify more than
one name and value, use multiple <jsp:param> tags within the <jsp:params> element.
Applets read parameters with the java.applet.Applet.getParameter method.
<jsp:fallback> text message for user </jsp:fallback>
A text message to display for the user if the plugin cannot be started.

Example:
The <jsp:plugin> directive takes care of generating all the HTML code necessary to embed
and activate a Java applet.
Consider the following example:
----------<html> <head> </head> <body>
<jsp:plugin type="applet" code="NewsTicker.class" name="newsticker" height="100"
width="100">
<jsp:params>
<jsp:param name="x" value="10"/>
<jsp:param name="y" value="25"/>
</jsp:params>
<jsp:fallback>Oops! Something bad happened and I can't display this applet</jsp:fallback>

</body>
</html>
----------The code above sets up the applet contained in "NewsTicker.class", and passes it a bunch of
name-value pairs of parameters. The <jsp:param> tag is used to pass these parameters to
the applet, while the <jsp:fallback> directive contains error text, in the event that the applet
cannot be found or displayed.
When JSP compiles and renders the page, the code above is automatically converted to its
HTML equivalent.
<html> <head> </head> <body>

</body>
</html>
-----------

------------------------------------------------------------------15. Difference between <jsp:forward> and <jsp:include> tags


ANS:
<jsp:forward> transfers the control to the mentioned destination page.
<jsp:include> tag substitutes the output of the destination page. Control remains on the same
page.
------------------------------------------------------------------16. Which of the following is true ?
(a) Unlimited data transfer can be done using POST method
(b) Data is visible in Browser URL when using POST method
(c) When large amounts of data transfer is to be done, GET method is used.
ANS: (a)
------------------------------------------------------------------17. EJB class should implement
(a) javax.ejb.EntityBean
(b) javax.ejb.rmi
(c) javax.ejb.EJBHome
(d) javax.ejb.EJBObject
ANS: I think the answer is (a)
------------------------------------------------------------------18. Generally Servlets are used for complete HTML generation. If you want to generate partial
HTMLs that include some static text (This should not be hard coded in Servlets) as well as
some dynamic text, what method do you use ?
(a) Serverside includes
(b) JSP code in HTML
(c) Not possible to generate incomplete HTMLs using Servlets
(Note: I don't remember the question word to word. But it is similar to what I have given)
------------------------------------------------------------------19. Which of the following can not be used as the scope when using a JavaBean with JSP?
(a) session
(b) application
(c) request
(d) response
ANS: (d)
------------------------------------------------------------------20. Which is true about Servlets
(a) Only one instance of Servlet is created in memory

(b) Multi-Threading is used to service multiple requests


(c) Both (a) & (b)
ANS: I think the answer is (c)
------------------------------------------------------------------21. What is Temporary Servlet ?
(a) Servlet that is destroyed at run time
(b) Servlet that exists for a session
(c) Servlet that is started and stopped for each request
ANS: (c)
EXPLANATION:
A temporary servlet is started when a request arrives and shut down after the response is
generated.
A permanent servlet is loaded when the server is started and lives until the server is shut
down.
* This is useful when startup costs are high, such as a servlet that establishes a connection to
a database.
* Also useful for permanent server-side service, such as an RMI server.
* Provides faster response to client requests when this is crucial.
Being temporary or permanent is part of the server configuration.
22. Although it is not commonly done, what will you do if you want to have multiple instances
of Servlet in memory and if they have to share the execution of a user request ?
(a) Defnie Single Thread model
(b) Cannot be done
(Note: I don't remember the question & answers word to word. But it is similar to what I have
given)
23. In WebLogic 5.1, how can you make a JSP application work
(a) By changing the root directory
(b) By creating a vitual directory in Server console
(c) By creating a vitual directory in client console
JAVA PAPER:
I don't remember Java questions because most of them are programs and the outputs are
asked.
I should say question are very difficult and confusing when compared to J2EE questions.
You should be thorough with following topics, as most of the questions & programs are from
these.
* Threads, Synchronization, Thread Monitors
* AWT & SWING Layouts (Border Layout)

*
*
*
*
*
*
*
*
*
*

Try, Catch, Finally


Switch statements (Some question on "default" option of Switch)
Java Exceptions
Scope (Public, Private, protected)
Inner & Outer classes
Strings & StringBuffers
Serialization
Applets
Abstract Classes & Interfaces
Static classes & methods

There were two sections Aptitude Technical

Aptitude
1.

If m-4 is 7 more than n then m+9 is how much more than n+2

2.

If 10x coins are added to the no. of original coins he has (5y + 1) times

more coins. Find out how many coins he


had originally in terms of x and y
3.

Find out the Simple Interest paid for a sum of $4000 at the rate of 8% per

annum for 3 months.


4.

If it takes 10 technicians working 6 hours to build a server. They start

woring at 11 AM and 1 technician is


added per hour starting at 5 PM. At what time they will finish the server?
5.

A chart was there giving the speed of train after some minutes like

0 30 60 90 120 150 180


40 45 50 55 60 65 70
6.

Find the % increase in the speed of train?

7.

If it is extrapolated further what will be the speed after 5 hrs.

8.

If the data is for 10 bogies and for every 2 bogies added speed decreases

by 5% what will be the speed after 5


hrs.
9.

The type of questions where Both stmt are necessary First one is

sufficient in itself.. What is the perimeter of the quadrilateral?


10.

The quadrilateral is rectangle

11.

The area of the quadrilateral is 36 What is a*b

12.

6a+4b=43

13.

3a+12b=63

14.

The house is big and lovely but since nobody uses it it is pretty much a

white Elephant What does White


15.

Elephant mean?

Sometime they irritate me because they are up with the lark whereas I like

to lie in What does Up with Lark


mean?
Technical
1.

What exception can an overridden method throw in comparison with the

method it is overriding?
2.

What does parseQueryString return?

3.

Anonymous classes Can they have constructors?

4.

what is wrong with this

abstract class MyClass


{
transient a,
synchronized b.
}
5.

How can an inner class access the members of outer class?

6.

Find the output:

String a=abc;
String b=abc;
If(a==b)
System.out.println(1);
Else
System.out.println(2);
If a.equals(b)
System.out.println(3);

Else
System.out.println(4);
7.

Find the output Code showing Call by reference and call by value was

given Array was used.


8.

Some For stmts was given Mark all valid once

9.

byte b=1

While(++b > 0);


System.out.println(b);
Deutsche - Placement sample question papers
1. What is the percentage represented by 0.03 * 0.05 ?
(a)0.0015
(b)0.000015
(c)0.15
(d)15
Ans.B
2. (x-a)(x-b)(x-c)....(x-z) = ?
(a) 1
(b) -1
(c) 0
(d) Can't be determined
Ans. C
3. If a = 1, b = 2, c = 3.......z = 26 what is the value of p+q+r ?
(a)33
(b)51
(c)52
(d)48
Ans. B
4. A is 8 miles east of B.
C is 10 miles north of B.
D is 13 miles east of C and E is 2 miles north of D.
Find shortest distance between A and E.
(a) 5 miles

(b) 6miles
(c) 13 miles
(d) 18 miles
Ans. C
5. If z = 1, y = 2.......a = 26. Find the value of z + y + x + .......+a.
(a) 351
(b) 221
(c) 400
(d) 200
Ans. A
6. There are 30 socks in a bag. Out of these 60 % are green and the rest are blue. What is the
maximum number of times that socks have to be taken out so that atleast 1 blue pair is
found.
(a) 21
(b) 2
(c)18
(d) 20
Ans. D
7. How many two digit numbers have their square ending with 8.
(a) 13
(b) 12
(c) 0
(d) 11
Ans. C
8. How many numbers are there between 100 and 300 with 2 in the end and 2 in the
beginning.
(a) 10
(b) 9
(c) 11
(d) none of these
Ans. A
9. 0.000006 * 0.0000007 = ?
(a) 0.0000000042
(b) 0.000000000042

(c) 0.0000000000042
(d) 0.00000000000042
Ans. B
10. You have Rs 1000 with 8% p.a compounded every 6 months. What is the total interest
you get after 1 year.
(a) Rs.116.40
(b) Rs.345.60
(c) Rs.224.50
(d) Rs.160
Ans. A
11. If x + y =12,
x-y=2
Find x + 2y.
(a) 12
(b) 17
(c) 14
(d) none of these
Ans. B
12. With one gallon of petrol a person moves at a speed of 50 mph and covers 16 miles. 3/4th
of the distance is covered while moving at 60 mph. How many gallons does he need to cover
120 miles in 60 mph.
13. A tap drains at x speed while tap B is closed. When both taps are open they drain at y
speed. What is the speed of draining when only tap B is open
(a) x - y
(b) y-x
(c) x
(d) can't be determined
Ans. B
14. What is twenty percent of 25 % of 20.
(a) 2
(b)1
(c) 5
(d) 4
Ans. B

15. A rectangle has the dimensions 6ft * 4ft. How many squares of 0.5 inches will it need to
completely fill it.
(a) 32000
(b) 12824
(c) 13824
(d) 18324
Ans. C
Directions for questions 16-21: In each question,a series of letters satisfying a certain pattern
are given. Identify the pattern and then find the letter/letters that will come in place of the
blank/blanks.
16. a, c, e, g, _
(a) h
(b) i
(c) d
(d) j
Ans. B
17. a, e, i, m, q, u, _, _
(a) y, c
(b) b, f
(c) g, i
(d) none
Ans. A
18. ay , bz , cw , dx ,__
(a) gu
(b) ev
(c) fv
(d) eu
Ans. D
19. 1, 2, 3, 5, 7, 11, __
(a) 15
(b) 9
(c) 13
(d) 12
Ans. 13 , series of prime numbers

20. kp , lo , mn , __
(a) nm
(b) np
(c) op
(d) pq
Ans. A
21. abc , zyx , def , wvu , ___
(a) ghi
(b) tsr
(c) ihg
(d) str
Ans. A
22. How is my mother's sister's brother's wife's child related to me?
(a) brother
(b) uncle
(c) cousin
(d) nephew
Ans. A
23.What will my mother's husband's father-in-law's son's daughter to me?
(a) niece
(b) aunt
(c) sister
(d) none of these
Ans. D
24. A person travels 12 km in the southward direction and then travels 5 km to the right. He
then travels 5 km to the right and then travels 15 km towards the right and finally travels 5km
towards the east. How far is he from his starting place?
(a) 5km
(b) 3m
(c) 3.5km
(d) 4km
Ans. (b)
25. A person travels towards east from his house and travels a distance of 3 meters. He then

ran a distance of 7 meters southwards and then travels towards east a distance of 3 meter
Finally he travels southwards a distance of 10 meters.What is his vertical distance from his
house?
(a) 10
(b) 17
(c) 12
(d) none of these
Ans. B
26. The sum of three consecutive numbers is 132. Find the square of the largest number.
(a) 2026
(b) 640
(c) 900
(d) 2025
Ans. D
27. Father's age is five times his son's age. Four years back father was 9 times older than his
son.Find their present ages
(a) 30yrs, 6yrs
(b) 25yrs, 5yrs
(c) 40yrs, 8yrs
(d) none of these
Ans. C
28. If x + 5y = 6 ;
7x - 2y = 5
Find x - y
(a) 1
(b) 2
(c) 0
(d) none of these
Ans. C
29. If the equation x2 + 2(k+2)x + 9k = 0 has equal roots, find k?
(a) 1,4
(b) 1,5
(c) 2,5
(d) can't be determined
Ans. A

Directions for questions 30 to 35: Select the alternative that logically follows form the two
given statements.
30. All books are pages. All pages are boxes.
(a) All boxes are books
(b) All books are boxes
(c) No books are boxes
(d) Both (a) and (b) are correct
Ans. B
31. No apple is an orange. All bananas are oranges.
(a) All apples are oranges
(b) Some apples are oranges
(c) No apple is a banana
(d) None of the above
Ans. A
32. All pens are elephants. Some elephants are cats.
(a) Some pens are cats
(b) No pens are cats
(c) All pens are cats
(d) None of the above
Ans. D
33. All shares are debentures.No debentures are deposits.
(a) All shares are deposits
(b) Some shares are deposits
(c) No shares are deposits
(d) None of the above
Ans.C
34. Many fathers are brothers. All brothers are priests.
(a) No father is a priest
(b) Many fathers are not priests
(c) Many fathers are priests
(d) Both (b) and (c)
Ans. B
35. Some pens are pencils. All pencils are costly.

(a) No pens are costly


(b) Some pens are costly
(c) All pens are costly
(d) None of the above
Ans. B
36. How many two digit numbers have their squares ending with 6?
(a) 9
(b) 10
(c) 164
(d) 18
Ans. D
37. In how many years will $1200 amount to $1323 at 5%p.a. compound interest?
(a) 3 years
(b) 2 1/2 yrs
(c) 2 yrs
(d) none of the above
Ans. C
38. How many terms of the series -9 , -6 , -3 ,.........must be taken such that the sum may be
66?
(a) 11
(b) 13
(c) 9
(d) 10
Ans. A
39. The sum of three numbers in AP is 27 and their product is 504. Find the terms.
(a) 7, 9 ,11
(b) 5, 9, 13
(c) 4, 9, 14
(d) none of these
Ans. C

40. Two pipes A and B can fill a tank in 20 and 25 seconds respectively. Both are opened at
the same time and after 5 minutes the first one is closed.How much more time will it take for
the tank to be full?

(a) 13 min 45 secs


(b) 10 min
(c) 18 min
(d) 15 min 45 secs
Ans. A
41. How long will a train 150 metres long and travelling at a speed of 45 kmph, take to cross
a platform of length 250 meters?
(a) 48 secs
(b) 32 secs
(c) 30 secs
(d) none of the above
Ans. B
42.Walking at 4/5th of his usual speed, a man reaches his office 15 mins late. Find his usual
time for reaching the office?
(a) 45 mins
(b) 2 hrs
(c) 1 hr
(d) 30 mins
Ans. C
43. If the word "CODING" is represented as DPEJOH , then the word "CURFEW" can be
represented?
(a) DVSGFX
(b) DVSHFX
(c) DGSHFX
(d) DTSGFY
Ans. A
44. If in a certain code "RANGE" is coded as 12345 and "RANDOM" is coded as 123678, then
the code for the word "MANGO" would be
(a) 82357
(b) 84563
(c) 82346
(d) 82543
Ans. D
45. If in a code "COPIER" is coded as 1234 and "REAM" is coded as 5421,then "DREAM" is

coded as
(a) 35421
(b) 43512
(c) 35412
(d) 34521
Ans. A

Directions for questions 46-48:The questions are based on the following data In a class of 150
students 55 speak English;85 speak Telugu and 30 speak neither English nor Telugu
46. How many speak both English and Telugu?
(a) 10
(b) 15
(c) 20
(d) 12
Ans. C

47.How many speak only Telugu?


(a) 55
(b) 45
(c) 65
(d) none of the above
Ans.C
48.How many speak at least one of the two languages?
(a) 120
(b) 100
(c) 250
(d) 50
Ans. A

49. Find the lowest of the three numbers in a GP whose sum is 38 and product 945.
(a) 12
(b) 18
(c) 4
(d) 8
Ans. D

50. A can do a piece of work in 24days. When he had worked for 4 days B joined him. If the
complete work is finished in 16 days form the beginning, in how many days can B alone finish
the work?
(a) 24 days
(b) 18 days
(c) 36 days
(d) None of the above
Ans. C
DSQ PAPER. - Aug-04
Technical aptitude test
1. the 2's complement number of 110010 is
ans; none of those
2.Truth table of a logic function
ans: displays all its input output possibilities
3.The process of varying one signal according to the pattern
provided by another signal is
ans:modulation
4.The octal equivalant of hexa number 123 is
ans:443
.Determine how many times the given loop is executed
5.m=3 while (m&lt;18) do {m=m+2;m=m-1}
ans:15
6.m=1;a=30;while (m&lt;&gt;1) do {m=m+1;a=a-1;}
7.m=1;a=30;while (e*m-5&lt;a) do {m=m+1;a=a-2}
ans:9
in questions 8 to 12 find the values of a and b at the end of the
xecution of the program segment
8.a=2;b=1;x=1;while(x&lt;=4)do {a=a+b;x=x+1}
ans:(5,1)
9.a=1;b=2;x=1 while (x&lt;=5)do {b=a+b;x=x+1;}
ans:(1,6)
10.a=0;b=0;x=1;while (x&lt;=4){a=a+x;b=b-x;x=x+1;}
ans:(10,-10)
In questions 11-15 find the odd man out
11.address
12.cmos
13.lisp ( from 11-15 these are the answers dont confuse)
14.mouse
15.csh
16.The complexity of bublle sort is0(a),then kequals
ans:2
17.In BCD,the decimal number 516 is
ans:10101110
18. RS 232 is standards for
ans:physical layer
19. which of the following is not true of a DBMS
ans:maintain integrity
20.the method of access used for obtaining a record from a tape is
ans:sequential
21.Whichof the following is an universal gate
ans:nor

22.an ASCII text file containing 500 characters will have size approximately
ans:500bytes
23.which of the following is a vector
ans;force
24.The lowest attainable temperature
ans 0k
25.viscosity is most similar to
ans:friciton
26.The elapsed time between the submission of the job and getting
the output is
ans:seek time
27.the earliest calculating device still in use is
ans: abacus
28.an acronym for the organisation that publishes programming
langauge standards is
ans:ANSI
29.Qunatities used to bring fields to standards sixe are
ans:pixels
30.the base of a number system is called as
ans:radix
31.An 8kb computer will bave addresses ----ans:8191
32.Arranging data in a specific form is called
ans: sorting
33.A translator which reads an entire programme written in a high
level language and converts it into machine language code is
ans: interpreter
34.a data hierarchy in assending order is
ans:bit-byte -field-record-file-database
35.a computer generated output that lets programmer follow the execution
of the program line by line is
36.data items grouped togother for storage form a
37. the most dangerous aspect of computer virusesis their ability to
ans: change system memory
38.a distributed data processing configuration in which all
activities must pass through an centrally located computer is called a
ans: ring network
39.communication circuite that transmit data inboth directions but
not at the same time areoperating in
40.which of the following is not an application software
ans:unix
41.For which of the folowing computer application is real time
processing not essential
ans;
42.a data structure with one to many relationship is a
ans:tree
43. which of the following hardware components is most important to operation
of a database management system
ans:high speed,large capacity disk
44. computer viruses can spread from one system to another by means of
ans:all the above
45. afront end processor is ususally used in
ans: multi processing
46.a radioactive material of mass 16 grms in 10 years due to
radiation. how many years will it take for the material to attain a mass f
1 gm
ans:30
47.a block of ice floats on water in a beaker, as the ice melts,the water
level in the beaker will

ans:remain same
48.if va,vn,vs are velocities of sound in air,water, and steel then,
ans:vs&gt;vn&gt;va
49.in usual computer arthemetic, the value of the integer expression
22/5*2+8*2/6
ans:10
50.an operating system is
ans: all the above
REASONING ABILITY TEST (VERBAL AND GENERAL)
Questions 1to 10 are odd man out i am giving only answers you just remember

1.sphere
2.rhine
3.s
4.548
5.voluminous
6.graphologist
7.
8.nepal
9.egypt
10.squash
11.
12.
13.
14.
15.
16.

find the next letter in the series B,F,J,P ---ANS:V


find the next letter in the series O,T,T,F,F,S,S--ANS:E
find the next letter inthe series Q,W,E,R,T,--ANS:B
FIND THE NEXT LETTER IN THE SERIES c,o,m,p,u,t,e--ans:r
find the next letter in the series A,C,F,J,0--U
FIND THE NEXT letter in the series C,O,M,P,U,T,E,---ANS:R

17. FIND the next number in the series 11,112,1124,11248,--ans:1124816


18.find the next number in the series 12,21,,112,121,122---ans:221
19.find the nuxt number in the series 1,2,5,10,,15,22--ans:29
20.find the next number in the series 0,3,8,15,,24,48,63--ans:80

QUESTIONS 21 TO 35 FILL IN THE BLANKS USING THE WORDS GIVEN 1 TO 4 AND


P TO S CHOOSE THE APPROPRAITE RESPONSE FROM A TO D.
21. -------is to district as district is to------1)country 2)continent 3)state 4)village
p)town q)village r)state s)city
ans)3-P
22. -------is to seeds as hen is to ---------1)embrayo 2)plant c)cock d)chicken
p)bird q)craaper r)egg s)tree
ans) 2-R
FROM HERE ON WARDS I AM GIVING QUESTION TO ANSWER
23. ------is to animal as ----is to plants

ans)blood-sap (4-S)
24. ------is to cardic as brain is to -----------ans)heart-nerves (2-P)
25. --------is to myopia as long sight is to ------ans)
26) ----- is to japan as rupee is to ----ans)YEN -INDIA (3-P)
27) ------is to christian as synage gue is to -----ans)church-Jaws
28) -----is to thermometer as velocity is to -----ans)Temperature-animeter
29) ------is to sentence as act is to------ans)paragraph -scene
30) ------ IS TO EARTH AS EARTH IS TO ---ANS)Moon -sun
31) -------is to london as yamuna is to -----ans)thames-delhi
32) -----is to india as alps is to----ans)himalayas -switzerland
33) ------ is to proton as cathode is to-----ans)electron -anode
34) ------is to a river isto branch is to -------ans)lake-tree
35) ------is to proofread as account is to ------ans)proof -audit

MATHEMATICS TEST
1. if a**2+b**2+c**2=1 then ab+bc+cd lies in the intrval
a. -1/2,1 b.-1,1 c.-1/2,2 d.-1,2
2.if x is root of 4*y**2+2*y-1=0, the its other root is given by
a.4x**2+2*x+1 b.x-1/2 c 2x-1 d.2-x
4. the perimetere of a square is 44m more than that of another and
187 sqm more in area then the side of the larger square is
ans:17m
5. the value of x which makes xi+2j+3k and -i+5j+k perpendicular is
ans:none of the above
6. the value of determiterment ---|matrix|
ans:6
7. the solution of the system of equations 2y-z=0,x+3y=-4,3x+4y=3 is
ans: x=5,y=3,z=6
8. the radius of the circle 4x**2+4y**2 =100
ans: 5
9. the ages of two brothers are now in the ratio 4:3 but fifteen
years ago, they were in the ratio 3:2the present age are
ans:45
10.if z is the arithemtic mean between x and y , then the value of x/(x-z)+y/(y-z)
is ans:2
11.the least integer n for which the sum 1+3+5+---+(2n+1) exceeds
9999 is ans:100
12. the number of subsets of a set s is 64, then s has
a: 8 b.6 c.4.d. 16 elements
13.if n is a natural numbers, the n(n+1)(N+5) IS

ans:a multiple of 6
14.a spere circumscribes a cylinder . then the ratio of the surface
area of the spere to the curved surface area of the cylinder is
ans:3:2
15.ax/b+b=bx/a+a,a//b. then x equals
ans:ab/(a+b)
16. if logs sqrt(5x)=1,then x equals
ans:
17. which of the following triplets cannot be sides o a ritht angled
triangle
ans: (p-q),(p+q),sqrt(p+q)
18.inwhat time will RS. 3200 amount to RS.3528 at 5% annum compound interest
ans:2 years
19.if the price of orange falls by 20 % one can buy 5 dozens more
for RS 300, THEN THE ORIGINAL price per dozen is
ans:15
20. the triangle formed by (0,0),(0,4,),(3,8) is
ans: right angled triangle
21. The area of parallegram (0,0),(0,4),(3,8) is
a.12 b.6 c.24 d.25
22. A man can do a piece of work in 9 days, a woman can do 3/4 as
much work as a man in one day and a boy in twice the time that a man
takes. How many days wil 2 men, 3 women and 5 boys together take to do the
work?
ans:4/3 days
23.The probability of getting at least one head in a single throw of
three coins is
ans:7/8
24.A problem is given to two student A and B WHOSE REspective
chances of solving it are 1/2 and 2/3 . IF BOTH OF THEM TRY TO SOLVE THE
PROBLEM INDEPENDENTLY, THE PROBability that the rpoblem will be solved is
ans:5/6
25.In a single throw of 3 dice, the chance of throwing a total of 15
is
ans:a.1/15b.5/216 c.1/3 d. 1/4
26.(3x-2)/(x-2)&lt;=0,then
ans:2/3&lt;=x&lt;2
40 . P and Q are positive integers with their averagfe 15, find how
many different values can one take
ans:29
41.The hands of clock coincide after every 66 min of correct time.
How much does the clock gain or lose in a day.
ans:gains 11 min
42.Ifxto the power of 5=4 and x to the power of 4=5/y , then x equals
ans:4y/5
43.if x,y,z are natural numbers, and if 2x=y and y=3z, which of the
following numbers could be x+y+z
ans:44
44.The pipes can fill a cistern in 1.5 hours and 2 hours
respectively. A wste pipe can empty a full cistern in 3 hours. If the
cisternis empty and all three pipes are opened together, in how many min
will the cistern be half full
ans:36
45. The members a,b,12 forma geometric progression and the nos a,b,9
form an arithmetic progression. find the value of a+b
ans:9or 45
46.IN a group of 15,7 can speak spanish, 8 can speak french, and 3
can speak neither.How much of the group can speak both french andspanish
ans:2/3

47.Oranges are bought at 11 for Rs. 10 and sold at 10. for Rs. 11
the profit is
ans:21%
48.If x/y=2/3 then y**2/x**2 is equal to
ans:9/4
49. the cordinates of A,b,c are respectively (2,3) ,(4,4) AND
(0,-2). If abcd is a parallelgram. The coordinates of D are
ans:(-1,-3)
50. If nis odd which of the following statements is true
ans: 1.n is odd 2. n**2 is odd 3. n**2 is even
a.1 only b.2 only c. 3 only 4. 1&amp;2 only<class Item>
void foo(Item x);
which is right way to call with integer argument I?
a. foo(i);
b. foo<int > (i);
c. foo<Item>(i);
d. foo(<int> i);
e. foo(<Item > i);
8.
9. void quiz(int w)
{
if(w>1)
{ quiz (w/2);
quiz(w/2);
}
printf(*);
}
how many asterisks are printed by the function call quiz(5)?
a. 3
b. 4
c. 7
d. 8
10. void test_a (int n)
{
printf(%d,n);
if(n>0)
test_a(n-2);
}
test_a(4)?
a.024
c. 0 2
d. 2 4
e. 4 2
f. 4 2 0
11. char string[8]=abcdefg;
*string=\0;
printf(%s,string);
a. compiler error
b. run-time error
c. no o/p, but no error
d. creates bcdefg
12. char string[8]=abcdefg

o/p :
printf(%s\n,string +3);
a. abcdefg
b. abc
c. defg
d. cdefg
13. main()
{ int I=-3, j=2,k=0,m;
m=++I&&++j||++k;
printf(\n%d%d%D, I,j,k,m);
a. 2 3 0 1
b. 2 3 1 1
c. 2 3 1 0
d. 2 3 0 0
14. main()
{
int I;
for(;;)
{
printf(%d,I++)
if(I>10)
break;
}
}
a. condition in a for-loop is mudt
b. no error
c. 2 ; shud be dropped
15.void goop ( int z[]);//prototype
int x[10];
which ois the correct way to call goop
a. goop(x);
b. goop(x[]);
c. goop(x[10]);
d. goop(&x);
e. goop(&x[]);
16. int a=3,b=17;
a=b%a;
b=++a+5;
printf(a,b);
a. 2 8
b. 2 7
c. 3 7
d. 2 8
e. none
18. how many time shello will be printed?
FILE *fp=fopen(test.txt,w)
Fprintf(fp,hello);
Fork();
a. 1
b. 2
c. 0

d. none
19. int a;
int b=0;
while(a)
{
{ a&=a-1;
b++;
}
a &b
a. 0 & 15
b. 1 & 16
c. 0 & 16
d. none

20. class A
{
public:
static int a;
A() {a=10};
};
int main()
{
A b;
Printf(%d,b.a);
Return 0;
}
will the program compile?
a yes
b. no

NUMERICAL ABILITY
1. A salesman marks an item 60% above the cost price & offers 2 successive discounts of 25%
& 15% on the marked price. His profit is:
a. 15% b 2% c 7.5% d. 10 e. none
2.Had it been sold at 55% loss, SP would have been Rs. 10.80. The C.P is;
a. Rs 26 b. 28 c. 36 d.24 e. none
3. If 18 men can build a wall 140 mtrs. In 42 days . In how many days can 15 men be able to
construct a similar wall 100 mtrs . long??
a. 36 b. 60 c. 60 d. 33 e. none
4. Successive discounts of 15% & 20% on any goods amount to a total discount of :
a. 50 % b. 35% c, 34% d.32 % e.none
5. In a km race A beats B by 40 m or 7 secs. As time (in secs) over the cource is:
a.180
d. 280
e. 168
f. 175
g. none
7. A widow & a son are to receive Rs 20000 and Rs 10,000 respectively frm inheritance of Rs.
70,000. The rest is 2 be divide so that the widow recives 3/2 times as much of it as the son.

Then the amnt received by (widow,son) pei9r in thousands of rs. Is:


a. (44,26)
b. 42,28
c. 40,30
d. 45,30
e. none
8.the demand for a commodity linearly decreases by 0.5 unit for each unit increase in price &
it vanishes when the price is set at 60 . The supply of the commodity vanishes when the price
is set at 25 & equals the square root of the price in excess of this threshold price. Then the
equilibrium at which the supply coincides with the demand is:
a. 45
b. 50
c. 55
d. 62+/-3 under-root86
e. none
9. gre type column questions:
area of triangle pqs is 45:
PQ=12 P
QR=20
Col. A : length of segment PS
COL. B: Length of SR
a. if A is greater
b. if B is greater
c. if both equal
d. d. cant determined
10.Col. A: (0.82)^2(0.82)^3
Col. B: (0.82)^6
11. t is a positive integer
4/7 = t/s
Col. A: s
Col. B: 7
12. Col. A 1-1/27
Col. B: 8/9+1/81
13. 14. these types simple (-0.64)^4 & (-0.6)^3
1516
M/c A produces x units of output per hour, while m/c B produces x units of output every 1.5
hrs.
17. How many hrs. does it take 2 produce x units of o/p , with both m/cs A &B working
together??
a. (4x +!)/4x
b. 5/4
c. 3/(5x)
d. 3/5
18. 4 more m/cs are installed with their capacities lying betn those of m/cs A & B . Wchi of the
following cat be the average no. opf hrs. per m/c for producing x units of output?

a. 1.05
b. 1.15
c. 1.25
d. 1.35
Problem Solving (19-21)
19. if 0<st<1 , then which of the following can be true?
a. s<-1 & t>0
b. s<-1 & t<-1
c. s>-1& t<-1
d. s>1 & t<-1
e. s>1 & t>1
20. To reproduce an old photograph , a photographer charges x dollars to make negative ,
3x/5 dollars for each of the first 10 prints, & x/5 dollars for each print in excess of 10 prints .
If $45 is the total charge to make a negative & 20 prints from an old photograph, what is the
value sof x?
a. 3
b. 3,5
c. 4
d. 4.5
e. 5
21. A certain cake reciope states that the cake shud be baked ina pan 8 inches in diameter . If
Jules want to make a cake of the same depth but 12 inches in diameter , by what factor shud
he multiply the recipe ingredients?
a. 2 & half
b. 2 & one-fourth
c. 1 & half
d. 1 & 4/9
e. 1 & a/3
Data interpretation 2228
ANALYTICAL ABILITY
A farmer plants only 5 diff. Vegetables-beans, corn, kale, peas& squash. Every year the
farmer plants exactly 3 kinds of vegetables as follows:]
If the farmer plants corn, the farmer also plants beans that year.
If he plants kale 1 year, he does not plant it next year
In any year, farmer plants no more than one of the vegetable the farmer planted in the
previous year.
29. Which of the following is possible combinations plant in 2 successive years?
a. beans, corn, kale,; corn, peas, squash
b. beans,corn,peas; beans,corn,squash
c. beans, peas,squash; beans,corn.kale
d. corn,peas, squash; beans,kale,peas
e. kale, peas, squash; beans, corn,kale
30.if he plants beans, corn & kale in 1st year , which must be planted in 3rd year?
a. beans, corn, kale
b. peas, corn & kale
c. beans, kale , peas
d. beans, peas, squash
e. kale, peas , squash

In a game exactly 6 inverted cups stand side by side ina straight line & each exactly has 1 ball
hidden under it. The cups are numbered consecutively 1 thro 6. Each of the balls is painted a
single solid color. The colors of the balls are green, magenta, orange ,purple,red & yellow. The
balls have been hidden under following conditions:
The purple ball must be hidden under a lower-numbered cup than the original ball.
The red ball must be hidden under a cup immediately adjacent 2 the cup under which the
magenta ball is hidden
The green ball must be hidden under cup 5.
31. which of the following could be colors of balls from 1 to 6?
a. green, yellow, magenta,red, purple, orange
b. magenta, green , purple, red, orange, yellow
c. magenta, red , purple, yellow, green , orange
d. orange, yellow. Red, magenta, green, purple
e. red, purple, magenta, yellow, green, orange
32. if red ball is under cup4 ? howmany sequences are possibl;e
a. 0
b. 1
c. 2
d. 3
e. 4
33. which is true?
a. green ball is under lower-numbered than the yellow ball.
b. orange ball is under lower-numbered than the green ball.
c. purple ball is under lower-numbered than the green ball.
d. purple ball is under lower-numbered than the RED ball.
e. Red ball is under a lower- numbered cup than the yellow ball
34. If red & orange ball are kept 0ofadjacnet to each other, how many valid seqiuences sre
possible?
a. 1
b. 2
c. 3
d. 4
e. 5
35. If the magenta is bill is under cup, 1 balls of which ththf following colors must be under
cops immedistely adjacent to each ather??
a. gree & orange.
b. Green & yellow
c. Purple & tred
d. Purple & yellow
e. Red & yellow
State the assumption 36..39
36.
37. Karim is exactly twice as old as Rahim. Karims age 10 yrs. Ago was 2 times saleems
present age.
a. saleem is 5 yrs. Younger than rahim
b. rahim is twice as old as saleem
c. saleem is the same age as rahim
d. saleem is 10 yrs. Younger than rahim
38. X & Y are +ve integers. The sum of X&Y is less then their product
a. atleast one of X & Y is not 1
b. both X & Y are greater than 2

c. neither takes value 1


d. atleast one of X & Y is greater than 2
39.
Logical Reasoning
40.
41. He greatest chance for the existence of extraterrestrial life is on a planet beyond our solar
system. This is bcoz the Milky Way galaxy alone contains 100 billion other suns, many of
which could be accompanied by planets similar enough to make them suitable abodes of life.
The argument above assumes which of following?
a. living creatures on another planet would probably have the same appearance as those on
earth
b. life cannot exist on other planets in solar system
c. if the appropriate physical conditions exist, life is an inevitable consequence
d. more than one of the suns in the galaxy is accompanied by an earth like planet
e. it is likely that life on another plane would require conditions similar to those on earth
42.
43
44.
a. if u get ans from I alone
b. if u get ans from II alone
c. if u get ans from both
d. neither
45.50
I. Ram is 10 yrs. Older than shym , while laxman is half the age of shyam
II. Bharat is 5 yrs. Younger than laxman , & shyam is 3 times older than bharat
45. what is the age of ram
46. age of laxman?
47. when ram married sita , she was half his age . now sitas age & shyams age add upto 50
yrs. Wwhat is sitas age?
48. ratio betn. Shyams age & bharats age
49. ratio betn laxman & bhara s age
50. bharats wife radha married him 10 yrs before the present year. What is radhas age?
Sample Question Paper
1. What is diners phylosophers algorithm.
2. What is atomicity.Explain
3. Give an example of source- level debugger in unix/linx.
4. What is Pre-emptive multitasking.
5. Do not remember this one.
DataStructures: (ONly 5 Questions)
1. Where will the parameters be stored when a function is called in a program.
2. What is recursion?What are its disadvantages.
3. Which one is the best and efficient sort?
Networking:(Only 5 Questions)
1. ASN.1 belongs to which layer.
2. Give an example of popular Transport Layer Protocol
3. What is the netmask of Class B IP address?
4. Explain CSMA/CD.

5. Given a size from 0-7 what would be the least window size.
C Language (Total 13 Questions)
1. main()
{
printf("%d",printf("HelloSoft"));
} Output?
2. case 1: case 2:
typedef Struct { typedef Struct {
int a; char p;
char b; int q;
int d; char k;
char e; int l;
}A; }A;
Assuming 'packing' is not enabled, which case will give an error of Sizeof(A) less.
3. main()
{
int i=3;
printf("%d %d %d",i++,i,++i);
}
4. main()
{
int i=10;
int j,k=5;
int a[10];
for(j=0;j<10;j++)
a[j]=(i+k)+(i*k);
}
Optimize the above code.
5. Write In Order Tree Traversal Pseudo-code.
6. main()
{
int *p=0x100;
int *q=0x100;
int k=p*q;
printf("%x\n",k);
} Output ?
7. Char* foo(Str...) {
char str[4];
strcpy(str,"HelloSoft");
return str;
} Output?
8. int a[10][20][30][40];
int *p
How to access an element of a using p?
9. main()
{
int i=10;
if(i>20)
if(i==10)
print("Hi");
else
printf("Bye");
} Output ?
10.main()
{
float f;

int i;
//something like this not remember these 4 questionsexactly
f=(float *)malloc(sizeof((float *)*4));
}
Some Question was asked not remenber .

HFCL CAMPUS TEST [1]


(1) TTL to CMOS pullup & vice-versa
(2) function of Ping
(3) SNMP protocol
(4) Application layer
(5) ## ----> token pasting in C
(6) Question on C: i^=j you have to tell the output given the values of i and j;
(7) Complexity of Binary Search tree
(8) Macro is given as follows : SQR(x) x*x
find the value of SQR(i-j) , when i and j were given
(9) Multiplexer 1 to 3 inputs--- A,B,C control lines--- S1,S2 Output --- Y .Write Y interms of
S1,S2
(10) Bandwidth minimum sampling theorem
(11) Shannon's Law
(12) Difference between fork() & execve()
(13) Banker's algorithm
(14) append(&struct , fp)
(15) Windows95 , X-Windows what are they?
(16) 16k memory , ending address of the address space FFFFH find the starting address?
(17) Difference between TCP/IP and OSI model
(18) Difference between Bridge and router
(19) A graph was given : " a qudrilateral with 1 diagonal " find the number of trees in the
graph
(20) Difference between TCP and UDP
(21-23) Pass by reference in C (3 questions)
(24) Synchronisation technique for IPC ( probably which method among the 4 choices was
best was asked)
(25) Address of RST 6.5

(26) Preorder Traversal


(27) Infix to Postfix
(28) What data structure is used to transform infix to postfix?
(29) 4 bit computer , size of ROM given , output of ROM gives the address , design a mod-n
counter
(30-31) FIFO , LRU page trace
(32) How many flip-flops in MOD-33 counter?
(33) printf("\nab\bcd\ref");
(34) doorom hello test
find argc and argv
(35) call main()
main()
{
toupper("Hello");
main();
}
what does this piece of code does?
(36-39) 4 question from Understanding Pointers in C on Pointer , Array , all from exercise in
the book
(40-41) 2 questions on precedence rule
HFCL CAMPUS TEST [2]
(1) ICMP protocol which layer?
(2) Ping - which protocol implemented?
(3) FTP - which protocol implemented?
(4) What kind of handshaking is used in TCP/IP?
(5) IP addressing ClassA , ClassB , ClassC
(6) End to end error correction is done by which layer ?
(7) Question on address bus and data bus ALE
(8) 16 bit address bus and 8 bit data bus , how much memory can be interfaced ?
(9) 1 bit opcode , (n-1) operand , find the length of Program Counter
(10) 4 bit ROM
(11) What is the benefit of memory interleaving ?
(12) How many maskable and non-maskable interrupt in 8085

(13) RISC what kind of Control Unit is implemented ?


(14) In Pipeline architechture , what is the value of CPI (Cycles Per Instruction)
(15) Where TLB is used?
(16)
struct a
{
char b[7];
char *s;
};
struct b
{
char *t;
struct a y;
};
struct b q={"Raipur" , "Kanpur" , "Jaipur"};
printf("%s %s" , q.t , q.y.s);
printf("%s %s" ,++q.t , ++q.y.s);
Find the ouput
(17) Heapsort worst case complexity
(18) Binary search complexity
(19) Where far pointer is used?
(20) Why address of operator(&) cannot be used on register variables? TEST GUIDELINES

Answers should be indicated by placing a tick mark ( ) in the relevant box.

To change any answer already marked, cancel the previous mark by placing

an= symbol. Thereafter, place a fresh tick mark ( ).

All questions have only one right answer. If more than one answer is

indicated, the question will not be evaluated.

Use of Calculators; log tables etc. is not permitted.

The duration of this test is strictly 60 minutes. In case you continue to answer

beyond 60 minutes, your sheet will

not be evaluated.

Any attempt to impersonate will be viewed seriously.


SECTION A

Directions : For each question in this section, select the best of the choices given
1.

#define AND &&

#define OR ||
#define LE <=
#define GE >=
main( )

{
char ch = D;
if((ch GE 65 AND ch LE 90) OR (ch GE 97 AND ch LE 122))
printf(Alphabet);
else
printf(Not an alphabet);
}
a) No Alphabet b) Alphabet c) error d)None
2.

main( )

{
int n[25];
n[0] = 100;
n[24] = 200;
printf(%d %d, *n, *(n + 24) + *(n + 0));
}
a) 200 100 b) 100 300 c) 100 200 d) None
3.

main( )

{
int arr[ ] = { 0, 1, 2, 3, 4};
int i, *ptr;
for(ptr = arr + 4; ptr = arr; ptr--)
printf(%d, *ptr);
}
a) 0 1 2 3 4 b) 4 3 2 1 0 c) 1 2 3 4 0 d)None
4.

main( )
{
struct employee
{
char name[25];
int age;
float bs;
};
struct employee e;
e.name = Hacker;
e.age = 25;
printf(%s%d, e.name, e.age);

}
a) Hacker, 25 b) Error message c) 25 Hacker d) None

5.

#define NULL 0
main( )
{
struct node
{
struct node *previous;
int data;
struct node *next;
};
struct node *p, *q;
p = malloc(sizeof(struct node));
q = malloc(sizeof (struct node));
p->data = 75;
q->data = 90;
p->previous = NULL;
p->next = q;
q->previous = p;
q->next = NULL;
while(p!=NULL)
{
printf(%d\n, p->data);
p =p->next;
}
}
a) 90 b) 75 c) 90 d) None 75 90 90

6.

main( )
{
int i=3;
i=i++;
printf(%d,i));
}
a. 3 b. 4 c. undefined d. Error

7.

What error would the following function give on compilation.


f (int a,int b)
{
int a;
a=20;
return a;
}

8.

#define sqr(x) (x*x)


main( )
{
int a,b=3;
a=sqr(b+2);
printf(%d,a);
}
a. 25 b. 11 c. Error d. Garbage value

9.

#define str(x) #x

#define Xstr(x) str(x)


#define oper multiply
main( )
{
char *opername=Xstr(oper);
printf(%s,opername);
}
a. oper b. multiply c. Error d. None
10.

main( )

{
printf(%c,abcdefgh[4]);
}
a. a b. e c. Error d. None
11.

main( )

{
printf(%d %d %d,sizeof(3),sizeof(3),sizeof(3));
}
a. 1 1 1 b. 2 2 2 c. 1 2 2 d. 1 1 1
Note: Assume size of int is 2 bytes.
12.

main( )

{
struct emp{
char n[20];
int age;}
struct emp e1={david,23};
struct emp e2=e1;
if(e1= = e2) printf(structures are equal);
}

13.

main( )

{
char a[ ];
a[0] = A;
printf(%c, a[0]);
}
a) Compilaltion Error
b) No output
c) A
d) None
14.

main( )

{
int x = 5;
printf(%d %d, x++, ++x);
return 0;
}
a) Error b) 6, 6 c) 5, 7 d) 7, 6
15.

main( )

{
int z = 4;
printf( %d, printf( %d %d , z, z));
}
a) 4 4 3 b) 4 4 5 c) 4 4 4 d) Error
16.

int i = 0;

main( )
{
printf(i = %d, i);
i++;
val( );
printf(After i=%d, i);
val( );
}
val( )
{
i =100;
printf(vals i=%d\n, i);
i++;
}
a) i =0 b) i=0 c) Error d) None of the above

vals i=100 vals i =100


i =1 i=101
vals i =100 vals i =100
17.

main( )

{
int a[ ] = { 10, 20, 30, 40, 50};
int j;
for (j = 0; j < 5; j++)
{
printf( \n %d, * a);
a ++;
}
}
a) 0..5 b) 0..4 c) Error d) None of the above
18.

main( )

{
int a[5] = {2, 4, 6, 8, 10);
int i, b =5;
for(i=0; i<5; i++)
{
f(a[i], &b);
printf(\n %d %d, a[i], b);
}
}
f(int x, int *y)
{
x = *(y) +=2;
}
a) 2 7 b) 4 9 c) 7 2 d) Error
4 9 6 11 9 4
6 11 8 13 11 6
8 13 10 15 13 8
10 15 12 17 15 10
19.

main ( )

{
int n=20, i = 0;
while(n- - >0);
i = i +n;
}

The end value of i is


(a)210 (b) 20 ( c) -1 (d) 200
20.

main( )

{
int i = 0; char ch = A
do {
printf(%c, ch);
} while (i++ <5| | ++ch < =F);
}
The output of above program is
(a) ABCDEF (b) AAAAAA BCDEF (c) A will be displayed infinitely (d) None of the above
21.

Assume that a,b,c are integer variables. Values of a,b and c are 2,3 and 1

respectively. Which of the following statement is correct regarding the assignment d


= a < b < c - 1;
(a) Above statement is syntactically not correct
(b) Value zero will be stored in variable d
(c) Value one will be stored in variable d
(d) Value -1 will be stored in variable d
22.

int count, sum;

main( )
{
for(count = 4; sum + = - - count);
printf(%d, sum);
}
(a) Programs goes into an infinite loop
(b) 356653 will be displayed
(c) 354453 will be displayed
(d) None of the above
23.

What will be the result of executing following program

main( )
{
char *x="New";
char *y="Dictionary";

char *t;
void swap (char * , char *);
swap (x,y);
printf("(%s, %s)",x,y);
char *t;
t=x;
x=y;
y=t;
printf("-(%s, %s)",x,y);
}
void swap (char *x,char *y)
{
char *t;
y=x;
x=y;
y=t;
}
a).(New,Dictionary)-(New,Dictionary)
b).(Dictionary,New)-(New,Dictionary
c).(New,Dictionary)-(Dictionary,New)
d).(Dictionary,New)-(Dictionary,New)
24.

main( )

{
static float a[ ] = { 13.24, 1.5}
float *j, *k;
j = a;
k = a + 2;
j = j * 2;
k = k/2;
printf(%f%f , *j, *k);
}
a) Error b) Some value c) No output d) None of the above
25.

main( )

{
static char s[ ] = Rendezvous;
printf(%d, *(s+ strlen(s)));
}

a) 0 b) Rendezvous c) 0 d) Error
SECTION B
Directions: For each question in this section, select the best of the answer choices
26.

A logic gate is an electronic circuit which

a. Makes logic decisions


b. Allows electron flow in only direction
c. Works on binary algebra
d. Alternates between 0 and 1
27.

The process of converting analog signal into digital signals so they can be

processed by a receiving computer is referred to as


a. Modulation
b. Demodulation
c. Synchronizing
d. Desynchronizing
28.

A distributed data processing configuration in which all activities must pass

through a centrally located computer is called


a. Ring Network
b. Spider network
c. Hierarchical Network
d. Data control Network
29.

Multiprogramming was made possible by

a. Input/Output units that operate independently of the CPU


b. Operating Systems
c. Both c and d
d. Neither a and b
30.

What is the alternative name for application software?

a. Utility software
b. Specific software
c. End-user software
d. Practical software
31.

Compared with the secondary storage, the primary storage is:

a. slow and inexpensive


b. fast and inexpensive
c. fast and expensive
d. slow and expensive

32.

EBCDIC ca code up to how many different characters?

a. 8
b. 16
c. 32
d. 64
e. 256
33.

program written in machine language is called as ___________ program

a. Assembler
b. Object
c. Computer
d. Machine
34.

A factor in the section of source language is

a. Programmer skill
b. Language availability
c. Program compatibility with other software
d. All the above
35.

An integrated circuit is

a. A complicated circuit
b. An integrating device
c. Much costlier than single transistor
d. Fabricated in a single silicon chip
36.

Data integrity refers to

a. Privacy of data
b. The simplicity of data
c. The validity of data
d. The security of data
37.

37. Which data communication method is used for sending data in both

directions at the same time?


a. Super duplex
b. Simplex
c. Half duplex
d. Full duplex
38.

What is the usual number of bits transmitted simultaneously in parallel data

transmission used by microcomputers?


a. 6
b. 9
c. 8
d. 7

39.

In the IBM PC - AT, What do the words AT stand for

a. Additional Terminal
b. Advance Technologies
c. Applied Technologies
d. Advanced terminology
40.

Different components on the motherboard of a PC processor unit are linked

together by sets of parallel electrical conducting lines. What are these lines called?
a. Conductors
b. Buses
c. Connectors
d. Connectivity
SECTION C
Directions : The following set of Questions is based on a brief premise and a set of rules.
For each question, select

the best answer from the five A particular seafood restaurant

serves dinner Tuesday through Sunday. The restaurant is

closed on Monday. 5 entrees

Egg, Chicken, Mutton, Fish and Lamb are served each week according to thefollowing
restrictions.

41.

Chicken is served on 3 days each week, but never on a Friday

Mutton is served on 1 day each week

Fish is served on 3 days each week but never on consecutive days

Chicken and Egg are both served on Saturday and Sunday

Lamb is served 5 days each week

No more than 3 different entrees are served on any given day

On which of the following pairs of days could the restaurants menu of entrees

be identical?
a. Friday and Sunday
b. Tuesday and Wednesday
c. Saturday and Sunday
d. Wednesday and Friday
e. Thursday and Friday
42.

Which of the following is a complete and accurate list of the days on which

Chicken and Mutton may be served?


a. Tuesday, Thursday
b. Tuesday, Wednesday, Thursday
c. Monday, Tuesday, Wednesday

d. Tuesday, Wednesday, Thursday, Friday


e. Tuesday, Wednesday, Thursday, Saturday
43.

If Fish is served on Saturday, it could be true that

a. Egg and Fish are both served on Sunday


b. Egg and Chicken are both served on Tuesday
c. Mutton and Chicken are both served on Thursday
d. Lamb and Egg are both served on Saturday
e. Mutton and Egg are both served on Friday
44.

Which of the following statements provide sufficient information to determine

on which 3 days Chicken is served?


a. Fish and Mutton are served on same day
b. Mutton and Egg are both served on Tuesday
c. Lamb is served on Saturday and Mutton is served on Tuesday
d. Fish is served on Saturday and Egg is served on all but one of the six days
e. Lamb is served on Sunday and Egg is served on Tuesday and Thursday
45.

Which word inside the brackets is always part of the word outside the

brackets? Trigonometry (a. Solids, b. Calculus, c. Progressions, d. algebra, e. angles)


46. One man can dig a trench in 2 hours
A second man can dig a trench in 3 hours
A third man can dig a trench in 5 hours
A fourth man can dig a trench in 6 hours
How many hours will it take to dig a trench if they all work together at their own
speeds?
a. 0.43, b. 0.63 c. 0.83 d. 1.03 e. 1.23
46.

One man can dig a trench in 2 hours

A second man can dig a trench in 3 hours


A third man can dig a trench in 5 hours
A fourth man can dig a trench in 6 hours
How many hours will it take to dig a trench if they all work together at their own
speeds?
a. 0.43, b. 0.63 c. 0.83 d. 1.03 e. 1.23
47.

ABCDEFGH

Which letter is two to the right of the letter immediately to the


left of the letter three to the right of the letter immediately to the
left of the letter E?
a. C, b. D c. A d. H e. G
48.

How many minutes past 11a.m. is it, if two hours ago it was three times as

many minutes past 8 a.m.?

a. 55 minutes b. 35 minutes c. 25 minutes


d. 1 hour e. 30 minutes
49.

How many minutes before 12 noon is it, if one hour ago it was three times as

many minutes after 8 am?


a. 30 minutes b. 25 minutes c. 35 minutes
d. 45 minutes e. 40 minutes
50.

Insert the missing number below.

a. 156 b. 34 c. 124 d. 40 e. 104


51.

The recipe for a cake called for 2/3 cup of sugars. How many cakes did Jane

bake for a baked goods sale if she used 4 cups of sugar?


a. 2
b. 3
c. 4
d. 5
e. 6
52.

A new copy machine can run off 1,500 workbooks in 8 hours, while it takes an

older copy machine 12 hours to do the same job. What is the total number of hours
that it would take both copy machines working at the same time, but independently,
to run off the 1,500 workbooks?
a. 4.4
b. 4.6
c. 4.8
d. 5
e. 10
53.

If the width of a rectangle is increased by 10% and the length is decreased by

20% by what percent does the area decrease?


a. 2%
b. 12%
c. 16%
d. 20%
e. 21%
54.

Suppose half of the people on a bus exit at each stop and no additional

passengers board the bus. If on the third stop the next to last person exits the bus,
then how many people were on the bus?
a. 20
b. 16
c. 8

d. 6
e. 4
55.

A car traveled 75% of the way from town A to town B by traveling at T hours

at an average speed of V mph. The car travels at an average speed of S mph for the
remaining part of the trip. Which of the following expressions represents the average
speed for the entire trip?
a. .75V + .25S
b. .75T + .25S
c. VT / (3S)
d. 4VT / (T+S)/3
e. 4VS / (3S+V)
56.

If you had a piece of paper that was 0.001 inches thick, how tall a pile would it

make if it were folded in half 10 times?


a. 2.047
b. 1.024
c. 1.023
d. 0.512
e. 2.048
57.

When he was a child, Gopal wanted to buy his mother 3 red roses for her

birthday. He decided to start saving on the first day of the month. On the first day, he
put ONE paise in his piggybank; on the second day he put TWO paise, on the third
day he put THREE paise and so on.
a. 13th day of the Month
b. 19th day of the Month
c. 24th day of the Month
d. 30th day of the Month
e. 21st day of the Month
58.

Mary was both 13th highest and the 13th lowest in a spelling contest. How

many people were in the contest?


a. 13
b. 25
c. 26
d. 27
e. 28
59.

t an international party all the Indian guest ate 2 sandwiches, each American

guest ate 4, each Australian ate 8, and all Russians guests ate 12. There had been a
total of 234 sandwiches served. The number of guests from each country was equal.
How many guests in total were in the party?

a. 12
b. 24
c. 36
d. 48
e. 9
60.

ABCDEFG

H
Which letter is immediately to the right of the letter three to the left of the letter
immediately to the right of the letter which is four to the right of the letter which
comes midway between the letters A and C?
a. F
b. G
c. E
d. D
InterWoven:
This company is in Bangalore and they conducted a telephonic interview to screen the people
at first level. This is the Technical interview conducted for 3+ years experienced in Java, J2EE.
__________________________________________________
1. Why do you want to leave current company ?
2. Explain MVC architecture and functionalities of various components ?
3. I have a file of very very large file size at client side, and I have a JSP page. Using this JSP
page, if I want to send the file to a servlet (this servlet will store it somewhere), what is the
best method to do it ?
4. What is the difference between normal beans and EJBs ?
5. How system level services in EJBs are managed ? And tell about Deployment Descriptor ?
6. What are various types of EJBs ?

T
1
2
3

here are Three streams


hardware ( sps)
software (gsg)
dsp
ppt for 2 hours
salary 28000
hardware 13 questions 1hour and 15 minutes
software 20 questions
Hardware questions

Hardware questions

1.

Draw the state transition diagram for sequence detector for the sequence 011.

if the first bit detected is zero then SCRH should be asserted when the second bit is 1
the SCRH should remain asserted when the third bit is 1 the FOUND should be
asserted and the SCRH should be disasserted. No bits should be left.
2.

ts=0.5 and Th=0.7 (for the this is the setup time reqd and hold time reqd)

buffer has the delay of 1nsec


what is the setup time _________ns
what is the hold time ___________ns
a.

b.

3.

for Each gate delay time is 0.5 ns

a. For each gate the delay time is 0.5 ns when will the glitch occur draw the glitch
waveform.
b. How the circuit should be modified to avoid glitch.
4.

describe the driving inverter? What inverter is weak and which has more

strength? why?

5.

what is the output of the following circuit?

6.

Draw the output waveform for the following ckt

Vtp=Vtn=1V

7.

obtain expression for the output (the i/ps may not be in correct

order)

8.

Determine the output waveform input is

9.
a.

What is the output waveform

b. What will happen when the AND gate is replaced by OR gate

10.

using 2:1 Mux and one inverter make XOR gate

11.

using 2:1 Mux make a transparent latch (D f/f)

12.

Design a ckt such that f (clk_out)=2 f (CLK_in) that is frequency doubling

circuit is needed

13.

Find the outputs of the following ckts

a). assume Vt = threshold voltage

b).

c).
Software questions:
Totally 20 questions were asked
* Most of them from C and datastructures (in equal nos)
* few from c++
1.

Numbers sequential search has to compare ______ elements on worst and

_______numbers on an average
2.

3.

Which of the following algorithm is not applicable for lived list

representation of numbers
1. binary search 2. Sequential search 3. Selection sort
4.

program to reverse a linked list all the variables 3 left pair of statements

they give, we have to write the logic part


i.e. live
typedef struct link
{
int element;
struct link *next;
}code;
struct link rev(node *p)
{
node *t;
node *r=0;
while(p!=___)

{
t=____;
p=_____;
r=______;
}
return=______
5.

exactly same type of question to check whether the given string is

palindrome or not
6.

they gave one program and asked what it is (it is fibonacci series)

7.

int i=7;

printf(%d,i++*i++); what is the answer


8.

int i=7;

printf(%d,i++*i++); what is the answer


7. struct code
{ int I;
int t;
}
/* some code */
main()
{
}
what is wrong ?
semicolon is missing after structure declaration
9.

Selection sort for N elements the no of comparisions needed and no of

swapping
10.

One question from heap sort

11.

One question about breadth search

12.

what is a language

* set of alphabet

* combination of alphabet
* strings of some alphabet
CATEGORY : JAVA - J2EE (3+ years experienced category)
About Company: NOVARTIS is a Swiss based MNC and world number one in Pharmaceutical. It
has a very good brand name. It's having around 80,000 employees. It's entering IT insustry
now to handle the large number of their in-house projects. As of now, the only development
center in India is in Mumbai.
The interviews are held for more than 3 years experience in JAVA, J2EE.
There are 3 rounds :
1. Technical Test (25 questions in 45 minutes time)
2. Group Discussion (30 minutes)
3. Technical & HR interview (30 minutes to 90 minutes)
I wrote here all the questions I remember. I think I almost covered most of them.
______________________
Technical Test
______________________
All are multiple choice questions.
1) Question on Static Methods, whether they can be overloaded or not
2) A java program on nested (inner) loops and it is asked what is the output of the program.
3) Once a Servlet is initialized, how do you get the initialization parameters ?
(a) Initialization parameters will not be stored
(b) They will be stored in instance variables
(c) using config.getInitParameters()
ANS: I think answer is (c)
4) A question on functionality of <forward> tag in JSP
5) If the cookies are disabled, how can you maintain the Session.
ANS: URL rewriting
6) If there are strict timelines and if you want to get high performance for JSP to DB access,
what method you suggest ?
(a) Moving application server in to same manchine as Database
(b) By storing results in Cache
(c) By implementing Connection Pooling
ANS: I think answer is (c)
7) A question on MVC architecture and the functionality of Controller and View.
8) Question on Design Pattern. (I don't remember it)
9) Which Design Pattern hides the complexities of all sub-systems ?
(I don't remember the options and also don't know answer.)
10) In CMP bean, which method executes only once in life time
(a) setEntityContext()
(b) create()
(c) remove()
(d) find()
ANS: I think answer is (b)
11) Which bean can be called as Multi-Threaded bean ?
(a) Entity beans
(b) Stateless Session beans
(c) Stateful Session beans
(d) Pooled Stateless Session beans
ANS: I think answer is (d)
12) A question on Threads in Java, whether we need to mention the word "Daemon" explicitly
to make a thread as Daemon.

13) A question on Transactions of EJB. I think the question is something similar to - "Which is
faster ?"
(a) TRANSACTION_UNREPEATABLE_READ
(b) TRANSACTION_REPEATABLE_READ
(c) TRANSACTION_COMMIT_READ
(d) TRANSACTION_UNCOMMIT_READ
(I don't know answer and also I am not sure of options. but the options are something similar
to this.)
14) Question on EJB Home Object, Remote Object and what functionalities will be performed
by each.
15) What is the difference between Server and Container
(a) A Container can have multiple Servers
(b) A Server can have multiple Containers
(c) A Server can have only one Container
ANS: I think answer is (b)
16) ejbStore() method is equivalent to
(a) SELECT
(b) INSERT
(c) UPDATE
(d) DELETE
ANS: I think answer is (c)
17) A question on where the garbage collection is done. I think the answer is : "finalize()"
method
18) A question properties of Primary key in Entity Beans (I don't remember the options
exactly.)
(a) Primary key consists of only basic data types in java
(b) Primary key can contain composite data types
Remarks on Technical Test : It's a bit difficult and lot of questions are on EJBs, JSPs and
Design Patterns.
Group Discussion
Topics:
1. Development of India
2. Qualities to become a successful manager
__________________________
Technical & HR Interview
__________________________
1) Tell about yourself ?
2) Explain your projects and what design patterns they follow !
3) Questions on Project management, Team management, Defect prevention, Quality
procedures (These, questions are in detail and on each aspect. This went on for around 1
hour.)
4) Tell something about your current company
5) Reasons for leaving current company.
6) Current salary & Expected salary !
6) Any Questions ?
Remarks on Technical & HR Interview : Be prepared well for projects you did and the Design
Patterns in J2EE. Also the Quality procedures.
Enter Your Comments
Test Paper :1

Paper Type
Posted By

: General - other
: admin

Philips Genaral Paper :


1.6*12*15 is the volume of some material.How many cubes can be inserted into that?
Ans.40
2.Two pipes can fill a tank in 10 1nd 12 hours while third pipe will make the tank empty in 20
hours.If all three pipes operate simultaneously,in how many hours the
tank will be filled ?
Ans.7hours 30 minutes.
3.Diameter of a beaker is 7cm. Mambler(some instrument)dia is 1.4cm.How many mamblers
has to be put to increase the water level by 5.6cm.
4.Cost of an item is x. It's value increases by p% and decreases by p%Now the new value is 1
rupee, what is the actual value.
Ans.(1000)/(1000-p*p).
5.A right circular cylinder and a cone are there.Base radius of cone is equal to radius of
cylinder.What is the ratio of height to slant side.
6.Distance between two poles is 50 meters.A train goes by 48 kmph in one minute.How many
poles will be crossed by the train.
7.A pole seen from a certain distance at an angle of 15 degrees and 100 meters ahead by 30
degrees. What is th height of pole.
8.15 people--each has to pay Rs.20.. 20 people--each has to pay Rs.18.. for 40 people--how
much has to pay ?
9.if p=2q then q=r*r,if p-odd then q is even,whether we decide r is even or odd ?
choices:a)first condition is sufficient
b)second condition is sufficient
c)both are sufficient
d)both are not sufficient
10.What is the value of m given that
i) m is devided by 2
ii) m is devided by 5
Ans: none of these
11.If he sells 40 magoes, he will get the selling price of 4 mangoes extra, What is his %
increse in profit ?
Ans: 25%
12.100 glasses are there. A servant has to supply glasses to a person If he supplies the
glasses without any damage he will et 3 paise otherwise he will loose 3 paise.At the end of
supplying 100 glasses if he gets 270 paise, how many glasses were supplied safely.
Ans: 95

Some questions on reasoning

Electronics.
1.Fastest logic ..
Ans: ECL
2.202.141.65.62 type of IP address belong to which class.
Ans:class B
3.Mod K ring counter requres how many number of flipflops.
Ans:K
4.ftp is in application layer.
5.Problem related to Ternary operations.
Ans:3
6.Problem related to macro # define square x x*x.
Ans:11
7.Problem related to 5 pointers..refer Page.123 of C prog.,by Keringan and Ritchie.
8.Ideal op-amp CMRR.
Ans: infinity.
9.13-bit DAC MSB resistance 2kohms.LSB resistance ?
Ans: 2k * 2 to the power of 12.
so take care of all the things
section I and section II and sec III
Questions r not in sequence .................
1. forall(roar(x)=> lions(x)) what does it mean ?
ans all lions roar .
2. p<=>q read about this
3. when 2 dice r thrown atleast one of them shows 6 probability is
ans 11/36.
4.2's complement of a 2's complement number is
ans . same no.
5. internatioaal court is at ----------ans Hague.
6. Meaning of ambasador ?
uca ( u can ans)
7. automata DFA dia is given
ans most probably B. chec
8.criticall section

( uca )
9. No of page faults asked by giving the sequence 2 3 6 7 1 3 4 8 9 10 3 2 4 ( just for
example I have given this seq .) thro LRU.
ans 6 ( corect).
10.problem in scheduling RR , a sequence is given just like abovewith time slice of 1 and
completion period for a process is asked
ans . 11
11.A directory has write permission then a user can create a file.
12.Java is
a. compiled
b. interpreted.
c. OOP
d. mutithreaded.
e. all
ans e.
13. Bubble sort is given ., No of times it executes
ans . n(n-1)/2
14. The appriximate ratio for no of internal nodes to total no
of nodes in k-ary tree of depth n.
ans. 1/k
15. what is fidelity
satya u check
16 what is microprogram.
u check
17. joke :: laugh
ans. cracker : blast
18. question on deadlock
19. How do u remove a ghost in t.v
u check ( clue. ghost means shadow of pictures i.e
20. Queston about a familiy eric, koren, davis etc .

ans . for first one of question. mother


21. If a channel has 2400 bauds what is the data rate it support. check in data commn book
stalins
22. if Band width is w what is data rate
ans 2w
23. A graph is given u have to answer
shotest path a to f ans. none of these
shotest path between a to f ans. 17
shortest path between b to f ans . 16
meanings of tact , grudging check
Section 1 - Electronics and Mathematics - 20 questions
section 2 - Computer Science
section 3 - Aptitude
Electronics and computer science
1. A circuit was given with lot of flip-flops etc and the operation of that
circuit was asked.
2. 15 software functions are there. It is known that atleast 5 of them are defective. What is
the probability that if three functions are chosen and tested, no errors are uncovered.
Ans : 10 * 9 * 8
-- -- -15 14 13
Computer Science
1.Java is
a) Multithreaded b) intrepreter c) compiler d) all of the above
Ans :d
2. The number of nodes in a k-level m-ary binary tree is :
Aptitude
A graph was given and questions regarding shortest path was asked.For one question shortest
path was asked and the answer is none of the above. Overall the question paper was easy.
I will try to mail u the entire question paper.
Interview:
HR questions:
1.What is your strengths and weaknesses
2.What are the values u respect
3.Site a reason why philips should hire u
4.What will u do if u are asked to manage a project which will definitely
skip its deadline.
Technical (for me)
1.What is runtime locatable code?
2.What is volatile, register definition in C
3.What is compiler and what its output.

Quark TEST PAPER


Aptitude and Computer Awareness
No Negative Marking.45 minutes to complete the test. Do not write anything on question
paper.
QUANTITATIVE APTITUDE
Directions for question nos. 1-2: Eighty Five children went to amusement park where they
could ride on merry go-round roller coaster and Ferris wheel .It was known that 20 of them
have took all three rides and 55 of them have taken at least two of the three rides. Each ride
cost Rs.1 and the total receipt of the amusement park was Rs.145.
1) How many children did not try any of the rides. ?
A) 5 B) 10 C) 15 D) 20
Ans. 15.
20 kids * 3 rides = Rs. 60
(55-20=)35 kids * 2 rides = Rs. 70
60 + 70 = Rs. 130
So, Rs. (145 130 = ) 15 are left for the other (85 55 = ) 30 kids . so only 15 of them can
take a ride and rest 15 will be left out.
145 rides were taken. 20 of them took all three, i.e. Rs. 60 were spent, so 145-60= Rs. 85 are
left for the others. Total kids were 85, so rest were 65. out of these 65,
2) How many children took exactly one ride?
A) 5 B) 10 C) 15 D) 20
Ans. 15
3) Four cities are connected by a road network as shown in the figure. In how many ways can
you start from any city and come back to it without travelling on the same road more than
once ?
A) 8
B) 12
C) 16
D) 20
Ans. 12.
Consider the top city, the following are the 3 routes possible, starting from the leftmost edge.
Since there are 3 edges emanating from each city and the figure is perfectly symmetrical,
these 3 routes are possible from each edge, hence for any given city, the total number of
routes = 4 * 3 = 12.
Directions for question nos 4-5:
A, B, and C are three numbers, Let
@(A, B)= Average of A and B
*(A, B)=Product of A and B
/(A, B)=A divided by B
4) If A=2 and B=4 the value of @( / (*(A,B),B),A) would be
A) 2
B) 4
C) 6
D) 16
Ans. 2
5) Sum of A and B is given by
A) *(@(A, B), 2)
B) /(@(A,B),2)
C) @(*(A,B),2)
D) @(/(A,B),2
Ans. A.

6) Let x<0, 0<y<1, Z>1 which of the following is false:


A) (x2-z2)has to be positive.
B) yz can be less than one.
C) xy can never be zero
D) (y2-z2) is always negative
Ans. A.
7) If As income is 25% less than Bs ,by what % is Bs income greater than that of A ?
A) 35%
B) 25%
C) 30%
D) None of these
Ans. D.
Directions for question nos 8-12: A professor keeps data on students tabulated by the sex and
the performance of the student. Data is kept in a computer disk, but unfortunately some of it
is lost because of a virus. Only the following could be recovered:
Performance Total
Average Good Excellent
Male 10
Female 32
Total 30
Panic buttons were pressed but to no avail. An expert committee was formed,which decided
that the following facts were self evident:
a) Half the students were either good or excellent.
b) 40% of the students were female
c) One third of male students were average
8) How many students were both female and excellent?
A) 0
B) 8
C) 16
D) 32
Ans. A
Performance Total
Average Good Excellent
Male 10 48
Female 32
Total 30 80
Panic buttons were pressed but to no avail. An expert committee was formed,which decided
that the following facts were self evident:
d) Half the students were either good or excellent. (implies the total of good and excellent is
40, i.e., hall of 80)
e) 40% of the students were female (this implies that 32 is 40% of the total students, hence
total students are 80, this implies that males are 48, calculate the rest yourself)
f) One third of male students were average
9) What proportion of good students are male?
A) 0
B) 0.73
C) 0.4
D) 1.0
Ans. B.
10) What proportion of female students are good?
A) 0

B) 0.25
C) 0.50
D) 1.0
Ans. B
11) How many students are both male and good?
A) 10
B) 16
C) 22
D) 48
Ans. C
12) Among average students, what is the ratio of male to female?
A) 1:2
B) 2:1
C) 3:2
D) 2:3
Ans. D
ANALYTICAL
Directions for Questions Nos: 13 to 17
Five executives of a multinational company met in Bombay:
Mr. Ram can speak Tamil and Hindi
Mr.Sham speaks Tamil and English
Mr. Raju converses in English and Hindi
Mr.Balu speaks Telugu and Tamil quite well.
Mr.Lalu can speak Hindi and Telugu
13) Which of the following can act as a interpreter when Mr.Raju and Mr.Balu wish to confer?
A) Mr.Ram Only
B) Mr.Sham Only.
C) Either Mr.Ram or Mr.Sham
D) Any of the other three executives.
Ans. D
14) Besides Mr. Lalu, which of the following can converse with Mr.Balu without an Interpreter?
A) Mr.Ram Only
B) Mr.Sham only
C) Mr.Ram and Mr.Sham
D) Mr.Raju Only
Ans. C
15) Which of the following cannot converse without interpreter?
A) Mr. Sham and Mr.Lalu.
B) Mr. Ram and Mr. Sham
C) Mr. Ram and Mr. Raju
D) Mr. Sham and Mr. Balu
Ans. A
16) If a sixth executive is brought in, for him to be understood by the maximum number of
original five, he should be fluent in?
A) English and Telugu
B) Hindi and Tamil
C) Telugu and Hindi
D) Hindi and English
Ans. B
17) Of the languages spoken the most common languages are
A) English and Tamil
B) English and Hindi
C) English and Telugu

D) Hindi and Tamil


Ans. D
Directions for Questions Nos:18 to 21
Four people of different nationalities live on the same side of a street in four houses each of
different color. Each person has a different favorite drink. The following additional information
also known:
The Englishman lives in the red house.
The Italian drinks tea.
The Norwegian lives in the first house on the left.
In the second house from the right they drink milk
The Norwegian lives adjacent to the blue house
The Spaniard drinks fruit juice
Tea is drunk in the blue house.
The White House is to the right of the red house
18) Milk is drunk by
A) Norwegian
B) Englishman
C) Italian
D) None of these
Ans. B
19) The Norwegian drinks
A) Milk
B) Cocoa
C) Tea
D) Fruit Juice
Ans. B
20) The color of Norwegians house is
A) Yellow
B) White
C) Blue
D) Red
Ans. A
21) Which of the following is not true:
A) Milk is drunk in the red house
B) Italian lives in the blue house
C) The Spaniard lives in a corner house
D) The Italian lives next to Spaniard.
Ans. D
Directions for Questions Nos: 22 to 23
Kya-Kya is an island in the south pacific .The inhabitants of Kya-Kya always answer any
question with two sentences, one of which is always true and other is always false.
22) You are walking on a road and come to a fork. You ask the inhabitants Ram, Laxman,
Lila,Which road will take me to the village?
Ram says,I never speak to strangers. I am new to this place
Laxman says,I am married to Lila. Take the left road.
Lila says,I am married to ram. He is not new to this place
Which of the following is true?
A) Left road takes you to the village
B) Right road takes you to the village
C) Lila is married to laxman
D) None of above
Ans. A.
Ram said he never talked to strangers, but he spoke to a stranger, this means that this
statement is false, hence his other statement must be true, hence the second statement of
Lila is false, hence her first statement is true that is she is married to ram, hence the first

statement of Laxman is false, hence his second statement is true, that is take the left road.
23) You find that your boat is stolen.You question three inhabitants of the island and they
reply as follows:
John says,I didnt do it. Mathew didnt do it
Matthew says,I didnt do it. Krishna didnt do it.
Krishna says,I didnt do it .I dont know who did it.
Who stole your boat?
A) John
B) Matthew
C) Krishna
D) None of them.
Ans. B
Matthew said he didnt know who did it, but he also said he didnt do it, which means he
knows who did it, which means his second statement is false, which means his first statement
is true
Directions for question nos 24-25: There are five trains A, B, C, D and E that run between the
following stations:
Bombay and Pune
Calcutta and Bombay
Pune and Goa
Goa and Bombay
Pune and Calcutta
Trains A and D do not go to Bombay, B&C do not go to Calcutta and C & D do not touch Goa.
24) Train E goes from to and vice-versa
A.Pune and Calcutta
B.Bombay to Goa
C.Bombay to Calcutta
D.Goa to Pune.
Ans. C
25) Which train runs between Calcutta and Pune?
A) A
B) B
C) C
D) D
Ans. D
COMPUTER AWARENESS
26) The device that can transform digital data into analog data is called a
a)transformer
b)network
c)carrier
d)modem
Ans. d
27) Following is true about the IP of a machine
a) It is 48-bit and will always be unique around the world.
b) It is 48-bit and is not necessarily be unique around the world.
c) It is 32-bit and will always be unique around the world.
d) It is 32-bit and is not necessarily be unique around the world.
Ans. c
28) A machine having 64MB memory runs a executable which is 300MB on disk. This is
achieved by:
a) Use of FAR pointers

b) Page swapping.
c) Save some variables on another machine on network.
d.) Cannot be run on the machine.
Ans. b
29) Which of the following is true about thread and process startup speed:
a.) The startup of a thread is faster than a process.
b.) The process startup is faster as it is directly controlled by the OS.
c.) They will be equal.
d.) Depends on OS that is used. Faster on Windows98 slower on NT.
Ans. a
30) What causes "Thrashing" of a program :
a.) The constant swapping of program due to page faults.
b.) The inability of a program to get assess to a network resource.
c.) A near overflow / underflow of a variable.
d.) Assessing a memory area not allocated to the process.
Ans. a
31) Turbo-C is a / an
a.) IDE and C compiler/linker.
b) C-compiler/linker
c) C .
d) code generator.
Ans. a
32) The path of creation of an executable is :
a.) coding, linking, compiling, parsing.
b.) coding, parsing, compiling, linking.
c.) coding, compiling, parsing, linking.
d.) coding, compiling, linking, parsing.
Ans. b
33) Memory leak in software is due to
a.) Heavy recursion used in logic.
b.) Using structures of large size
c.) Improper use of the CPU registers.
d.) Improper release of allocated memory .
Ans. d
34) A "stable sort" is different from "sort" in the following way
a) Stable sort handles multiple thread access.
b.) Stable sort maintains the order of equal entities as it was in original sequence.
c.) Stable sort will always sort using the fastest scheme available in the library.
d.) Stable sort can handle exceptional conditions like interrupts in software.
Ans. b
35) The classic way of checking whether a mathematical expression has matched paranthesis
will employ the following data structure :
a.) List.
b.) Directed Graph
c.) Threaded Binary tree.
d.) Stack.
Ans. d
36) The fastest sorting algorithm for a Random set of numbers is:
a.) Quick sort
b.) Shell sort
c.) Bubble sort

d.) Double Bubble sort.


Ans. a or b, I dont know
37) Which of these items is not a form of IPC:
a.) Shared Memory
b.) Pipes.
c.) Message queues.
d.) Semaphores
Ans. b
38) The term "socket" in software refers to:
a.) The software primitive which allows access to the hardware attached to the computer.
b.) The API exposed by drivers to assess a hardware.
c.) End point of connection used to transfer data programmatically.
d.) Th primitive used by OS to get assess to the CPU for process scheduling.
Ans. c
39) Which of these statements is True:
a.) XML is a sub-set of HTML.
b.) XML is a less generic markup language standard derived from SGML.
c.) XML is HTML for Xtended Interfaces like mobile-phones.
d.) XML is a Xtension of HTML which defines new tags.
Ans. d
40) DCOM and CORBA are:
a.) Specifications which enable faster downloads on the net.
b.) Specifications that allow objects to be accessed in a location independent manner.
c.) Parallel implementations of XML by Microsoft and Sun respectively..
d.) Specifications to store objects on disk, for later retrieval.
Ans. b
41) The Process that involves monitoring and improving the software product development is:
(a) Quality Assurance
(b) Quality Control
(c) Quality Improvement
(d) None of the above
Ans.
42) An executable test that verifies a functionality of the software unit with given input and
expected output is called:
(a) Test Script
(b) Test Plan
(c) Test Case
(d) All of the above
Ans. maybe c
43) A Bug in the software is, when there is
(a) Application Crash
(b) Feature Failure
(c) Loss of Data
(d) All of the above
Ans. maybe a, or probably d
44) Testing based on External Specifications without knowledge of how the system is
constructed:
(a) Black Box Testing
(b) White Box Testing
(c) Stress Testing
(d) Performance Testing

(e) None of the above


Ans. a
45) Which of the following is false
(a) QA is a process defined to attain Quality Standards
(b) QC is testing of the product during its production workflow
(c) A Test case could contain many Test Plans.
(d) A Test Plan could contain many Test Script & Test Cases
Ans. c
46) A Printing Machine that transfers impressions from Flat Plate to Rubber Cylinder, thence to
paper is called
(a) Laser Printer
(b) Press, Offset
(c) Digital Printer
(d) All of the above
Ans. maybe Offset
47) Printing process in which ink is applied to paper or board from raised portions of printing
plates or type is called:
(a) Printing, Letterpress
(b) Printing, Flexographic
(c) Printing, Silk screen
(d) None of the above
Ans. maybe letterpress
48) Yellow (lemon), Magenta (cold red), Cyan (blue-green) are the three
(a) Process Colors
(b) Monitor Colors
(c) Special Colors
(d) Spot Colors
Ans.
49) Leading specifies:
(a) The space between the lines in a paragraph.
(b) The space between the base of a line to the base of the following line in a paragraph.
(c) The space between the top of the X height and the bottom of the X height of the following
line in a paragraph
(d) The space between the beard of the top line and the beard of the bottom-line.
Ans.
50) Which is a typical page layout program out of the following software products:
(a) Adobe Photoshop
(b) Adobe PageMaker
(c) Macromedia FreeHand
(d) Macromedia Director
Ans. B
SCT Sample test Paper

1.

Rs.1260 shared amonng A,B,C in the ratio 2:3:4.What is the C's Share?

Ans: (4/9)*1260 =560


2.

There are 2 cups one half filled with tea and other half filled with coffee.If

1 tea spoon of tea is takebn and mixed with coffee cup & 1 tea spoon from

thecoffee mixture is taken is mixed with tea cup.Which has higher concentration?
Ans: Tea
3.

Jack is taller than Peter.Bill is Shorter than Jack.

a) Bill is Taller than Peter


b) Bill is Shorter than Peter
c) Bill is as Tall as Peter
d) imposssible to say
Ans: d
4.

BGLQ:YDIN:VBGL:?

Ans: EJOT
5.

A Room has round table at one corner.The one edge of the table is 5 inch

from the wall and the other edge is 10 inch from the other end of the wall.What is
the diameter of the table.
6.

A passage is given in a jumbled manner.Rearrange and give a suitable

heading.
ST Microelectronics
there were two papers
1. separate for the hardware (electonics people)
2. and other for the software (comp).
Software paper
There were 3 sections the questions in these sections were mixed with 2-3 aptitude question,
questions on comp n/w & OS were 7-8, 1-2 on CSO, 1 que on controls, 1 on sampling theorem
some on Comp Arch. & digital logic & 7-8 on C.
section 1 contains 11 questions
section 2 contains 13 que
section 3 contains 13 que ( total = 37 que , marks= 50)
All the 3 sections was compulsary and u've to give a preference among the section 2 & sec 3
so that the weightage for the second one will get doubled. Negative marking was there.
here are some of the ques which i remember
1. which conversion is not possible
a. float to int
b. int to float
c. char to float
d. all are possible
Ans: d

2. threads have which thing in common


a. register set
b. data section
c. thread id
d. ...
Ans : b
3. one que like
main()
{
int x=5, y;
y= x*x++ * ++x ;
// print x and y
}
4. A CPU has four group of instruction set A, B, C, D
CPI of A = 1
CPI of B=3
Cpi of c =2
cpi of d= 4
the cpu access 20% of A, 30% of b, 30% of C and 20 % of D
what will be the average CPI.
Ans: 1*20/100 + 3* 30/100 + 2* 30/100 + 4* 20/100
( this que was repeated in section 2 & 3)
5 . a question on hit ratio n effective memory access time.
6. main()
{
int a=10,b=5
while ( --b>=0 && ++a)
{
--b;
++a;
}
print (a);
print (b);
}
ans: a=16, b=-2
7. main()
{
char i;
for (i=0; i<=255; i++)
{
printf("%c", i);
}
}
Ans: never ending loop
8. One question on controls systems
to find the transfer functn
poles n zeroes were given in a graph
ans: s(s-2)/(s-3)(s-4)
9. one question on sampling theorem, if sampling frequency is fs then the signal having same

characteistics will be of frequency....(in terns of fs)


10. one on the signal to noise ratio
- if the amplitude of the signal is reduced to half & N bits samples r used with M quantiztn
level, then the SNR will be reduced by a factor of
Ans: 6 db
11. questn on calculating the bit rate to be transmitted across the given capacity channel
12. calculating the checksum for the bits to be transmitted given the frame- 11000101 and
generator is1100.
13. calculating the no of bits required for the error detection & the error correction for the
given codeword set.
codeword a:
0000
0001
0011
1111
codeword b:
101111
.
.
.
.
110101
14. options were given to choose as which was an example of multitasking.
a:multiple remote users accessing a server
b:user working on spreadsheet, downloading some matter from internet
c:multiple programs resident in memory
15. CA in CSMA/ CA stands for
a. collision approval
b. collision avoidance
c. critical access
16. in a triangle, without changing the angle, if we double the sides,then new area will be
asn. four times
17. there is a pipe having dia 6mm, then how many pipes having 1mm dia wiill be needed to
provide same amount of water.
ans . 36
18. in which of the folwng schemes after page replacement the entered page will enter in the
same memory location as of the replaced one
a. direct mapping ( Ans)
b. n-set associative
c. associative
d. none of them
19. belady anamoly is related to.
ans. page replacement algos
20.which one uses cache mechanism
ans TLB
21.what will happen in following code..
signal(mutex)

critical section
wait(mutex)
ans. violation of mutual exclusion
22.an RLC ckt was given, fuctioning of ckt to be determined.
a: will act like FM
b: PM
c:AM
d: none of the above
23.
int i=0;
switch(i)
{
case 1: printf("hi");
case 0: printf("zero");
case 2: printf("world");
}
ans: zeroworld
24.which one is the declaration of static string
a: static string
b: 'static string'
c: "static string"
d:char sting[30]
25.a que on file handling in c
a: file cant be opened
b:msg.txt is copied to msg
c:only first string be copied
d:
26. which of the fuction will store a 100 char string in X
a: fread(x,100,....)
b. fread(100,x,.......)
c.gets(x)
d.read(x)
ST Microelectronics
there were two papers
1. separate for the hardware (electonics people)
2. and other for the software (comp).
Software paper
There were 3 sections the questions in these sections were mixed with 2-3 aptitude question,
questions on comp n/w & OS were 7-8, 1-2 on CSO, 1 que on controls, 1 on sampling theorem
some on Comp Arch. & digital logic & 7-8 on C.
section 1 contains 11 questions
section 2 contains 13 que
section 3 contains 13 que ( total = 37 que , marks= 50)
All the 3 sections was compulsary and u've to give a preference among the section 2 & sec 3
so that the weightage for the second one will get doubled. Negative marking was there.
here are some of the ques which i remember

1. which conversion is not possible


a. float to int
b. int to float
c. char to float
d. all are possible
Ans: d
2. threads have which thing in common
a. register set
b. data section
c. thread id
d. ...
Ans : b
3. one que like
main()
{
int x=5, y;
y= x*x++ * ++x ;
// print x and y
}
4. A CPU has four group of instruction set A, B, C, D
CPI of A = 1
CPI of B=3
Cpi of c =2
cpi of d= 4
the cpu access 20% of A, 30% of b, 30% of C and 20 % of D
what will be the average CPI.
Ans: 1*20/100 + 3* 30/100 + 2* 30/100 + 4* 20/100
( this que was repeated in section 2 & 3)
5 . a question on hit ratio n effective memory access time.
6. main()
{
int a=10,b=5
while ( --b>=0 && ++a)
{
--b;
++a;
}
print (a);
print (b);
}
ans: a=16, b=-2
7. main()
{
char i;
for (i=0; i<=255; i++)
{
printf("%c", i);
}
}

Ans: never ending loop


8. One question on controls systems
to find the transfer functn
poles n zeroes were given in a graph
ans: s(s-2)/(s-3)(s-4)
9. one question on sampling theorem, if sampling frequency is fs then the signal having same
characteistics will be of frequency....(in terns of fs)
10. one on the signal to noise ratio
- if the amplitude of the signal is reduced to half & N bits samples r used with M quantiztn
level, then the SNR will be reduced by a factor of
Ans: 6 db
11. questn on calculating the bit rate to be transmitted across the given capacity channel
12. calculating the checksum for the bits to be transmitted given the frame- 11000101 and
generator is1100.
13. calculating the no of bits required for the error detection & the error correction for the
given codeword set.
codeword a:
0000
0001
0011
1111
codeword b:
101111
.
.
.
.
110101
14. options were given to choose as which was an example of multitasking.
a:multiple remote users accessing a server
b:user working on spreadsheet, downloading some matter from internet
c:multiple programs resident in memory
15. CA in CSMA/ CA stands for
a. collision approval
b. collision avoidance
c. critical access
16. in a triangle, without changing the angle, if we double the sides,then new area will be
asn. four times
17. there is a pipe having dia 6mm, then how many pipes having 1mm dia wiill be needed to
provide same amount of water.
ans . 36
18. in which of the folwng schemes after page replacement the entered page will enter in the
same memory location as of the replaced one
a. direct mapping ( Ans)
b. n-set associative
c. associative
d. none of them

19. belady anamoly is related to.


ans. page replacement algos
20.which one uses cache mechanism
ans TLB
21.what will happen in following code..
signal(mutex)
critical section
wait(mutex)
ans. violation of mutual exclusion
22.an RLC ckt was given, fuctioning of ckt to be determined.
a: will act like FM
b: PM
c:AM
d: none of the above
23.
int i=0;
switch(i)
{
case 1: printf("hi");
case 0: printf("zero");
case 2: printf("world");
}
ans: zeroworld
24.which one is the declaration of static string
a: static string
b: 'static string'
c: "static string"
d:char sting[30]
25.a que on file handling in c
a: file cant be opened
b:msg.txt is copied to msg
c:only first string be copied
d:
26. which of the fuction will store a 100 char string in X
a: fread(x,100,....)
b. fread(100,x,.......)
c.gets(x)
d.read(x)

Sample test paper


Patern:

60 questions 45 minutes

Reading Comprehension
Aptitude(Maths)
Synonyms

Antonyms
Find Grammatical Mistakes
Data Sufficiency
Synonyms
1.

Mandatory - compulsory

2.

affirmed - confirmed

3.

illicit - illegal

4.

capricious - whimsical

5.

alieviate - relieve,remove

Data Sufficiency
1.
1.

Two triangles are congruent

2.

two triangles are right triangles

3.

two triangles have same perimeter

1.

statement 1 is enough

2.

statement 2 is enough

3.

statement 1 and statement 2 together is required

4.

Statement 1 is enough and statement 2 is enough separately

5.

data is insufficient

Answers

2.

y>0
y square 2 - 4 > 0
Answers:
1.statement 1 is enough
2.statement 2 is enough
3.statement 1 and statement 2 together is required
4.Statement 1 is enough and statement 2 is enough separately
5.data is insufficient

Aptitude
1.

37.5 % of a number is 450 what is the 87.5 % of the number?

Ans:1050
2.

30% of 40% of 200

Ans:24
3.

SI = 240

R=6
N=4
P=?
Ans:1000
4.

diff bet. simple interest and compound interest for 2 years = p(N/100)

square 2 A problem based on this.

TVS LUCAS PAPER


The test was for 1 hour containing 100 questions. 50 and above was the cut off for selection.
Negative marking was there. Easy questions will be at the end. So dont waste time answering
difficult questions. Quants was dead easy.(no preparations are required).
Concentrate on technical topics.
1. Thyristor is a device ans: pnpn
2. LVDT works on the principle of
3. A diameter of the wheel is 20 cm if it revolved around 60 revolutions then how many
revolutions will be made by a wheel of 50 cm diameter.
4. Whether compressor or the turbine should be started first in the case of a gas turbine
5. Discharge Vs time graph is called as.
6. x/y=2; x=4 then (x-y)/y=?
7. p/q=2;what is the value of 2p/q+q ans : cant be determined
8. What is the cutin voltage of germanium and silicon diodes??
Theory questions from the following areas were asked.
9. Torque Vs speed characteristics of shunt motor
10. Dynamic breaking
11. Basics in Electron devices and Induction and Synchronous Machines
Problems on
12. Maximum Power Transfer theorem
13. Star to Delta Conversion.
14. Network Theory
Section 1 - Quantitative

1.

Sum of three nos is 98. The ratio between 1 and 2 is 2:3. The ratio between 2

and 3 is 5:8 . Find the second no?


2.

A car travels uphill at 30 km/hr and downhill at 60 km/hr. It goes 100 km

uphill and 50 km downhill. Find the average speed of the car?


3.

A batsman's avg in 12 innings is 24.00 . If his avg is to be double of the no of

innings (15 innnings), what should he score in the remaining three innings
(avg)?
4.

A man buys 1kg of sandalwood and 1kg of teakwood. He sells one for 10%

profit and other for 10% loss.What is total profit/loss percentage?


5.

In a class of 250 students, on JAN 2 15% of the girls and 10% of the boys are

absent. If on 100% attendance there are 10 boys. Find the percentage present?
6.

Mandrake has to choose from 4 from 10 people. There are 3 girls, 5 boys , 2

children. What is total probability that he will choose 1G , 2B , 1C?


7.

Some questions on Geometry?

8.

Some questions on Measurements?

9.

Some questions on permutation and combination.

Section 2 - Ananlytical
10.

Cities A - M are connected.Distance between any two cities is 1mile.They gave

which city connects which city.Q's based on these data


11.

One pblm on DI.Gulshan Kumar and Rakesh Roshan take a film. If they take a

art film it's 25 lacs or a multi starrer it's 75 lacs.They spend 28% on clothing ,11% on
lighting.Actor fee 22% for Multi starrer or 10 lacs for art film.Based on these data
some questions were asked.
Section 3 - Verbal
General GRE type q's.:Analogies,Reading Comprehension.
Section 4 - Visual reasoning.
Some figures were given and told to fill up the blanks.
Some figures were given and told to fill up the blanks. for the post of system trainee.
They need people to work in MAINFRAMES.The paper was ok, except a few questions others
were basic.They paper consisted of 4 sections. Quants,Anals,Verbal and Visual
Reasoning.They wnated us to attend all the sections, because they clearly stated that any
ommission, they will not value the papers and chances of getting shortlisted was little. After
the test they asked us to write a essay on any of these three topics.

My Family

My Career

What two things i would change if I was the prime minister of India.

INTERVIEW:

The tech interview was a breeze

Tell me abt urself

Some questions on my project.

Q's from subjects studied in past semesters.He actually told me to write 4

important subjects in each semester and asked q's from them.

Synopsis Placement Papers


Synopsis Paper

1. The grammer for A, B, S is given below.

S->Ax|By
A->Ax|y
B->x|y
possible ans is xy|xy

2. In n*n matrix , there non zero numbers in diagonal and either side
of the diagonal. If represented in one dimensional array, assign the
values which are non zeros.
find relation with i,j iteration and linear arry
like a[2*(i-1)+j] this
3. In-order of the letters is given as below:If written in pre-order like given below: write the
post-order:

4. fun(n)
{
if(n<=2)
return (1);
else
return ((fun(n-1)*fun(n-2));
}
find the order of complexity of the programme.
possible answer ---- N(2^n)

5.

6. If a and b are given. write the results of the programme


given below.

a=a XOR b;
b=a XOR b;
a= a XOR b;

answer is swaping of a and b so b,a is answer

7.
8.for a given CMOS the voltage is halved freqency doubled capacitance halved what is the
present CMOS power

ans (b)---- dynamic power is 1/2 *C*f*V^2

9.if a row daminated two dimentional arry in the following which one is advantage
and why?
a) for(i=0;i<1000;i++)
for(j=0;j<1000;j++)
temp=temp+a[i][j];

b) for(j=0;j<1000;j++)
for(i=0;i<1000;i++)
temp=temp+a[i][j]

I donot know ans

10. what is area of a Hexagon with side as 1unit

ans is 3*(sqrt(3))/2
11. If traverse in a chess board right and down from one corner to another corner how many
possible ways will be there

ans is C(16,8) or (16!/(8!*8!))

12. Tick the below which can biparate (graph theory)


1)tree 2)forest of trees 3) evencycle graph 4) oddcycle graph

ans is 1,2,3

13.The fig shown in below is a SRAM (1K* 4 bits) ,how many of this SRAMS are reqired to
design 16K of one byte

ans is 32 SRAMS and one 4 to 16 decoder

14. suppose two persons entering into one room in the morning 5 to 6 A.M. what is the
probability they will enter in 10 minits gap.
I donot know this answer
15. In a binary tree what is the hight and lowest no of levels for N nodes.

ans is highest is N and lowest is log(N+1) base 2

16.represent 3 and -3 in base -2 form taking two states (0,1) only

OTHER 5 QUESTIONS FROM SORTING TECHNICS SO PLEASE GO THROUGH SORTING


TECHNICS .

OTHE 5 QUESTIONS FROM FLIP-FLOP DELAYS EXAMPLE


1. THERE IS ONE LOOKAHEAD ADDER IS THERE ONLY TWO STAGES IT GIVES CARRY AHEAD
WHAT IS
THE TOTAL DELY IF IT IS 8 BIT ADDER.
2. WHAT IS PROPAGATION DELAY TIME FOR RING COUNTER.
3. WHAT IS MAX FREQENCY FOR SOME COUNTER SO PLESE CHECK COUNTES AND FLIPFLOPS
NeST PAPER ON 25th AUGUST AT TRIVANDRUM
Hi Friends, I'm Prabha Joseph from LBS Institute of Technology For Women.I attended the NeST placement @ SCT
clg on 25th Aug,2008.Cutt-off was 70%.There was ppt in the morning.After that they conducted separate test 4 CSE &
EC students. There was NO NEGATIVE MARKING.
The pattern (CSE) was as follows:
(1)IQ(20 questions in 20 min)
(a)4*4 matrix given with 1 box empty,find the no
(b).5,.55,.65,.8,.....(series)
(c)find no of triangles in given fig.,
(d)if log 3=.477 & log(1000)x=3,find value of x,odd one out,....
(2)APTITUDE(30 questions in 30 min)
(a) % problems-3 or 4 questions
(b) direction-from X movin forward 8m reaches Y,move towards rite 5m,reach Z,turn rite move 7m then turn rite &
move 5m.find distance from X 2 this pt?
(c) blood relation,
(d) time& distance-car travels in 15kmph after sometime increases speed to 18 kmph & total distance is 350km,find
time taken,
(e) ratio & proportion-prob on (M*H*D)/W,

(f) age problem,


(g) coding,mensuration(cylinder),
(h) simple & compound interest,
(i) permutation & combinations-hw mny ways can letter'CORPORATION' b arranged so that vowels r together,
(j) simple equation-If i add 7 times my age 7 yrs from nw to 3 times my age 3 yrs ago,i get 12 times my current age.hw
oldi will b 3 yrs from nw,
(k) progression-if 3rd term of GP is 3,find product of first 5 terms,
(l) clock.
(3)TECHNICAL(25 questions in 30min)
Features of OOP,output of given code(2 questions),break point,worst & avg case of sorting,min no of swappin in which
sortin,use of loader,use of compiler,
scheduling used in Windows XP. S->(S),S->x.Is it top down,bottom up parsing or ambiguous,two threads used in same
m/y if shared m/y,.....
After the test,they short-listed the CSE candidates to 18.The interview started just after the result was published.There
was only 1 panel(both tech & HR).
Interview lasted for 20min per person.First i was asked 2 introduce myself,then abt c++(pass by value,pass by
reference,static variable,dynamic m/y allocation),then questions based on our fav subj,wat impressed me in the
ppt,computer configuration,hw i update new computer technology.They'll ask abt the mini-project.
The result was published by 9:30pm.Out of 18 students,they selected 7 students & i was one of them.
Be confident in wat u say & always be pleasant.
ALL THE BEST.
Regards Prabha Joseph

SONY INDIA PAPER ON 29TH MAY AT BANGALORE


The placement procedure includes the following requirements:
From freshers up to 2 years experienced persons...B.E/ M.E/Diploma having aggregate of
above 70% through out each semesters and also in their X and XII....They also check for no
backlogs in your engineering history.. Be careful
It was an Online Test at the company itself in Bangalore...All your mark sheets including
degree, X, XII will be verified at the counters and will be allowed inside with a company seal..
Those showing fake mark sheets will be rejected either at the counter or inside the company...
The first section consist of Aptitude Test (Online) which is divided into
Analytical and Logical Reasoning + English (Verbal)
All are multiple choice questions with no negative marking...It is conducted for about 20+10
minutes...It mainly covers R.S Aggarwal NonVerbal and Verbal Questions.. If we have
gone through that then it will be easy to clear the test with in the stipulated time.....Many of
them were rejected in the first round..
On the first day itself there were around 2000 people...The instructions mainly helps to
remember the time for answering.. Bcoz if test is about to end in 10 minutes, background will
change grey and for last 2 min it will turn yellow...
I cleared the first round and the second round consist of Technical Test
There are options for us to choose C or C++ with networking or C++ with data structures or
Java...You can choose the language u are comfortable with...
I chose C++ with networking ...Those who attended the other tests can also please post
their experience...It was all 20 questions including 3 programs (with options) within 30
minutes...It consists of 10 C++ and 10 Networking concepts questions.Any how due to my
bad luck i was not able to clear that

I think the next rounds will be technical and HR interviews as usual...Please those coming
for attending sony make sure u are well prepared and thorough with all concepts,.. They will
be taking a few from a lot...
ALL THE BEST....

ABACUS COMPUTECH PAPER ON 21ST SEPTEMBER,2008


Hi friends,I am vinaya and I got selected in Abacus Computech .I would like to share my
experience with you allThe interview process had four rounds.
1.)Written test
2.)Group Discussion
3.)Technical Interview
4.)HR interview
WRITTEN TEST:
The written test consisted of 30 questions and the time is 30 min.
10-C questions
10-Aptitude
10-Verbal
The C questions are not that easy..but u will surely get through it if u check out
www.ittestpapers.com .
All the questions are from this website only. So , theres no need to panic.
Aptitude questions are also fine. U need to work during the exam..Just practice the
general aptitude questions in various websites. Its better to practice the test questions.
Just be attentive and concentrate on the questions, u will surely get through it.
Verbal is a walk on a cake.it is very easydont waste your time on Verbal.
Sometimes they dont consider verbal because it is that easy. Only concentrate on C and
Aptitude. Let me tell, the best thing is.NO SECTIONAL CUTOFF.Out of 30
u need to score 12 or 13(sometimes it is 10),that is more than enough to get through.
GD in Abacus is very easy. It is not a GD actually. They give a particular topic and ask u
to talk for 2 minutes. Each and every person will get their chance .They dont bother
what u talk but they see how u talk.My topic was UR MEMORABLE MOMENTS IN
COLLEGE and sometimes the current topics. I talked only for 1min,but I was very
loud ,clear, with a smile on my face and I talked looking at all instead of staring at the
HR.
Technical is a bit tough for CSE and IT. But for all other branches it is fine. They ask
about the basics in your subject. Being an IT student I had an interview for 15-20
minutes, but for other branches it went for 3-5 minutes. So if your from CSE or IT be
perfect with C, C++ JAVA. Of course it depends on your resume, dont make it
complicated with languages like J2EE or so.

HR is also easy. It will last for some 2-3 minute and at the most 5 minutes. Just be what
you are.Don't be artificial.Express your own views.they give certain
situations and see how u handle the situation.
So finally I got through all these rounds and on September 21st evening at 4:30 I got my
result. U know friends this is my 5h company and I couldn't get through the written also
in all the 5 companies I previously attended. So dont worry friends. If u are not selected
in a company then a better company is waiting for.ALL THE BEST

GMR PAPER ON 15th SEPTEMBER 2008


Hi i appeared for GMR- Airport.
Pattern is
1.Written exam (q's 4m Power system, control system, EMFT, Analog, Electrical machines)
2.Tech+HRInterview
3.Hard core Tech Interview (toughest of all)
some of interview q's are as follows
Starting Methods of IM
Speed Control of IM
application of IM
types Of circuit breaker n thr working
Relays, fuses
q's 4m power electronics
(application of phase control rectifiers, inverters, cycloconvertor, ac regulator, chooper)
Transformer efficiency and losses
cooling of transformer,
cooling of alternator,
synchronizing procedure 4 alternator..
what is power factor?
q's on transformer banks
why synchronous motor is not self starting??
why IM is self staring>??
Is transformer is a electrical machine ??(it is ..em )
i was asked 2 make a SLD
layout of thermal power station
q's 4m opamp
Types of UPS
dc motor applications (like where would we used dc series, shunt, compound etc...)

NALCO PAPER ON 28TH OCTOBER 2007,DELHI

Hi friends,Here are the some of the technical questions posed in the NALCO exam for
the post of Graduate engineering trainee on 28 oct. 2007 for Electrical branch. Out of 120
questions 60 technical questions, 60 non-tech questions and time duration was 2 and half
hours.

1) rms value of AC current is equal to main current at an angle?


a) 60
b) 45
c) 30
d) 90
2) Corona produce in two transmission line if?
a) When both placed closed
b) When both placed widely
c) Potential difference is very high
d) I didnt remembered
3) Diac is equal to?
a) Two diodes and two resisters
b) Trice with two gates
c) Two thyristor connect in antiparallel
d) four layer pnpn scr
4) In the Economic transmission point of view Kelvins gives?
A) Voltage drop at feeder
b) transmission losses
Two more option I didnt remember.
5) The essential condition for using servomotor for high torque at all?
a) Load
b) speed
c) Voltage
d) power
6) If torque of induction motor is 200n-m at slip 12%. What is the value of torque at slip
6%.....
a) 60n-m
b) 40
c) 100 n-m
d) 150
7) If speed of induction motor at full load is 950rpm then what is the speed at half load?
a) 1000 rpm
b) 975
Two options I forget
8) Find the value of cost +1/2dt where limit is 0 to /2
Option I didnt remember.
9) What is the slope of x3 + 6x2 + 2x +1=0?
Option I didnt remember.
10) For the purpose of constant speed we use?
a) Brushless dc motor
b) stepper motor
c) Shaded pole motor
d) sync motor
11) Essential condition for parallel operation of 1phase transformer?
a) Rating
b) Polarity
c) Impedance d) Voltage
12) Some of G.K. question
About placed of shriharikota space center.
13) Who did give the name of AL?
14) World literacy day?
15) World environment day?
16) If two heaters of 100W & 110 volt other are 150W & 110 volt connect in series with 220v
ac source then what is the total power?
17) What is the GDP rate of India in 2005-06?
18) What is the % rate of production of Al in India?
a) 10
b) 20
c) 7
d) 14
19) One passes which have 4Qs
20) Some fill in blanks
21) One Q about the find the % of fifth harmonics in a current wave equation.
22) 4pole 3phase 50 htz induction motor running at 1460 rpm. What is the speed of running
slip wrt to rotor?
23) Find the new kva rating of transformer which has 220 kva, 1watt iron loss and 2watt cu
loss?
24) Hays bridge used for the measurement of?
25) In R-L-C parallel resonant circuit
a) Impedance is max.
b) Resistance is min
Two more options I didnt remember.
26) Two bulb 100w & 50w respectively with constant resistances connect in series with
220v dc source then what is the value of voltage across first bulb?
27) AC ammeter used for measurement in
a) Pmmc
b) induction meter
c) Dynamometer
d) moving iron type meter

28) For ac current we use?


Same option
29) We preferred V-V connection over T-T connection why?
30) Suspension type insulator is used when?
a) High voltage
b) low voltage
c) Oscillating voltage
d) steady voltage
31) One question based on Nortons theorem?
32) One question based on inverted-V curve of synch motor.
33) One question based on load saturation curve.
34) There were 4 question like if A*B represent A is the son of B, some like that
35) Some questions from BAR-GRAPHS
36) Some questions from probability.
37) Some questions from Datainterpretation
38) Some questions from diodes.
39) One question from winding design for motor (find value of commutator segment)

There were still more question but I couldnt remember all of them. The questions mostly
have taken from electrical handbook, gate papers. Almost all questions were come simple
basics.

FIDELITY BUSINESS SOLUTIONS PAPER


Hi Friends,I am Sakthivel from Hindustan college of Engineering.. I am going to give
you the selection procedure of Fidelity Business solution.
Rounds.
1.Aptitude [technical + quantitive]
2.Technical interview.
3.Managerial HR.
Aptitude :
It will be very easy one if you are very clear in some important topics in R.S.Agarwal
book.. Ya friends they asked very basic aptitude questions and some technical questions
from C,C++,Data structure..
Totally 30 questions in first round [18 aptitude +12 technical questions]
Cut off will be for both aptitude and technical..
Technical interview:
That also very easy one. For me they have asked questions from C, C++, Data structures.
Thing is you have to answer clearly and boldly for whatever questions they are asking..
Managerial HR
Actually they will ask some technical questions in this round also and some usual
questions like Tell about yourself, where you will be after five years, Hobbies etc
They will see your overall performance from your aptitude round to last roundActually
they have conducted one more HR round for some of my friends.. With Gods grace, I
got selected as one among my ten college friends
All the best my dear friends

TCE PAPER ON 23rd AUGUST AT HYDERABAD

Hi frends.........,
This is K.Rupa from BHOJ REDDY ENGG COLL for WOMEN, Hyderabad. We
attended Tata Chemical as an off-campous which held in TKR coll, Hyd. There r mainly
four stages in the selection procedure.
They are like
(1) Written Test( The test consist of 2 parts Aptitude and Technical which is purely
concept based ) Duration is 1hr( 30 min Aptitude & 30 min Technical ). Aptitude
contain-30 questions & Technical contain-50 questions.
(2) G.D
(3) Technical Interview.
(4) H.R
Aptitude section:
This basically contain 5 verbal ques'n( synonyms-3 & antonims-2 ). This are so easy to
be answered i got (1) FEIGN, (2)SPECIFIC, (3)TEMPLET sorry i dont remember this...,
(4) TEDUOUS, (5)this is also so simple...
After this there are 5 ques'n based on Data Interpretation. They r so easy no need to
worry about that later i got some 10 ques'ns based on algebra, like...
(1) cos 45= ?
(2) If a man covers 750km in 2hrs, then much dis can he cover in 5hrs 45 min
(3) Two trains problem, moving in opposite directions with some velocities 500 & 700
km/hr. The dis is 2400. then find the time taken for them to meet.
(4) There are many ques'n based on trains ...aprox 3-4 ques'n there are some ques'n based
on areas like area of the sphere, cube is so and so ..... then find edge later i got some 10
ques'ns based on...
i dont know exactly but the que'ns are like
(1) The distance b/w the two circle present on the scale ( on the scale there r some circles
of same size, separated by same distance )
(2) The scale contain some readings and some instrument is beside that, then what
fraction of scale is covered by instrument.
(3) Some weight of 80kg is placed at one end of the pully, then how much wt must be
added on the other side of the pully to make it balance.... the balanace is not placed
exactly at the center , this is dis dependent the rest of the questions are also easy.......to
say aptitude section is so easy
Technical section:
This is so hard one. in this there will be 50q to be answ in just 30 min. this section
basically include main concepts, there is no need to worry for the people who r studing
for GATE.
(1) Pecklet no. def
(2)They had some question from the stuff we study in +2 like ideal gas equation, vander
wals eqn etc.

(3) nusselt no. is used when ........


(4) If temp inc then what happens to viscosity?
(5) Cox chart is used in ....Distillation, evaporation, drying r none
(6) Renolds no. is?
(7) Inertial forces to drag forces is called which no.?
(8) The stage belo saturation is called?
(9) Throtling is the process dependent on (options)Temp r Press r Volume
(10) which cycle is efficient (option) otto , air....
The rest are also easy.... I am not giving u the solutions for this question's bcz, i haven't
got selected to TCE. I wrote the written so perfectly but the selection process is some
what different yar so luck also matters alot. for us i thought it is the random selection.
we waited till 8 in the evening but unable to find a good news. but this sould nt repeat for
u people that is the basic reason y i am writing this questions.
prepare well it is better to take any GATE book and check out the basic concepts before
attemption the exam.
ok ALL THE BEST for all of u.

Hi I am attended ISoft Interview in Chennai,


The following are selection procedure.
1.Written Test
2.Technical Interview
3.Technical Inteview
4.HR Interview
1.Written Test
It consist of 75 Questions 1hour in Three section
1.Aptitude - 25 Questions
2.Analytical -20 Questions
3.C & Data Structure.-30 Questions
In Aptitude from basic,
1.Ratio
2.Time and work
3.General maths - prime number,odd & even number
4.Percentage
5.Profit & Loss
In Analytical section having 20 question in paragraph manner.
One paragraph have 5or 3 questions.
1.Like Blodd relations.
2.Red and Brown two marriage Group

3.Three house to Painted different colors and like that


4.P,Q,R,S,T,W,V to sit photo to rearrange the persons 1 who is nearer
to p 2,Who is immediate left of S. Like that questions will come.
In C& Data Structure having 30 questions from to exhibit ouput from
data structure,swap program, macros, Infix and Prefix notations.
Example
1.a=30,b=15
printf ("%d",a++*++b);
2.Data structure notations like linked list. How to Insert a node in
linked list, and so on.
3. x=25,y=35
x=x++ + y++
y=++y + ++x
printf ("%d %d",x,y);
4 Swap program and simple program
2.Technical Interview.
In first Technical they ask basic from c,c++,DBMS,java depends on
your area of interest.Also, They ask to write some program and query
like Fab..es series, prime number. and DBMS Query.
3. Technical Interview.
After shortlisted candiate from first technical interview. In some
deeply ask questions from Data structure Also DBMS Query, C,C++
Program
After finish your Second Technical interview HR Interview will conduct
after 15 days. In ISoft first select all candidate for only trainee not
Associate Software Engineer.After 6 Months Training The position will
change.
All the best
Regards,

XIUS PAPER ON 11TH AUGUST,2008


Xius test consists of 3 rounds
1. written test (only technical...no aptitude) 50 questions
2.HR interview
3.Technical Round
WRITTEN TEST

It consists of 50 questions.All are technical no aptitude.All are not objective.Some are one
blanks.Here are some questions I remember.
1.What is function pointer in c?
2.#define MAX 100
main()
{
printf("MAX");
}
o/p is MAX
3.What is difference between declaration and defining function ?
4.How can u print command line arguments of main function in C?
main(int argc,char *argv[])
{
for(i=0;i<argc;i++)
{
printf("%c",argv[i]);
}
be prepare well this concept is available files in C
5.In UNIX some commands
how to remove a directory,
how will you show hidden files
GREP FUNCTION
what is the use of CAT COMMAND?
How will you set fILE AXIS PERMISSIONS
WC command
SPOOL OUT COMMAND
printer related command
6.Rdbms querrys like
Write a querry to enable primary key constraint for a table?
To predict the output of a subquerry?
7.What is preprocesor directive?
8.IN java they asked about wrapper classes concentrated mostly on boolean command?
9.Is boolean a wrapper?
10.Two questions regardind round command
round(-5.667)
round(5.667)
11.Three questions on osi reference model(networking layers)
12.what is TCP/IP? HOW IT WILL WORK?
13.WHAT IS SOCKET?
14.TO WHICH LAYER IN NETWORKING TCP/IP BELONG TO?
OUT OF 50 marks CUTOFF WILL BE AROUND 27?
AFTER WRITTEN TEST WE HAVE HR ROUND
1.tell me about ur self apart from ur resume?
2.If u r not 4m it bachground she is asking why r u changing ur field?
3.why dont you do higher studies?
4.Explain ur project
5.Is MBA degree necessary for a software engineer ?why?
6.she has given some case studies and assesing ur time management,attitide towards
work,team orientation skills
next is a technical round
They are asking questions which you haven't answered in written test?
1.diff between signed int and unsigned int?
2.on macros ,inline functions?
3.what are unions and where are they used?
4.Some questions on linked list like a list contains values 3 5 67 5 they asked logic to print
this list in reverse order?
5.Logic for bubble sort and asked to derive a generalized mathematical equation to find no of

iterations occuring?
6.polymorphism in depth askd me to predict output?
7.Virtual functions in c++ depth?
8.In SQL THEY ASKED ME ABOUT TRANSACTIONS AND ABOUT COMMIT TRANSACTION KEY
WORD FUNCTIONS?

BRAIN VISA PAPER ON 1ST JUNE 2007

Test is very simple any body can crack it. You need to have knowledge of HTML, Java
script,
Flash
script,
XML,
average
aptitude
capability.
1)Aptitude
Test:
30
marks.
-logical
reasoning
questions
such
as
-K,P,M,R,L
are
4
boats,
5
colors
are
given
-(Green, yellow, orange, white, tan), we need to paint 5 boats, certain conditions are
given, M should be after p, p must be tan, white must be before yellow, orange at 3rd
position.
Find
the
solution
of
questions
asked.
-A table is given with certain values, along X-axis grains along Y-axis P,Q,R,S,T,U,V
countries
are
given
we
need
to
answer
few
question.
-Same
sort
of
logical
&
confusing
questions
r
given.
-Blood relation: A man said to one lady, The brother of your only sister is my wifes
only
brother
what
is
d
relation
of
that
lady
with
him?
-3
figures
are
given.
You
need
to
find
the
5th
figure.
-A is sitting above B, B is above C, theres 2 persons between D & C , D is above all of
them.
Find
who
is
3rd
from
bottom.
-2 more questions are same as above.
2)Technical
Test:
30
marks.
-10 questions on HTML, just study all the HTML tags properly along with attributes,
such
as:
<br>,
<body
bgcolor=red>,
<ol>,
<gl>
etc.
-10
questions
on
java
scripting,
XML.
Study
the
syntax.
-10 questions on c++, OOPS concepts, unit of programming in oops is?
3)Logical
Question:
Just
to
check
way
of
thinking.
-A pan contains pure milk. If we taken out 20% of milk and add water. We did the same
procedure
2
more
times
then
what
kind
of
mixture
it
is?
-A circular cake is given we need to cut it in to 8 pieces in just 3 cuts how can we cut it?
-A clock is given it is showing 12 oclock noon. Tell how many times both minute &
hour hand touches each other in whole day? How to find out their time of meeting?
4)HR
-It was cool just be confidant. Just accept everything they r offering u.

Round

PNESTC PAPER ON 3RD JUNE,2008


Company Name: Pnestec System Private Limited
4 Rounds

ROUND 1-Written
15 Questions on aptitutde
15 Questions on Vocab
15 Questions Technical(Java,VB.net,Asp.net)
Round 2-GD
Round 3-TI
Round 4-PI
Total Candidate Appeared:650 (Approx)
ShortListed After Written:104
ShortListed After GD:65
ShortListed After TI and PI :24
Written is easy if u have sound knowledge of Java, Asp.net. Apti Question were very easy.
English was bit tough for me but I Covered in Technical Section
Second Round was GD My topic was- What ails Indian sports? Is there any way to improve it.
Total there were 10 different topics.
Next was Technical Interview
Sir: Describe yourself
me:blah blah
Sir: What is your Favourite subject
me: java
sir: have u made any project in java
me: yes sir
sir : describe them
me: done
sir : are u comfortable with vb.net
me: yes sir i have made one project in vb.net n got 1st rank for that project in training
sir: what was your part in project
me: programming and Team Handling
sir: What was your backend
me: Sql Server
sir :Can you write a simple Query for me
me: i will try sir
sir: blah blah
me: explained
sir: tell me about your IIT Kanpur Project
me: Explained
sir: so can u make project in .net
me: yes sir
sir: ok any queries
me: Can i give my prefer any one Technology
sir: yes we work on .net n java so any one u choose
me :thank you sir
sir :ok
me: good day sir
sir :good day

Due to short time they didn't conducted PI .my interview was over at 12:30 and result came
on 7:30 Pm and luckily i was one of 24 who were finally selected. They prefer you if you come
from CS/IT Background. .Just be Confident and prepare 1 Language extremely well and it is
better if you know Java or VB.net or Asp.net

MINVESTA PAPER ON 5TH OCTOBER 2007,DRK COLLEGE


Hi every body this is pavan of Aurora.We had interview of minvesta company on october 5th
2007 in DRK college. Well the interview was quiet easy and consists of three sections. The
duration of the test is 1 hour.
Coming to 1st section.It consists of 10 questionns. This section consists of all theory
questions. Friends try to answer them in one line.I had questions like following:-

1q)What is the difference between a class and object?


2q)What is stored procedure? What are its advantages and disavantages?
3q)Which is better trigger or stored procedure?
4q)What is difference between data set and data reader?(.net)
5q)Write a querry for accesing unique rows from emp(Ename,Age) sorted by age?
6q)What is the difference between Function overloading, Function Overriding and Virtual
Functions?
7q)Difference between multiple and multilevel inheritence?
8q)Differnce between interfaces and abstract classes?
Sorry i don't remember remaining two. Like this he is concerntarting on OOPs, DBMS, .NET
Coming to the 2nd section. This consists of 20 questions. Questions on Aptitude. All the
qestions came from R.S.Agarwal. Questions like Ages, Time and work,distance....etc
Coming to the 3rd section. This consists of 20 questions. He had given all C programs and
asks us to point out the errors and outputs. All the questions are from Test ur C skills by
Yashwanth Kanithkar.
Thats all I'm still waiting fro the result...
ALL THE BEST

MINVESTA PAPER ON 5TH OCTOBER 2007,DRK COLLEGE


Hi every body this is pavan of Aurora.We had interview of minvesta company on october 5th
2007 in DRK college. Well the interview was quiet easy and consists of three sections. The
duration of the test is 1 hour.
Coming to 1st section.It consists of 10 questionns. This section consists of all theory
questions. Friends

try to answer them in one line.I had questions like following:1q)What is the difference between a class and object?
2q)What is stored procedure? What are its advantages and disavantages?
3q)Which is better trigger or stored procedure?
4q)What is difference between data set and data reader?(.net)
5q)Write a querry for accesing unique rows from emp(Ename,Age) sorted by age?
6q)What is the difference between Function overloading, Function Overriding and Virtual
Functions?
7q)Difference between multiple and multilevel inheritence?
8q)Differnce between interfaces and abstract classes?
Sorry i don't remember remaining two. Like this he is concerntarting on OOPs, DBMS, .NET
Coming to the 2nd section. This consists of 20 questions. Questions on Aptitude. All the
qestions came from R.S.Agarwal. Questions like Ages, Time and work,distance....etc
Coming to the 3rd section. This consists of 20 questions. He had given all C programs and
asks us to point out the errors and outputs. All the questions are from Test ur C skills by
Yashwanth Kanithkar.
Thats all I'm still waiting fro the result...
ALL THE BEST

The written exam is very easy. A little bit of time management will definitely take you to next
round. There were three sections:I. Aptitude
II. Critical reasoning
III. Verbal ability
for critical reasoning u need 2 be focussed, concentated and apply ur full mind and nothing
else u need 2 have(ofcourse gud luck is must!!).
for verbal ability the questions involve word meanings, opposites.
Time management is ofcourse important to answer all the questions in time.
aptitude is the easy one. just refer to R.S. Agarwal .refer some basic concepts in
streams,tank problems,percentage,etc..
IMPORTANT:
NEGATIVE MARKING is there .So be carefull in answering.
u will be given rough sheet. Solve ur answers on rough sheet as neat as u can.
Before the written exam u will be given a form. U r required 2 write ur % and some other
personal details and also paste a photo.
If u take ur photo in formals(tie,coat), that will be best.
Fill ur % CAREFULLY.
sectional cutoff will be there. so answer every section carefully.
Well thats all about written exam. After sometime d results were announced and our college
students those cleared written were asked 2 report with 2 copies of RESUME .
INTERVIEW:
In the interview of ASSURGENT, some general technical questions are asked based on ur
resume e.g. my friend mentioned about robotics so she was asked questions abt robot etc.
Basically they r not interested in ur answering, they r checking ur confidence levels.
So solve them nicely on the paper as u can or explain them verbally how r u solving ur
problem.
usually HRs of ASSURGENT want us 2 be very POLITE and confident.

So be POLITE and DONT SHOW UR ATTITUDE. DONT ARGUE with them.


Prepare some common things e.g. which newspaper u read, name of its editor, which
sections of paper u read, hw u gather information, wht u surf on internet etc
My HR was a very young person. My experience is as follows:
HR: come in
Me: gud afternoon sir
HR: have ur seat
Me: thnku sir
Hr: give ur resume
I stood and gave it
Hr: tell me abt urself
Me: bla bla
Hr: so krishna prasad, whats ur family background?
Me: bla bla
Hr: IS it ur first company?
Me: no sir.
Hr:u have good %,then why haven't u selected so far?
Me: bla bla
Hr: ur favourite subject
Me: Data structures
Hr: then tell me abt stack.
Me: bla bla
Hr: in ur hobbies u mentioned abt music. then who is ur favourite music director?
Me: A.R.REHMAN.
Hr: what is his first album?
Me: bla bla
Hr: what is his latest album?
ME: pray for me brother.
Hr: in which year ?
Me: bla bla
Hr: explain abt function, array?
Me: bla bla
Hr: what do u know abt assurgent company?
Me: bla bla.
Hr: what is site address of assurgent?
Me: www.assurgent.techno.com
Hr: o.k krishna prasad. Good time with u. U can leave.
Me: I came out with smiling face.
Dont argue with interviewer. Dont show attitude.
Be POLITE and HONEST. Of course hv gud body lang and eye contact etc etc.
Then after waiting for 5 days,results were announced and my name was there.22 were
selected.

Hai,
On 01st JUL 2008 , CORDYS, a product based company came to UNIVERSITY OF
HYDERABAD, (Hyderabad, Andhra Pradesh).
I am selected into Cordys and I want to share my experience with placement procedure.
Total 52 students was there in beginning, & finally only two are selected. In first round 9
were shortlisted for Technical round out of which 4 were shortlisted for Final (HR)
round. Finally two of them got selected.

Placement procedure cosisted of three rounds.


Written test, Technical Interview, HR.
Written test :
In written test there were about 65(40 Aptitude + 25 Computer Related) questions and the
time limit was 60 minutes. This test is MANUAL TEST and comprised of Psycometric
test, aptitude, and basic computer related questions. There was 1/2 negative marking on
Aptitude, & no negative marking on Computer Related questions.
Technical Interview

This was about 90 minutes for me. Questions were started only from Aptitude (what was
in written) and later from subjects such as DBMS, C, OS, CN, Software Engineering, JAVA,
and other general questions. First the interviewer posed questions to know whether I am
really interested for joining cordys or not.
1: They asked to write a program in any language which was asked in Written Aptitude
Paper (Question is not in
my mind, but it was completely logical as i can say), It took a long time to solved
finally.
2: He gave two tables, table 'A' consists of eid, prjtid table 'B' consists of prjtid ,
prjtname and ask to select those
students how work on a particular prjt name.
4. Asked on 'c' Linked List , circularly doubly linked list and practical examples for that.
6. OSqs, like Demand Paging, Virtual Memory Concepts, Deadlock concept with real-time
example, etc.
7 Some basic question related to Computer Network.
The overall question what they asked, i answered very comfortably, & with confidence.
HR (Near around 150 minutes)
Tell abt your self and family
Appreciable work u have done in your previous life.
Strengths, weakness, hobbies etc. What you planned to remove your weakness?

Priority related question, like which one u'll gv first priority after joining: CORDYS or
your FAMILY.
Some Technical question was asked in this round also.
1. Let us suppose you need to tell all the features of OOPS to your Grand-Father, who

doesn't know even a


single letter of Computer. What real life example will u give to make him clear.
2. They asked to write a program to find the angle based on clock time.
3. Some DBMS query basically it was from JOIN operation.

4. Finally they asked a very twisted kind of question, like suppose there are two different
groups of two different
companies in front of you, and you are selected in both. Now you have to decide which
company you'll prefer
to join and why? Also the reason to cancel other one.
Lastly some questions related to my behaviours.
TISL Questions
These Questions are from friends who gone for the exams sother may not have answers
This time he has not given
the number series.
Apptitude:
part 1 : letter sevies.
part 2 : figures
part 3 : quantitave
Technical:
Most question are on Unix and some in C and some in
windows 3.1
all question in Unix are From Kernighan & pike
part 1
It consists of number series. In some institutes alphabetical series is given instead of
number series.
1. 19,24,20,25,21,26,? ans:22
2. 11,14,12,15,13,16,? ans: 14
3. 10,2,8,2,6,2,? a:4
4. 8,9,11,14,,18,23,? a:29
5. 25,25,22,22,19,19,? a:16
6. 14,2,12,4,10,6,? a:8
7. 7,16,9,15,11,14,? a:13
8. 40,42,39,44,38,46,? a:37
9. 3,18,4,24,5,30,? a:6

10. 18,20,22,20,28,20,? a:22


11. 18,20,10,12,4,6? a:0
12. 7,6,8,5,3,7,? a:4
13 9,18,21,25,20,? a:30
14 3,3,4,8,10,36,? a:33
15. 30,28,25,20,34,28,? a:21
16. 4,8,16,32,64,128,? a:256
17. 8,16,24,32,40,48,? a:56
18. 13,11,14,12,15,13,? a:16
19. 6,18,36,108,216,648,? a:1296
20. 4,4,8,8,16,16,? a:32
21. 2,6,18,54,162,486,? a:1458
22. 4,20,35,49,62,74,? a:85
23. 10,18,15,23,20,28,? a:25
24. 4,10,8,14,12,18,? a:16
25 10,15,12,17,14,10,? a:16

Part 2

Consists of non-verbel reasoning(figures). Questions are not avilable part 3 (quantitative)


1.

A clerk multiplied a number by ten when it should have been divided by

ten.The ans he got was 100.what


should the ans have been? a:1
2.

If Rs20/- is available to pay for typing a research report & typist A

produces 42 pages and typist B produces


28 pages.How much should typist A receive? a:Rs12/3.

The average salary of 3 workers is 95 Rs. per week. If one earns Rs.115

and second earns Rs.65 how much is


the salary of the 3rd worker. Ans.105.

4.

A 16 stored building has 12000 sq.feet on each floor. Company A rents 7

floors and company B rents 4 floors.


What is the number of sq.feet of unrented floor space. Ans.60000
5.

During a given week A programer spends 1/4 of his time preparing flow

chart, 3/8 of his time coding and the rest


of the time in debugging the programs. If he works 48 hours during the week ,
how many hours did he spen debugging the program. Ans. 18.
6.

A company installed 36 machines at the beginning of the year. In March

they installed 9 additional machines and


then disconnected 18 in August. How many were still installed at the end of the
year. Ans. 27
7.

A man owns 2/3 of the market research beauro business and sells 3/4 of

his shares for Rs.75000. What is the


value of Business. Ans.150000
8.

If 12 file cabinets require 18 feet of wall space, how many feet of wall

space will 30 cabinets require? Ans.45


9.

A computer printer produced 176,400 lines in a given day. If the printer

was in operation for seven hours during


the day, how many lines did it print per minute? Ans.420
10.

From its total income, A sales company spent Rs.20,000 for advertising,

half of the remainder on commissions


and had Rs.6000 left. What was its total income? Ans.32000
11.

On Monday a banker processed a batch of cheques, on Tuesday she

processed three times as many, and on


Wednesday she processed 4000 cheques. In the three days, she processed 16000
cheques. How many did she
process on Tuesday? Ans.9000
12.

The cost of four dozen proof machine ribbons and five dozen accouting

machine ribbons was Rs.160/-. If one dozen accounting machine ribbons cost
Rs.20/-, what is the cost of a dozen proof machine ribbons? Ans.Rs.15

13.

If a clerk can process 80 cheques in half an hour, how many cheques can

she process in a seven and one half


hour day? Ans.1200
14.

In a library, there are two racks with 40 books per rack. On a given dya,

30 books were issued. What fraction


remained in the racks? Ans.5/8
15.

The average length of three tapes is 6800 feet. None of the tapes is less

than 6400 feet. What is the greatest


possible length of one of the other tapes? Ans.7600
16.

A company rented a machine for Rs.700/- a month. Five years later the

treasurer calculated that if the company


had purchased the machine and paid Rs.100/- monthly maintenance charge, the
company would have saved Rs.2000/-. What was the purchase price of the
machine? Ans.Rs.34000
17.

Two computers each produced 48000 public utility bills in a day. One

computer printed bills at the rate of 9600an hour and the other at the rate of 7800
an hour. When the first computer finished its run, how many bills did the other
computer still have to print? Ans.9000
18.

If a salesman's average is a new order every other week, he will break the

office record of the year. However, after 28 weeks, he is six orders behind
schedule. In what proportion of the remaining weeks does he have to obtain a new
order to break the record? Ans.3/4
19.

On a given day, a bank had 16000 cheques returned by customers.

Inspection of the first 800 cheques indicated that 100 of those 800 had errors and
were therefore the available immediately for data processing. On this basis, hwo
many cheques would be available immediately for data processing on that day?
Freshersworld.com
Ansns 140 Ans.14000
20.

A company figured it needed 37.8 sq.feet of carpot for its reception room.

To allow for waste, it decided to order 20% more material than needed. Fractional

parts of sq.feet cannot be ordered. At Rs.9/- a sq.feet, how much would the carpet
cost?Ans. a. Rs.324 b) Rs.405 c) Rs.410 d) Rs.414 e) Rs.685
21.

A tape manufacturer reduces the price of his heavy duty tape from Rs.30/-

to Rs.28/- a reel and the price of a regular tape from Rs.24/- to Rs.23/- a reel. A
computing centre normally spends Rs.1440/- a month for tapes and 3/4 of this is
for heavy duty tapes. How much will they save a month under the new prices?
Ans.Rs.87
22.

In a team of 12 persons, 1/3 are women and 2/3 are men. To obtain a team

with 20% women how many men


should be hired?Ans.8
23.

The dimensions of a certain machine are 48" X 30" X 52". If the size of

the machine is increased proportionately until the sum of its dimensions equals
156", what will be the increase in the shortest side? Freshersworld.com
Ans. 6"
24.

In a certain company, 20% of the men and 40% of the women attended the

annual company picnic. If 35% of all the employees are man, what percent of all
the employees went to the picnic? Ans.33%
25.

It cost a college Rs.0.70 a copy to produce a Programme for the

homecoming football game. If Rs.15,000/- was


received for advertisements in the programme, how many copies at Rs.0.50 a
copy must be sold to make
a profit of Rs.8000/- ? Ans. 35000
section I: 25 questions (ENGLISH) in 15 minutes
section II: 45 questions (QUANTITATIVE) in 45 minutes
section III: 30 questons (REASONING) in 30 minutes

SECTION I
1.

Few questions on finding out the segment of sentence which is wrong.

2.

analogy.

1. celebrate::marriage
ans.lament::bereavement
2. bouquet::flowers
ans.chain::link

3.

germ::disease

ans.war::destruction
SECTION II
1.

Maximum numbers that can be formed using all the 4 digits 6 4 8 1

without repetition and which is divisible by 9.( ans none)

2.

Find the number of sides of a regular convex polygon whose angle is

40degrees.

3.

a+b+c=0, then roots of ax^2+bx+c=0 is


1.imag 2.real 3.coincidental 4.zero

4.

Difference b/w the compound interest and simple interest for Rs.2500 for

2 years is given-----. find the rate of interest.


5.
6.

There was one more question on S.I and C.I

7.

The minimum number by which 60 is to be multiplied to generate a

square.
ans 15

8.

A monkey climbs 6 mts and falls 3mts in alternate minutes.Then time

taken to climb a tree 60metres high?

a. 35 b.37 c.32 d.34 (think the answer is 37)

9.

(This was the second last question) A bucket contains z drops. and it leaks

x drops in t secs.then the time required to empty the bucket(in minutes)?

10.

6 pipes fill or empty the cistern. find the number of emptying pipes iff it

takes 18hrs to fill and 18 hrs to empty.... (don't remember the question exactly)

11.

The largest no: which is a factor of 1080 and 729

12.

No: of spheres of radius 1 that can be got from sphere of radius (or

diameter don't recall) 8

13.

(think the last but three question)Travelling at 3/4th the speed a man is 20

minutes later then speed is??

14.

There are 6 keys and 6 locks. then number of combinations to betried out

to get the actual solution


a. 5^6 b.6^5 (don't remember the rest)

15.

Choosing 2 people out of 10 in how many combinations can a particular

person(some name) be always included....

16.

From 6 white balls and 7 black balls probability that 2 balls drawn at

random are of the same color?

17.
ans. 38

If a sales man gets successive gain of 15% and 20% then his actual gain?

18.

A string of pearls such that 1/3 is lost and of that 1/4th is missing,

remaining is 20 then actual number of pearls? ans. 40

19.

A man gets a gain of x%. but if he had sold at twice the cost price, what

will be his gain?(question not sure)


a. 2x b.200-2x c.100+x (not sure of the options)

20.

A clock was 7mts behind the actual time on 3 p.m. on wednesday and 8

mts ahead of actual time on (not sure) 4 p.m. friday. when will it show the correct
time?

21.

Boat moves upstream in 6 hrs and covers the same distance downstream in

5 hrs. then speed of a raft floating?(accuracy of question not sure)

22.

(this was the last question) no idea what it stands for........some kind of

notation like S(P(M((D(a,b),2))):P(M(S(D(a,b),........


options were
1. ab 2.(a-b)^2 3.(a+b)^2 4.none

23.

If x men working x hrs per day can do x units of work in x days, then y

men working y hrs/day would be able to complete how many units of work i y
days?
ans. y^3/x^2 (question in R.S. Agarwal)

24.

( this was a question in the first page of the section II booklet) a cone with

radius----- and height -----. a hemisphere covers the cone such that base of
hemisphere meets that of the cone. then the enclose volume.....(R.S. Agarwal
consists of similar questions)

25.

There was one more question on volume and surface area.....

26.

1 Rs, 50 ps , 25 ps coins are in the ratio ---------, then the number of 50 ps

coins if they sum to ------Rs. (similar question in R.S.Agarwal)

27.

There was one more question on coins i.e. abt getting a change of 10ps

and 25 coins for ------Rs.(how many possible combinations or so possible)

28.

x/y+y/x=40/21(don't remember the exact value, believe this is the one)

find x and y there were 2 questions on train and one was like:

29.

A goods train starts and after 2 hrs a passenger train at 4km/hr starts and

overtakes the goods train after 4 hrs, then the speed of goods train?

30.

15hrs of boys work=6 hrs of women's work. 3/5 of the work is done by

-----boys and -----women. How much time would be the question)

31.

figure was given a square with four corners shaded and asked to find the

area of the shaded portion.... ie area of square-area of the regular octagon.....


SECTION III
1.

A simple flowchart whose steps are as follows. value of r and h are given,

a and b=0 m=pi*r*r*h n=(pi*r*r*h)/3 if (m==n) do ------else b=4*pi*r*h print a


and b [DON'T REMEMBER IF conditon is m==n or m<n]

2.

(second last question this was also easy) it was abt a set of people talking

4 languages and then qns were abt who could act as a translator to whom ........

3.

There were 3 questions based on an argument given... questions were to

find out which statement in the objectives given could strengthen the argument or

to weaken the argument....(bit confusing)

4.

Blood relationship question( i remember all the statements given, though

not the question) 10 people in a family A B C are husbands D E F are wives


altogether there are only 4 women. each family can have atmost 2 children and C
has atleast 1 child. D and G are related to A. Ecannot be related to H and I and J
are not related....
.
5.

(this consists of the most confusing set of questions) a set of statements

are given and then questions were asked, the statements were likeAll A B C D E F
are Q's All A's are B's -----(better leave this question for the last)

6.

Alice works on Monday, Wednesday and Friday

B does not work on Wed


C works only on Tuesday and someotherday(don't remember)
D does not work on Friday
E works on all days except on the first Monday and Thursdaythen questions like
who all will be available on which days .....

7.

first question) abt 4 buses with different seating capacity.and different

charges. and questions were to find out the minimum number of trips required,
the maximum charge, the second highest charge etc....
APTITUDE
1.
One pipe fills in 4 hrs and another in 5hrs when they both work alternately
how much time will be taken to fill the tank.
2.

LCM of 3 nos is 120 which of the following no must not be their HCF a.

8 , b.24 c.12 d.24 and 30


3.

Two trains from the points A and B moving in opposite direction , at the

point they meet the second train travels 120 kms more than the first. The speeds
are 50kmph and 60kmph respectively find the distance between A and B?

4.

One monkey climbs a poll at the rate of 6mts/min and fell down 3mts in

the alternately. Length of the poll is 60 mts , how much time it will take to reach
the top?
a. 31
5.

b.33

c.37

d.40 (ans: 37)

A number when multiplied by 7/18 instead of 7/8 and got the result 770

less than

the actual result , find the

original number?
6.

The volume and the radius of both cone and sphere are equal , then find

the ratio of height of the cone to the diameter of the sphere?


7.

A and B started a business with 1500 and 2500 and got a profit 800 rs.

Half of the profit is shared equally the remaining is shared according to their
investment.

8.

Find their profits.

The difference between the simple interest and compound interest for 2

years?
A:B =2:3 and B:C=5:6 then find A:B:C
9.

An amount of 64 Rs has to become 125 in 3 years in compound interest ,

find the rate of interest?


10.

A similar to the above problem find the time(rate of interest is given)

11.

The prime no., which is greater than 6 when divide by 6 will always gives

the remainder ans: 1 or 5


12.

Length of a rectangle is increased by 50% and breadth is decreased by

25% what is the difference in the area


13.

Mr X position in a class is 13th from first and 17th from last, and 8th

from the first and 13th from last in passed candidates list, then how many
candidates failed in the exam
14.
..

Two successive discounts of 20% and 15% is equal to a net discount of

15.

A two digit number is 4 times to its sum of digits , when 9 is added to the

number, the digits will get reversed.


Then what is that number? Ans: 12
16.

The length of the following rectangle is 4a and its breadth is 2a. Radius

of the two circles is a. Then find the ratio of total area of the rectangle to the
area not covered by the two circles with in the rectangle
17.

A person starts with the speed of u/1 kmph and returns with the speed of

u/2 kmph, what is his average speed.


18.

A cistern will be filled in 9 hrs, but becoz of an outlet it is filled in 10 hrs,

if the cistern is filled, then how much


time the outlet takes to empty the cistern.
19.

In a right angled triangle ABC angle B = 90 , BM is the median to AC ,

then AB2 + BC2 (in terms of BM)


20.

Three circles with same radius r are drawn with centres as three vertices of

a triangle. What is the sum of areas of the intersections of these circles with the
triangle.
21.

X men work for X days to produce X products, then Y men can produce Y

products in ---- days.


22.

The compound interest for first and second years is 200 and 220 on a

certain amount. Find the sum.


23.

Marked price of a commodity is 35% above the cost price. If he gives a

discount of 15%, how much he gains on the deal.


24.

5 mangoes + 4 oranges = 7 mangoes + 1 orange. Find the ratio of mango

to orange.
25.

A man starts a work, after some time some one joins him..like

this
26.

Food is sufficient for 100men for 60days. For how many days the food is

sufficient for 500men?

27.

If 8men 8hrs per day works for 8days get 45/- then how many men

required if the work is 5hrs per day


for10days they get 60/-?
28.

A person sold an item at a profit of 12% .If he sold it at a loss of 12% then

he would get Rs.6/- less. What is the


cost price?
29.

(1 /((3/4-2/5 )/(2/3+4/5))) * ((2 /((4/3-2/5 )/(5/3+6/5))) (Numbers

different)
30.

Avg age of X number of adults in a class is 30yrs. If 12 new adults with

avg age of 32 joined with them then the


avg age increases by one. Find X?
31.

A sphere of radius 2cms is dropped into a cylinder of radius 4 cms

containing water upto certain level. The raise


in the water level is (not sure)
32.

Find the average of reciprocals of x and y :

33.

In a school there are 1000 students in the year 1999. The number of

students increased by 20% in the year 2000. And it is increased by 15% in the
year 2001. But it is decreased by 18% in 2002. Then what is the strength in
2002.(numbers may differ)
REASONING
1.
a)

Odd man out


stem b) fruits c) flowers d) tree e) root

2.

9, --, 15, 18, 21, 24

3.

seating arrangement(2 puzzles)

4.

books arrangement (puzzle)

5.

If 3rd day of a month is Monday. Then what is the 5th day after 21st of

that month?
6.

blood relation

Sample Test Paper

1.

Maximum numbers that can be formed using all the 4 digits 6 4 8 1 without

repetition and which is divisible by 9.( ans none)


2.

Find the number of sides of a regular convex polygon whose angle is

40degrees.
3.

a+b+c=0, then roots of ax^2+bx+c=0 is1.imag 2.real 3.coincidental 4.zero

4.

Difference b/w the compound interest and simple interest for Rs.2500 for 2

years is given-----. find the rate of interest.


5.

There was one more question on S.I and C.I

6.

The minimum number by which 60 is to be multiplied to generate

a square.ans 15
7.

A monkey climbs 6 mts and falls 3mts in alternate minutes.Then time taken

to climb a tree 60metres high?


a. 35 b.37 c.32 d.34 (think the answer is 37)
8.

(This was the second last question) A bucket contains z drops. and it leaks x

drops in t secs.then the time required to empty the bucket(in minutes)?


9.

6 pipes fill or empty the cistern. find the number of emptying pipes iff it takes

18hrs to fill and 18 hrs to empty.... (don't remember the question exactly)
10.

The largest no: which is a factor of 1080 and 729

11.

No: of spheres of radius 1 that can be got from sphere of radius (or diameter

don't recall) 8
12.

(think the last but three question)Travelling at 3/4th the speed a man is 20

minutes later then speed is??


13.

There are 6 keys and 6 locks. then number of combinations to be tried out to

get the actual solution


a. 5^6 b.6^5 (don't remember the rest)
14.

Choosing 2 people out of 10 in how many combinations can a particular

person(some name) be always


included....
15.

From 6 white balls and 7 black balls probability that 2 balls drawn at random

are of the same color?


16.

If a sales man gets successive gain of 15% and 20% then his actual gain?

ans. 38

17.

A string of pearls such that 1/3 is lost and of that 1/4th is missing, remaining

is 20 then actual number of pearls?


ans. 40

18.

A man gets a gain of x%. but if he had sold at twice the cost price, what will

be his gain?(question not sure) a. 2x b.200-2x c.100+x (not sure of the options)

19.

A clock was 7mts behind the actual time on 3 p.m. on wednesday and 8 mts

ahead of actual time on (not sure)


4 p.m. friday. when will it show the correct time?

20.

Boat moves upstream in 6 hrs and covers the same distance downstream in

5 hrs. then speed of a raft


floating?(accuracy of question not sure)
21.

(this was the last question) no idea what it stands for........ some kind of

notation like
S(P(M((D(a,b),2))):P(M(S(D(a,b),........options were
1. ab 2.(a-b)^2 3.(a+b)^2 4.none

22.

If x men working x hrs per day can do x units of work in x days, then y men

working y hrs/day would be able to


complete how many units of work i y days? ans. y^3/x^2 (question in R.S.
Agarwal)
23.

There was one more question on volume and surface area.....

24.

1 Rs, 50 ps , 25 ps coins are in the ratio ---------, then the number of 50 ps

coins if they sum to ------Rs.(similar question in R.S.Agarwal)


25.

There was one more question on coins i.e. abt getting a change of 10ps and

25 coins for ------Rs.(how many possible combinations or so possible)


26.

x/y+y/x=40/21(don't remember the exact value, believe this is the one) find

x and ythere were 2 questions on train and one was like:


27.

A goods train starts and after 2 hrs a passenger train at 4km/hr starts and

overtakes the goods train after 4 hrs, then the speed of goods train?
28.

15hrs of boys work=6 hrs of women's work. 3/5 of the work is done by

-----boys and -----women. How much time would bethe question)


29.
30.

There was one question on triangle


A figure was given a square with four corners shaded and asked to find the

area of the shaded portion.... ie area of square-area of the regular octagon.....


Texas Instruments
1.

If the date is written as MMDDYYYY, and then 10022001, ie)oct 2 2001 is a


palindrome. which is the immediate palindrome before that date.

2.

There r 2 trains travelling at 100 MPH each. there is a 200Mile tunnel. the trains travel
in opposite directions. when the trains enter, a supersonic bee starts at the tunnel,
touches the other train, comes back touches the first train, turns again and touches
the other train and so on until the trains collide. Find the distance travelled by the bee.

3.

It is 12.00 o clock. Find how often the minute hand meets the hour hand.

4.

Find the maximum product using positive integers the sum of which is 100. Dont know
if i am sure with this one. sorry. i didnt do this.

5.

In a train Art is found dead. hours later 4 people are queried,


Blonde says i am innocent, i didnt speak with Art
White says i am innocent, Blonde spoke with Art
Old says i am innocent, the brunette killed Art
Brunette says i am innocent, one of the men killed Art
The inspector says simple, 4 true statements, 4 false statements.
I know the killer, very simple!!!
Find out the killer. (only one is involved.)

6.

2 maths geniuses meet after 20 yrs.one says i am married. and have 3 daughters. the
product of their ages is 72. the sum is the same as the house no. other says, but I
cant find it out. The other says. . simple. ok, my eldest daughter has just started the
piano classes.Find their ages.This one is there in previous question papers also.

7.

5 sea pirates have 100 gold coins and want to share it. They propose a plan. The
senior most one has to propose an idea, if at least 50 % agree, the coins r shared
accordingly. else the senior is killed and the next senior most is asked to present a
plan and so on .note, all the guys r very clever and very greedy and dont want to lose
the coins, and dont want to die. Form a way to share the money.
I didnt do this....no time

ANSWERS
1.

I worked it out like this.. before 2001, 2000 cannot be taken as MMDD becomes
0002.also anything after 14 century cant be considered as 1401 would mean 1041,
there r only a max of 31 days a month. so the century nos must be only 13(reverse
for 31)so the yr is 13xx. now 1399to 1391 is not possible as reverse means 99 to 19
but max no of months is 12. so 1390 becomes 09311390... but 9th month has only 30

days(lucky i remembered it).. so 1380 is the most recent palindrome ... which
beocomes 08311380.SOln is 08 31 1380.
2.

This one i really screwed up royally. it took me 25 minutes to solve.. i took the
average speeds, the distance travelled by the trains and the bee, took ratio of speeds
and distance, subtracting it from the tunnels length for every time the bee touched the
trains. phew lot of calculation.. and got the ans as 1000.But when i rechecked it a
thought struck me... so silly of me. The trains collide at the middle. ie)after 100 miles.
that means after 1 hour. so the bee travels for 1 hour touching each train till they
collide. its speed being 1000 mph, it travelled a 1000 miles..

3.

At 12.00 the minute and hour hand are together. but at 1.00 they are 5 mins apart. so
in 60 minutes the gain is 55 mins for the min hand. to be together it has to gain
another 5 more mins. so the time taken to gain 5 mins is 60*5/55==5.454 So the
time taken to meet again is 65.454 So the hands meet every 65.454 minutes

4.

Sorry no time to see this and dont remember it correctly.

1.

A topic on Gandhiji's Salt Satyagrah Movement Four sentences were

given and you have to arrange them


to make a paragraph.
Ans. CABD (Check it out).
2.
What can't be changed by the user program (Four choices were there).
Ans. Memory Map (Check it out).
3.

In which layer ROUTING is performed ?


Ans. Network Layer

4.

What is the output of the following code snippet


main()
{
printf(5+"Fascimile");
}
Ans. mile

5.

What is the output


Int count=10,sum=0,*temp;

Temp=&count;
Sum=? &count;( It was actually given temp=? &count;
which is probably wrong)
printf("sum=%d count= %d temp=%d ",sum,count,*temp);
Ans. C (most expected answer ,check it)
6.

Which one has no L-Value


[i] a[i]
[ii] i
[iii] 2 [iv] *(a+i) Ans . [iii]

7.

In threaded binary for which traversal orders unused left and right links

are used?
8.

Which is false for binary tree?


[i] Any node should have two children.
[ii]
[iii] At fourth level the number of node should be less than 16.

9.

Which is true for binary search ?


[i] Traversal scheme
[ii]
[iii]Greedy algorithm
[iv] Divide and conquer algorithm
Ans. [iv]

10.

What is the protocol used for getting the physical address by supplying IP

address of a node ?
[i] ARP
[ii] RARP
[iii] BOOTP
[iv] DHCP Ans. [i]
11.

If DELHI is coded as CCIDD then how BOMBAY will be coded?

12.

Opposite meaning of SPUR.

13.

Opposite of HARBINGER .
Ans. Follower

14.

Opposite meaning of PROTRUSION.

15.

Opposite meaning of RESTIVENESS.


Ans.Docility.

16.

Find the odd one in a given analogy Ans. Mundane.

17.

Find the analogy : SURPRISE : EXCLAMATION


Ans. Dismay:groan.

18.

Find the analogy : Plateau : Taxonomy.

19.

Question from congestion control topic:


Ans: source quench.

20.

Question from kernel mode:


Ans:Disable Interrupts.

21.

which one is a page replacement algorithim.


[i]fifo
[ii]
[iii]Least recently used.
[iv]All of above.

22.

Using two numbers And interchanging + and * there was a question.


Ans: (iii)(some expression=22).

23.

For each hour an watch is going slow by 30 seconds.Now time is

8a.m.What will be the actual time at 8p.m.


Ans:ii)7:54.
24.

Question regarding while loop. Ans:(iii).

25.

Alphabetical order L,M,(cant remember) Ans:F.

26.

One puzzle:(I cant exactly remember this question giving brief idea of this

question)there were four guys A,B,C,D. the older


and younger relation is given . U have to find the age of the A
Ans: 7 years(check it out).

27.

Fallacy question: six sentences are given.


[i]
[ii]
[iii]
[iv] Ans: [i].

28.

Nine people six floor. Conditions are given.(This was a very long

paragraph).Peoples named like I,J,K,L,M,N,O,P,Q.


Ans:i)J.
29.

A question regarding node.

30.

A problem regarding age of father and son(very easy problem u can solve

it).
31.

A problem regarding age of father and son(very easy problem u can solve

it).
32.

Point out error in the follwing sentence:I got the book in the office and

slipped it out.
[i]I got the book.
[ii] in the.
[iii]office and .
[iv] slipped it out.
Ans:[iv].
33.

Point out error:(about a flowers garden)


ans:(I can't remember the options).answer will be "among on another".

Sample test Paper

1.

The highest Score in an innings was 3/11 of the total and the next highest

was 3/11of the reminder. If the scores differed by 9, find the total score.
a) 151
Ans: c

b) 161

c) 121

d) 101

e) 137

2.

A boy was asked to multiply a certain number by 53. He multiplied it by

35 and got his answer less than the correct one by 1206. Find the number to be
multiplied.
a) 37

b) 67

c) 87

d) 97

e) 107

Ans: 67
3.

A Problem like this not exactly the same but on same model.If the

manufacturer gains 10 %, the wholesale dealer 15 % and the retailer 25 % then the
cost of Production of a table, if the retail price is Rs.1265
a) 632.50 b) 800

c) 814

d)

834.24

Ans: b
4.

A trader marks his goods up by 50% and declares two successive

discounts of 20% each. What is his overall gain?


a) 10% gain b) 4% gain c) 4% loss (A) d) 10% loss e) No loss No gain
5.

Age problems -3 , find mothers age,fathers age etc.

6.

Statistics Problems(probability) as A-this much , B-This Much, A n B-

this much and A u B - ?


7.

Angle Problems which deals with triangle - 3 problems.

Section III - Logical reasoning - 30 qns in 30 mins.


8.

Tower of Hanoi Problem -

9.

problem on fig. find the shaded area, square of size 14cm

10.

problem on symmetric fig ;; ans less than the 1172(check)

11.

Blood Relation Problems - 3

12.

Find odd man out of the given series - 3 problems

Sample test paper


Q. A man leaves office daily at 7pm A driver with car comes from his home to pick him from
office and bring back home
One day he gets free at 5:30 and instead of waiting for driver he starts walking towards home.
In the way he meets the car and returns home on car He reaches home 20 minutes earlier

than usual. In how much time does the man reach home usually??
Ans. 1hr 20min
Q The following truth table is given What is Y equal to??

Ans. (A')(B')(AB) , where ' stands for complement.


Q. A works thrice as much as B. If A takes 60 days less than B to do a work then find the
number of days it would take to complete the work if both work together?
Ans. 22days
Q. How many 1's are there in the binary form of 8*1024 + 3*64 + 3
Ans. 4
Q. In a digital circuit which was to implement (A B) + (A)XOR(B), the designer implements (A
B) (A)XOR(B)
What is the probability of error in it ?
Q. A boy has Rs 2. He wins or loses Re 1 at a time If he wins he gets Re 1 and if he loses the
game he loses Re 1.He can loose only 5 times. He is out of the game if he earns Rs 5. Find the
number of ways in which this is possible?
Ans. 16

Q. If there are 1024*1280 pixels on a screen and each pixel can have around 16 million colors
Find the memory required for this?
Ans. 4MB
Q. On a particular day A and B decide that they would either speak the truth or will lie. C asks
A whether he is speaking truth or lying? He answers and B listens to what he said. C then asks
B what A has said B says "A says that he is a liar"What is B speaking ?
(a) Truth
(b) Lie
(c) Truth when A lies
(d) Cannot be determined
Ans. (b)
Q. What is the angle between the two hands of a clock when time is 8:30Ans. 75(approx)
Q. A student is ranked 13th from right and 8th from left. How many students are there in
totality ?
Q. A man walks east and turns right and then from there to his left and then 45degrees to his
right.In which direction did he go
Ans. North west
Q. A student gets 70% in one subject, 80% in the other. To get an overall of 75% how much
should get in third subject.
Q. A man shows his friend a woman sitting in a park and says that she the daughter of
my grandmother's only son. What is the relation between the two
Ans. Daughter
Company : Paragon
1.Judy is now twice as old as Adam,but 6 years ago, she was 5 times as old as he was . How
old is judy now?
A) 10 B) 16 C) 20 D) 24 E) 32
2. if 3x=2(5-2x), then x = ?
A) 10/7 B) 0 C) 3/7 D) 1 E) 10/7
3. If a is equal to the sum of b and c, which of the following is equal to the difference of b and
c
A) a-b-c B) a-b+c C) a-c D) a-2c E) a-b-2c
4.if the sum of five consecutive even integers is t, then, in terms of t, what is the greatest of
these integers?

A) (t-20)/5 B) (t-10)/5 C) t/5 D) (t+10)/5 E) (t+20)/5


5. If a school cafeteria needs c cans of soup each week for each student, and if there are s
students in the school, for how many weeks will x cans of soup last?
A) csx B) xs/c C) s/cx D) x/cs E) cx/s
6. A vendor sell h hot dogs and s sodas. If a hot dog costs twice as much as a soda, and if the
vendor takes in a total of d dollars , how many cents does a soda cost?
A)100d/(s+2h) B) (s+2h)/100d C)d(s+2h)/100 D) 100d(s+2h) E) d/100(s+2h)
7.Yann will be x year old y years from now . How old was he z years ago?
A)x+y+z B) x+y-z C)x-y-z D)y-x-z E)z-y-x
8.At Medison High school each student studies exactly one foreign language. Three-fifth of the
students take Spanish,and one-fourth of the remaining students take German. If all of the
others take French, what percent of the students take French?
A)10 B)15 C) 20 D) 25 E) 30
9.From 1994 to 1995 the sales of a book decreased by 80%. If the sales in 1996 were the
same as in 1994, by what percent did they increase from 1995 to 1996?
A)80% B)100% C) 120% D) 400% E) 500%
10. if 25% of 260 equals 6.5% of a, what is a?
A) 10 B) 65 C) 100 D) 130 E) 1000
11. in a certain club , the ratio of the number of boys to girls is 5:3. what percent of the
members of club are girls?
A) 37.5% B) 50% C) 60% D) 62.5% E) 80%
12. From 1980 to 1990 , Liors weight increased by 25% . if his weight was k kilograms in
1990, what was it in 1980?
A)1.75k B) 1.25k C) 1.20k D) 0.80k E) 0.75k
13. Evan has 4 times as many books as David and 5 times as many as Jason .If Jason has
more than 40 books , what is the least number of books that Evan could have ?
A)200 B)205 C) 210 D) 220 E) 240
14. Alison is now three times as old as Jermy, but 5 years ago , she was 5 times as old as he
was . How old is Alison now?
A) 10 B) 12 C) 24 D) 30 E) 36
15. What is the largest prime factor of 255?
A) 5 B) 15 C) 17 D) 51 E) 255
16. if w widgets cost c cents , how many widgets can you get for d dollars?
A) 100dw/c B) dw/100c C) 100cdw D) dw/c E) cdw
17. if 120% of a is equal to 80% of b, which of the following is equal to a+b?
A) 1.5a B) 2a C) 2.5a D) 3a E) 5a
18. if x and y are integers such that x3=y2 , which couldnot be the value of y?
A) -1 B) 1 C) 8 D) 16 E) 27
19. what is a devided by a% of a ?
A) a/100 B) 100/a C) a2 /100 D) 100/a2 E) 100a
20. If an object is moving at a speed of 36 kilometers per hour , how many meters does it
travel in one second ?
A) 10 B) 36 C) 100 D) 360 E) 1000

Quantitative
21. jen , ken and len devided a cash prize. Jen took 50% of the money and spent 3/5 of what
she took. Ken took 40% of the money and spent of what he took
Column A Column B
The amount that Jen
The amount that Ken
spent
spent
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given
22. Elian types twice as fast as Delphin . Delphin charges 50% more per page than Eliane.
Column A Column B
Amount Eliane earns
Amount Delphine
in 9 hours
earns in 12 hours
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given

23. Column A Column B


1/3 + + 1/9 1/9 + 1/3 + 1/5
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given
24. . Column A Column B
(43+59)(17-6) (43+59)(17+6)
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given
25. Column A Column B
(43-59)(43-49) (43-59)(43+49)
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given
.26. a is a negative number

. Column A Column B
a2
-a2
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given
27. . Column A Column B
v20 /2
5/v5
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given
28. The sides of a triangle are 3,4,and x
. Column A Column B
x
5
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given
29. 56<5c<64
Column A Column B
12
c
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given
30 . School A has 100 teachers and school B has 200 teachers.
Each school has more female teachers than male teachers.
. Column A Column B
The number of female
The number of female
teachers at School A
teachers at School B

A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information given

31. (m+1)(m+2)(m+3)=270
. Column A Column B
m+2
10
A) Column A is greater
B) Column B is greater
C) Both are equal
D) The relationship cannot be determined from the information givenNIHILENT PAPER
PATTERN )N 31st JULY 2006 AT PUNE
HI
I AM RITESH
ON 31st JULY I HAVE APPERED FOR THE SELECTION PROCESS OF NIHILENT
TECHNOLOGY(PUNE) IN C-DAC CAMPUS.
SELECTION PROCESS CONSIST OF THREE STAGES.
1. WRITTEN TEST -> GRE PATTERN PAPER . THERE FOUR SECTION .
SENTENCE COMPLETION .ANTONYMS
COMPRENSION,LOGICAL REASONING,NUMERICAL ABILITY, VERY EASY. THERE 100 QUES.
WHICH
WE HAVE TO SOLVE IN 60 MINS. 60+ SHOULD BE THE CUT OFF.
GO THROUGH THE BARRONS THAT IS ENOUGH.
2. TECHNICAL IS QUITE TOUGH . THEY ASKED QUESTIONS FROM THE PROJECT WHAT I HAVE
DONE.C.C++,JAVA.ORACLE,OS.
3. HR IS JUST A FORMAL.
850 STUDENT APPERED FOR THE WRITTEN .300 SELECTED FOR THE TEHNICAL AND
FINALLY 178 ARE SELETED FOR THE JOB. I AM ONE OF THEM.
KEY IS CONFIDENCE .
AND YOUR KNOWLEDGE.
ALL THE BEST.
FOR YOUR FUTURE.
RITESH
SECTION-1
1)Five trays cost is 0.35 each and dozen----(ans:Rs13.75)
2)In a journey of 15 miles two third distance was traveled with 40 mph and remaining with 60
mph. How much time the journey takes...
(ans:20 min)
3)A man walks from 9.15 to 5.15 from Monday to Friday and 9.00 to 12.00 on Saturday. Each
day 0.45 min lunch. How much time he
walks in a week...
(ans: 39hrs15min).
4) 12 revolutions takes 1/8 th second time. In 20 seconds how many revolutions...
(ans:1920)
5) In 60 reams of paper 40 reams were utilized then what percent will remain...
(ans:33.33%)

6) A started at 9.00 am with 6 mph and B started at 9.30 am with 8mph in the same
direction. At what time they will meet...
(ans:11.00am)
7) In a storage stall of 5x3x2inch.How many blanks of size 2x1x1inch can be stored..
(ans:15)
8) In a company 3/5 of people know shorthand 1/4th know typing and 1/5 know both. What
fraction of people do not know both..
(ans:35%)
9) A man how many bikes of Rs 14000 can buy by selling 2100 bikes of Rs500/- of each
(ans: 75)
10) A company requires 11,500 strength. Present employees are 200 women , men and 6500
unmarried To reach the target how many women required to maintain the same ratio
(ans : 300)
11) What is the time required to punch 1500 cards of 50 column each at the rate of 10,000
punches per hour
(ans:7hr 30min)

Aptitude Questions
1.
2.

If 2x-y=4 then 6x-3y=?


(a)15
(b)12 (c)18 (d)10 Ans. (b)
If x=y=2z and xyz=256 then what is the value of x? (a)12 (b)8
(d)6 Ans. (b)

(c)16

3. (1/10)18 - (1/10)20 = ?
(a) 99/1020

(b) 99/10

(c) 0.9 (d) none of these

Ans. (a)

4. Pipe A can fill in 20 minutes and Pipe B in 30 mins and Pipe C can empty the
same in 40 mins.If all of them work together, find the time taken to fill the tank
(a) 17 1/7 mins
(a)

(b) 20 mins

(c) 8 mins

(d) none of these

Ans.

5. Thirty men take 20 days to complete a job working 9 hours a day.How many hour
a day should 40 men work to complete the job?
(a) 8 hrs (b) 7 1/2 hrs (c) 7 hrs

(d) 9 hrs

Ans. (b)

6. . Find the smallest number in a GP whose sum is 38 and product 1728


(a) 12 (b) 20 (c) 8

(d) none of these

Ans. (c)

7. A boat travels 20 kms upstream in 6 hrs and 18 kms downstream in 4 hrs.Find the
speed of the boat in still water and the speed of the water current?

(a) 1/2 kmph (b) 7/12 kmph (c) 5 kmph

(d) none of these

Ans. (b)

8. A goat is tied to one corner of a square plot of side 12m by a rope 7m long.Find
the area it can graze?
(a) 38.5 sq.m (b) 155 sq.m (c) 144 sq.m (d) 19.25 sq.mAns. (a)
9. Mr. Shah decided to walk down the escalator of a tube station. He found that if
he walks down 26 steps, he requires 30 seconds to reach the bottom. However, if
he steps down 34 stairs he would only require 18 seconds to get to the bottom. If
the time is measured from the moment the top step begins to descend to the time
he steps off the last step at the bottom, find out the height of the stair way in
steps?
Ans.46 steps.
10. The average age of 10 members of a committee is the same as it was 4
years ago, because an old member has been replaced by a young member. Find
how much younger is the new member ?
Ans.40 years.
11. Three containers A, B and C have volumes a, b, and c respectively; and
container A is full of water while the other two are empty. If from container A
water is poured into container B which becomes 1/3 full, and into container C
which becomes 1/2 full, how much water is left in container A?
12. ABCE is an isosceles trapezoid and ACDE is a rectangle. AB = 10 and
EC = 20. What is the length of AE?
Ans. AE = 10
13. In the given figure, PA and PB are tangents to the circle at A and B
respectively and the chord BC is parallel to tangent PA. If AC = 6 cm, and
length of the tangent AP is 9 cm, then what is the length of the chord BC?
Ans. BC = 4 cm.
14. Three cards are drawn at random from an ordinary pack of cards. Find
the probability that they will consist of a king, a queen and an ace.
Ans.
64/2210
15. A number of cats got together and decided to kill between them 999919
mice. Every cat killed an equal number of mice. Each cat killed more mice
than there were cats. How many cats do you think there were ?
Ans. 991.
16. If Log2 x - 5 Log x + 6 = 0, then what would the value / values of x be?
Ans. x = e2 or e3.
17. In june a baseball team that played 60 games had won 30% of its game
played. After a phenomenal winning streak this team raised its average to
50% .How many games must the team have won in a row to attain this average?
A. 12 B. 20 C. 24 D. 30

(Ans. C)

18. .Can you tender a one rupee note in such a manner that there shall be total 50
coins but none of them would be 2 paise coins.?
Ans. 45 one paisa coins, 2
five paise coins, 2 ten paise coins, and 1 twenty-five paise coins.
19. A monkey starts climbing up a tree 20ft. tall. Each hour, it hops 3ft. and slips back
2ft. How much time would it take the monkey to reach the top? Ans.18 hours.
20. What is the missing number in this series? 8 2 14 6 11 ? 14 6 18 12
Ans. 9
21. A certain type of mixture is prepared by mixing brand A at Rs.9 a kg. with brand
B at Rs.4 a kg. If the mixture is worth Rs.7 a kg., how many kgs. of brand A are
needed to make 40kgs. of the mixture?
Ans. Brand A needed is 24kgs.
22. A wizard named Nepo says "I am only three times my son's age. My
father is 40 years more than twice my age. Together the three of us are a mere
1240 years old." How old is Nepo?
Ans. 360 years old.
23. One dog tells the other that there are two dogs in front of me. The other
one also shouts that he too had two behind him. How many are they?
Ans.
Three
24. A man ate 100 bananas in five days, each day eating 6 more than the
previous day. How many bananas did he eat on the first day?
Ans. Eight.
25. If it takes five minutes to boil one egg, how long will it take to boil four eggs?
Ans. Five minutes.
26. The minute hand of a clock overtakes the hour hand at intervals of 64
minutes of correct time. How much a day does the clock gain or lose? Ans. 32
8/11 minutes.
27. Solve for x and y: 1/x - 1/y = 1/3, 1/x2 + 1/y2 = 5/9. Ans. x = 3/2 or -3
and y = 3 or -3/2.
28. Daal is now being sold at Rs. 20 a kg. During last month its rate was Rs.
16 per kg. By how much percent should a family reduce its consumption so as
to keep the expenditure fixed?
Ans. 20 %.
29. Find the least value of 3x + 4y if x2y3 = 6.
Ans. 10.
30. Can you find out what day of the week was January 12, 1979?Ans.
Friday.
31. A garrison of 3300 men has provisions for 32 days, when given at a rate
of 850 grams per head. At the end of 7 days a reinforcement arrives and it was
found that now the provisions will last 8 days less, when given at the rate of
825 grams per head. How, many more men can it feed?
Ans. 1700
men.
32. From 5 different green balls, four different blue balls and three different
red balls, how many combinations of balls can be chosen taking at least one
green and one blue ball?

33. Three pipes, A, B, & C are attached to a tank. A & B can fill it in 20 &
30 minutes respectively while C can empty it in 15 minutes. If A, B & C are
kept open successively for 1 minute each, how soon will the tank be filled?
Ans. 167 minutes.
34. A person walking 5/6 of his usual rate is 40 minutes late. What is his
usual time? Ans. 3 hours 20 minutes.
35. For a motorist there are three ways going from City A to City C. By way of bridge
the distance is 20 miles and toll is $0.75. A tunnel between the two cities is a
distance of 10 miles and toll is $1.00 for the vehicle and driver and $0.10 for each
passenger. A two-lane highway without toll goes east for 30 miles to city B and
then 20 miles in a northwest direction to City C.
1. . Which is the shortest route from B to C
(a) Directly on toll free highway to City C (b) The bridge
(c) The
Tunnel
(d) The bridge or the tunnel (e) The bridge only if traffic is heavy on the
toll free highway
Ans. (a)
2. The most economical way of going from City A to City B, in terms of toll
and distance is to use the
(a) tunnel
(b) bridge
(c) bridge or tunnel (d) toll free highway
(e) bridge and highway
Ans. (a)
3. Jim usually drives alone from City C to City A every working day. His
firm deducts a percentage of employee pay for lateness. Which factor
would most influence his choice of the bridge or the tunnel ?
(a) Whether his wife goes with him (b) scenic beauty on the route
(c) Traffic conditions on the road, bridge and tunnel
(d) saving $0.25 in tolls
(e) price of gasoline consumed in covering
additional 10 miles on the bridge
Ans. (a)
4. In choosing between the use of the bridge and the tunnel the chief factor(s)
would be:
I. Traffic and road conditions II. Number of passengers in
the car
III. Location of one's homes in the center or outskirts of one of the cities
IV. Desire to save $0.25
(a) I only
(b) II only
(e) I and II only

(c) II and III only


Ans. (a)

(d) III and IV only

36. The letters A, B, C, D, E, F and G, not necessarily in that order, stand for
seven consecutive integers from 1 to 10, D is 3 less than A, B is the middle
term
F is as much less than B as C is greater than D, G is greater than F,
1.
The fifth integer is
(a) A (b) C (c) D (d) E (e) F

Ans. (a)

2. A is as much greater than F as which integer is less than G


(a) A (b) B (c) C (d) D (e) E

Ans. (a)

3. If A = 7, the sum of E and G is


(a) 8 (b) 10 (c) 12 (d) 14 (e) 16
Ans. (a)
4. A - F = ?
(a) 1 (b) 2 (c) 3 (d) 4 (e) Cannot be determined
Ans. (a)
5. An integer T is as much greater than C as C is greater than E. T can be
written as A + E. What is D?
(a) 2 (b) 3 (c) 4 (d) 5 (e) Cannot be determined
Ans. (a)
6. The greatest possible value of C is how much greater than the smallest
possible value of D? (a) 2 (b) 3 (c) 4 (d) 5 (e) 6
Ans. (a)

37. 1. All G's are H's


2. All G's are J's or K's
3. All J's and K's are G's
4. All L's are K's
5. All N's are M's
6. No M's are G's
1.
If no P's are K's, which of the following must be true?
(a) All P's are J's
(b) No P is a G
(c) No P is an H
(d) If
any P is an H it is a G
(e) If any P is a G it is a J
Ans. (a)
2.
Which of the following can be logically deduced from the
conditions stated?
(a) No M's are H's (b) No M's that are not N's are H's (c) No H's
are M's
(d) Some M's are H's (e) All M's are H's
Ans. (a)
3.
Which of the following is inconsistent with one or more of the
conditions?
(a) All H's are G's (b) All H's that are not G's are M's (c) Some H's
are both M's and G's (d) No M's are H's
(e) All M's are H's
Ans. (a)
4. The statement "No L's are J's" is
I. Logically deducible from the conditions stated
II. Consistent with but not deducible from the conditions stated
III. Deducible from the stated conditions together with the additional
statement "No J's are K's"
(a) I only
(b) II only
(c) III only
(d) II and III only
(e) Neither I, II nor III

Ans. (a)

38. In country X, democratic, conservative and justice parties have fought


three civil wars in twenty years. TO restore stability an agreement is reached to
rotate the top offices President, Prime Minister and Army Chief among the
parties so that each party controls one and only one office at all times. The three
top office holders must each have two deputies, one from each of the other
parties. Each deputy must choose a staff composed of equally members of his
or her chiefs party and member of the third party.
1.
When Justice party holds one of the top offices, which of the
following cannot be true
(a) Some of the staff members within that office are justice party
members
(b) Some of the staff members within that office are democratic party
members
(c) Two of the deputies within the other offices are justice party
members
(d) Two of the deputies within the other offices are conservative party
members
(e) Some of the staff members within the other offices are justice party
members.
Ans. (a)
2. When the democratic party holds presidency, the staff of the prime
minister's deputies are composed
I. One-fourth of democratic party members
II. One-half of justice party members and one-fourth of conservative party
members
III. One-half of conservative party members and one-fourth of justice
party members.
(a) I only
(b) I and II only
(c) II or III but not both
(d) I and II or I and III(e) None of these
(a)

Ans.

3. Which of the following is allowable under the rules as stated:


(a) More than half of the staff within a given office belonging to a single
party
(b) Half of the staff within a given office belonging to a single party
(c) Any person having a member of the same party as his or her immediate
superior
(d) Half the total number of staff members in all three offices belonging to
a single party
(e) Half the staff members in a given office belonging to parties different
from the party of the top office holder in that office.
Ans. (a)
4. The office of the Army Chief passes from Conservative to Justice party.
Which of the following must be fired.
(a) The democratic deputy and all staff members belonging to Justice

party
(b) Justice party deputy and all his or hers staff members
(c) Justice party deputy and half of his Conservative staff members in the
chief of staff office
(d) The Conservative deputy and all of his or her staff members belonging
to Conservative party
(e) No deputies and all staff members belonging to conservative parties.
Ans. (a)
39. In recommendations to the board of trustees a tuition increase of $500 per year,
the president of the university said "There were no student demonstrations over the
previous increases of $300 last year and $200 the year before". If the president's
statement is accurate then which of the following can be validly inferred from the
information given:
I. Most students in previous years felt that the increases were justified because of
increased operating costs.
II. Student apathy was responsible for the failure of students to protest the
previous tuition increases.
III. Students are not likely to demonstrate over new tuition increases.
(a) I only
(b) II only
(c) I or II but not both (d) I, II and III
(e) None
Ans. (a)
40. The office staff of XYZ corporation presently consists of three bookeepers--A, B,
C and 5 secretaries D, E, F, G, H. The management is planning to open a new
office in another city using 2 bookeepers and 3 secretaries of the present staff . To
do so they plan to seperate certain individuals who don't function well together.
The following guidelines were established to set up the new office
I. Bookeepers A and C are constantly finding fault with one another and should
not be sent together to the new office as a team
II. C and E function well alone but not as a team , they should be seperated
III. D and G have not been on speaking terms and shouldn't go together
IV Since D and F have been competing for promotion they shouldn't be a team
1. .If A is to be moved as one of the bookeepers,which of the following
cannot be a possible working unit.
A.ABDEH
B.ABDGH
C.ABEFH
D.ABEGH
Ans.B
2. If C and F are moved to the new office,how many combinations are
possible
A.1
B.2
C.3
D.4
Ans.A
3. If C is sent to the new office,which member of the staff cannot go with C
A.B B.D C.F
D.G
Ans.B
4. Under the guidelines developed,which of the following must go to the new
office
A.B B.D C.E D.G
Ans.A
5. If D goes to the new office,which of the following is/are true
I.C cannot go II.A cannot go III.H must also go

A.I only

B.II only

C.I and II only D.I and III only

Ans.D

41.

42. After months of talent searching for an administrative assistant to the


president of the college the field of applicants has been narrowed down to 5--A,
B, C, D, E .It was announced that the finalist would be chosen after a series of
all-day group personal interviews were held.The examining committee agreed
upon the following procedure
I.The interviews will be held once a week
II.3 candidates will appear at any all-day interview session
III.Each candidate will appear at least once
IV.If it becomes necessary to call applicants for additonal interviews, no more 1
such applicant should be asked to appear the next week
V.Because of a detail in the written applications,it was agreed that whenever
candidate B appears, A should also be present.
VI.Because of travel difficulties it was agreed that C will appear for only 1
interview.
1.
.At the first interview the following candidates appear
A,B,D.Which of the follwing combinations can be called for the
interview to be held next week.
A.BCD
B.CDEC.ABED.ABC
Ans.B
2.
Which of the following is a possible sequence of combinations
for interviews in 2 successive weeks
A.ABC;BDE B.ABD;ABE C.ADE;ABC D.BDE;ACD
Ans.C
3. If A ,B and D appear for the interview and D is called for additional
interview the following week,which 2 candidates may be asked to appear
with D?
I. A II B III.C IV.E
A.I and II
only
Ans.D

B.I and III only

C.II and III only

D.III and IV

4. Which of the following correctly state(s) the procedure followed by the


search committee
I.After the second interview all applicants have appeared at least once
II.The committee sees each applicant a second time
III.If a third session,it is possible for all applicants to appear at least twice

43.
3

A.I only
B.II only
C.III only
D.Both I and II
Ans.A
A certain city is served by subway lines A,B and C and numbers 1 2 and

When it snows , morning service on B is delayedWhen it rains or snows ,


service on A, 2 and 3 are delayed both in the morning and afternoon When
temp. falls below 30 degrees farenheit afternoon service is cancelled in either
the A line or the 3 line,
but not both When the temperature rises over 90 degrees farenheit, the
afternoon service is cancelled in either the line C or the 3 line but not
both.When the service on the A line is delayed or cancelled, service on the C
line which connects the A line, is delayed When service on the 3 line is
cancelled, service on the B line which connects the 3 line is delayed.
1. On Jan 10th, with the temperature at 15 degree farenheit, it snows all day.
On how many lines will service be affected, including both morning and
afternoon.
(A) 2 (B) 3 (C) 4 (D) 5

Ans. D

2. On Aug 15th with the temperature at 97 degrees farenheit it begins to rain


at 1 PM. What is the minimum number of lines on which service will be
affected?
(A) 2 (B) 3 (C) 4 (D) 5 Ans. C
3. On which of the following occasions would service be on the greatest
number of lines disrupted.
(A) A snowy afternoon with the temperature at 45 degree farenheit
(B) A snowy morning with the temperature at 45 degree farenheit
(C) A rainy afternoon with the temperature at 45 degree farenheit
(D) A rainy afternoon with the temperature at 95 degree farenheit
Ans. B
44. In a certain society, there are two marriage groups, red and brown. No marriage is
permitted within a group. On marriage, males become part of their wives groups;
women remain in their own group. Children belong to the same group as their
parents. Widowers and divorced males revert to the group of their birth.
Marriage to more than one person at the same time and marriage to a direct
descendant are forbidden
1. A brown female could have had
I. A grandfather born Red
II. A grandmother born Red
III Two grandfathers born Brown
(A) I only
D

(B) III only

(C) I, II and III

(D) I and II onlyAns.

2. A male born into the brown group may have


(A) An uncle in either group (B) A brown daughter (C) A brown son
(D) A son-in-law born into red group
Ans. A
3. Which of the following is not permitted under the rules as stated.
(A) A brown male marrying his father's sister
(B) A red female marrying her mother's brother
(C) A widower marrying his wife's sister
(D) A widow marrying her divorced daughter's ex-husband
Ans. B
4. . If widowers and divorced males retained their group they had upon
marrying which of the following would be permissible ( Assume that no
previous marriage occurred)
(A) A woman marrying her dead sister's husband
(B) A woman marrying her divorced daughter's ex-husband
(C) A widower marrying his brother's daughter
(D) A woman marrying her mother's brother who is a widower.
Ans. D
5. I. All G's are H's
II. All G's are J's or K's
III All J's and K's are G's
IV All L's are K's
V All N's are M's

VI No M's are G's


45. There are six steps that lead from the first to the second floor. No two people can
be on the same step
Mr. A is two steps below Mr. C
Mr. B is a step next to Mr. D
Only one step is vacant ( No one standing on that step )
Denote the first step by step 1 and second step by step 2 etc.
1. If Mr. A is on the first step, Which of the following is true?
(a) Mr. B is on the second step
(b) Mr. C is on the fourth step.
(c) A person Mr. E, could be on the third step (d) Mr. D is on higher step
than Mr. C.
Ans: (d)
2. If Mr. E was on the third step & Mr. B was on a higher step than Mr. E
which step must be vacant

(a) step 1

(b) step 2
(c) step 4
(d) step 5
(e) step 6
Ans: (a)
3. If Mr. B was on step 1, which step could A be on?
(a) 2&e only (b) 3&5 only (c) 3&4 only (d) 4&5 only (e) 2&4 only
Ans: (c)
4. If there were two steps between the step that A was standing and the step
that B was standing on, and A was on a higher step than D , A must be on
step
(a) 2

(b) 3

(c) 4

(d) 5

(e) 6

Ans: (c)

5. Which of the following is false


i. B&D can be both on odd-numbered steps in one configuration
ii. In a particular configuration A and C must either both an odd numbered
steps or both an even-numbered steps
iii. A person E can be on a step next to the vacant step.
(a) i only
(c)

(b) ii only

(c) iii only

(d) both i and iii

Ans:

46. Six swimmers A, B, C, D, E, F compete in a race. The outcome is as follows.


i. B does not win.
ii. Only two swimmers separate E & D
iii. A is behind D & E
iv. B is ahead of E , with one swimmer intervening
v. F is a head of D
1. Who stood fifth in the race ?
(a) A (b) B (c) C (d) D (e) E
Ans: (e)
2. . How many swimmers seperate A and F ?
(a) 1 (b) 2 (c) 3 (d) 4 (e) cannot be determined
Ans: (d)
3. The swimmer between C & E is
(a) none
(b) F (c) D (d) B (e) A Ans: (a)
4. If the end of the race, swimmer D is disqualified by the Judges then
swimmer B finishes in which place
(a) 1 (b) 2 (c) 3 (d) 4 (e) 5
Ans: (b)
47. Five houses lettered A,B,C,D, & E are built in a row next to each other. The
houses are lined up in the order A,B,C,D, & E. Each of the five houses has a
colored chimney. The roof and chimney of each housemust be painted as follows.
i. The roof must be painted either green,red ,or yellow.
ii. The chimney must be painted either white, black, or red.
iii. No house may have the same color chimney as the color of roof.
iv. No house may use any of the same colors that the every next house uses.
v. House E has a green roof.
vi. House B has a red roof and a black chimney

1. Which of the following is true ?


(a) At least two houses have black chimney.
(b) At least two houses have red roofs.(c) At least two houses have white
chimneys
(d) At least two houses have green roofs(e) At least two houses have
yellow roofs
Ans: (c)
2. Which must be false ?
(a) House A has a yellow roof (b) House A & C have different color
chimney
(c) House D has a black chimney (d) House E has a white chimney
(e) House B&D have the same color roof.
Ans: (b)
3. If house C has a yellow roof. Which must be true.
(a) House E has a white chimney (b) House E has a black chimney
(c) House E has a red chimney (d) House D has a red chimney
(e) House C has a black chimney
Ans: (a)
4. Which possible combinations of roof & chimney can house
I. A red roof 7 a black chimney
II. A yellow roof & a red chimney
III. A yellow roof & a black chimney
(a) I only

(b) II only
Ans: (e)

48. Find x+2y


(i). x+y=10 (ii). 2x+4y=20 Ans: (b
49. Is angle BAC is a right angle
(i) AB=2BC (2) BC=1.5AC
50. Is x greater than y
(i) x=2k
(ii) k=2y
OnMobail Asia

(c) III only

(d) I & II only (e) I&II&III

Ans: (e)
Ans: (e)

Test Sample Paper

Test consist of Aptitude test having different mark mark for each question.
1.

There are 10 marbles each of 5 diff colors. what is the min. num of marbles to

be taken out so that at least 3 marbles are of same color?


2.

You need 2 kill a dragon with 3 heads & 3 tails. You have a magic sword that

can cut 1 head, 2 heads, 1 tail, or 2 tails in 1 swing.


if 1 head is cut -> a new head grows
if 1 tail is cut -> 2 tails grow
if 2 tails r cut -> 1 head grows
if 2 heads are chopped -> nothing grows. What dragon is min. num of swings 2 be
made?

3.

Slow train runs b/w Blore & Mumbai, up as well as down. It starts at 10:00pm

everyday & reaches destination by 11:30pm after 3 days. If u travel by Slow train,
how many such trains will u encounter during journey?

4.

A num of birds, black & white, r sitting on thhe tele wire. There is at least 1 bir

of each color, also whenevr 2 birds are seperated by 4 or 7 other boirds of any color,
both birds r of same color. Wot is the max. num of birds dat can b seated in this
fashion?

5.

5 ppl, A, B, C, D, E are supposed 2 cover a certain distance from their car to a

house. There is only 1 umbrela dat can b shared by 2 ppl at a time.


It takes 1min for A 2 cover the dist, B->2 min, C->5min, D->10min, E->15min.
Wot is d quickest poss time 4 the entire grp 2 get into the house?

6.

Mr.X belongs 2 a grp of 8 ppl including himself. In d meeting, nobody shakes

hands with the same person more than once but everyone shakes hands with at least
1 person.
After the meeting is over, Mr.X realizes dat all the other ppl in the party had shook a
diff num of hands. How many hands did Mr.X shake?
7.

In a contest 3 probs, A, B, C r given

->25 ppl of the total num of them solved at least 1 prob each.
->Of all the contestants who did not solve A, the num who solved B was twice the
num who solved C.
->num of ppl who solved only A was 1 more than num who solved A & atleast 1 other
prob.
->Of all stud who solved just 1 prob, half didn't solve A

NAGARRO 9th FEBRUARY AT NEW DELHI

Hello friends, Navneet here from Meerut.I gave Nagarro paper.


APTITUDE:
1.sinx+sin2x=1,then cos2x+xos4x=?
a)1
b)3
c)0
d)none
2.cos 30d/sin 10d + cos 59d/sin 31d =?
a)1
b)2
c)3
d)4
3. x pow (a+b) . x pow(b+c). x pow (c+a)/ (x pow(a). x pow(b) . x pow(c)) pow(2)=?
a)0
b)1
c)8
d) 5
4) length of minute hand is 5.4 cm, area covered by this in 10 min is ?
a)50.97
b)57.23
c)55.45
d)59.14

some related to profit and loss and reasoning-: Only Puzzles.


Programmin section 1.30 hrs 4 question.
1)Seat Planing
Write a function for seat allocate and seat reserved.Seat allocate array and seat reserver
array.Seat allocate array is of 10*20 and each row and column represent
A1,A2....;B1,B2.....;........J1,J2... and so on i.e row are A to J whereas col starts from 0 to
19.Each cell in the table represent either 0 or 1. 0 rep seat available , 1 repr seat reserved.
Seat allocation starts from highest to lowest.And row j is highest, i is second highest and
so on. Max 20 seats can be booked at a time. if seat is available print the seat no like
"B2" i.e (2 row, 3 col) and seat is booked." otherwise Print "Seat is not available."
2) A string of charater is given.Find the highest occurance of a character and display that
character.
eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE
OUTPUT:
E
or
I,J(if equal occurance)
3)Remove all the blank spaces between character.Matrix is of 10* 10.
eg: INPUT
-----------------------------------|N | A |
| V
|
|T
------------------------------------|
|G
|U |
|P |
-------------------------------------|T
|
|
|A
|
|
-----------------------------------OUTPUT:
-----------------------------------|N | A | V | T |
|
------------------------------------|G |U
|P |
|
|
-------------------------------------|T
| A |
|
|
|
-----------------------------------4)write a function to give demostrate the functionality of 3d in 1d. function prototye:
change(int value,int indexX,int indexY,int indexZ, int [] 1dArray);
value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in
which and where the value is stored.
As much as I remembered I Put my best.

GOODREJ INFOTECH -16 MAR 2006 - MUMBAI


It is the different kind of test they called it box test
There boxes are given with some value u have to use given arithmetic operators and steps
and u have to get required number in appropriate box, No negative marking, Only if the steps
increase then 25% negative marking for each step
The Questions I remember are
1. Three boxes 1,2,3 contain values 3,17,34 get 40 in box 1 in 3 steps
2. box 1 cotain odd value X or Y the box 2 =X i.e 7 or 12 box 3= Y has value 19 if X is 7 or 31
if x is 12 get even value X or Y Use any operator
steps allowed 3
3.The three boxes 1,2,3 has values resp. AB,BC,AC Get 2A(B+C)+AC-2C(A-B)
in Box 1 using only addition in 3 steps
I am not able to clear round 1 so am not aware about round 2

I) Distribution of workers in a factory according to the no.of


children they have
Figure
1. Total no. of workers in the factory.
Ans : 200
2. Total no. of children that all the workers that have between them is
Ans : 560
3. The total no. of literate workers is
Ans : 105
4. The ratio of literate & illiterate is
Ans - 1:2
5. The no. of literate workers with atleast 3 children is
Ans : 45
6. The no. of illiterate workers with less than 4 children is
Ans : 60
7. The rate of literate to illiterate workers who have 3 children is
Ans - 3:4
II) Which of the following statement(s) is(are) not true
a. Literate workers have small families than illiterate workers.
b. Families with 2 or less than 2 children are commoner than families
with 3 or more children.
c. 2 children families constitute 60% of the families of workers.
d. More the no. of children a worker has the more illiterate he is.
e. None the above statement is true.
Ans : e
III) ---- of a mutual instrument vibrate 6,8 & 12 intervals
respectively. If all three vibrate together what is the time
interval before all vibrate together again?
LCM of NR
--------- Ans : 1/2 sec
HCF of DR
12) Certain no. of men can finish a piece of work in 10 days. If
however there were 10 men less it will take 10 days more for the
work to be finished. How many men were there originally.
Ans : 110 men
10) In simple interest what sum amounts of Rs.1120/- in 4 years and
Rs.1200/- in 5 years.

Ans : Rs.800/vi) Sum of money at compound interest amounts of thrice itself in 3


years. In how many years
will it take 9 times itself.
Ans : 6
vii) Two trains in the same direction at 50 & 32 kmph respectively. A
man in the slower
train observes the 15 seconds elapse before the
faster train completely passes him.
What is the length of faster train ?
Ans : 75m
16) How many mashes are there in a sq. m of wire gauge. Each mesh
being 8mm long X 5mm
width
Ans : 25000
17) x% of y is y% of ?
Ans : x
11) The price of sugar increases by 20%, by what % house-wife should
reduce the consumption of sugar so that expenditure on sugar can be
same as before
Ans : 16.66
? ) A man spending half of his salary for house hold expenses, 1/4th
for rent, 1/5th for travel expenses, a man deposits the rest in a
bank. If his monthly deposits in the bank amount 50. What is his
monthly salary ?
Ans : 1000
? ) The population of a city increases @ 4% p.a. That is an additioanl
annual increase of 4% of the population due to this influx of job
seekers, the % increase in population after 2 years is
Ans :
? ) The ratio of no. of boys & girls in a school is 3:2 Out of these
?% the boys & 25% of girls are scholarship holders. % of students who
are not scholarship holders.?
Ans :
? ) 15 Men take 21 days of 8 hrs. each to do a piece of work. How many
days of 6 hrs. each would do if 21 women take. If 3 women do as much
work of 2 men.
Ans : 30
?) a cylinder ingot 6cms in diameter and 6 cms in height is and
spheres all of the same
size are made from the material obtained.what is the diameter of each
sphere?
Ans :3cms
5)
rectangular plank of sqrt(2)meters wide can be placed so that it is
on either side of the diagonal of a square shown below.what is the
area of the plank?
Ans :7sqrt(2)
fig no7) the difference b/w the compound interest payble half yearly and
the simple interest on a
certain sum cont out at 10% p.a for 1 year is Rs 25 what is the sum
Ans:10,000
8) what is the smallest n0 by which 2880 must be divided in order to
make it a
perfect square ?
Ans : c
a)3 b)4 c)5 d) 6 e)8
9)a father is 30 times more than his son however he will be only

thrice as old as the son


what is father's present age ?
Ans : 40
10) An article sold at a profit of 20% if both the c.p & s.p were to
be Rs.20/- the profit would be 10% more. What is the c.p of that
article?
Ans : 1% loss

I.B.M aptitude questions asked in NIT, Silchar, 2005.

1.
2.
3.
4.
5.
6.
7.
8.

9.
10.

11.
12.
13.
14.
15.
16.
17.
18.

19.
20.

7x +7x+2 is divisible atleast by:


(x/100)+(100+x)=
Three numbers are in G.P. Their sum is 19 and the last number is 9.Find the middle
term.
There are 15 black and 5 white balls. Find the probability of drawing 3 balls so that
there is no white ball.
How many 3 digit odd number can be formed which are divisible by 5 using the
numbers from 0 to 9(without repetition).
Radius of a fruit is equal to the diameter of the seed. Find the ratio of their volume.
From a party 3 men are taken at random. What is the probability that the birthday of
2 men fall in same month.
There are 100 people in an organization. If 46 people can speak English, 46 Spanish,
58 French, 16 can speak both English and Spanish, 24 can speak both Spanish and
French, 26 both English and French and 7 can speak all the languages. How many are
there who cannot speak any of the three languages.
A circumcircle and incircle is drawn to a square. What is the ratio of their areas.
Average of a couple 10 years ago was 25. The average remains same after having a
child and twins after 3 years. What is the present age of the first child.
A school is going to have 1000 students in near future. 1/4 th use scooter, 1/5th use
bikes and 1/9th use cycle. Find the number of students at present.
Two trains of equal length when moving in opposite direction takes 5 sec. to cross
each other completely and when moving in same direction takes 15 sec. Find the ratio
of their speed.
In a battle of tanks.60% lose their commanders, 70% lose their guns and 80% lose
their tracks. Find the number of tanks that lose all.
In a race if A beat B by 15m, A beat C by 25m and in a race between B and C, B beat
C by 15m.Find the length of the tracks.
Price of sugar decreases by Rs.2 per kg. If a man is able to buy 4 kg more for Rs.16,
then what was the original price of sugar.
3 black cows, 4 white cows and 2 brown cows give same amount of milk as given by 4
black, 5 white and 1 black cows. Find the type of cow which gives least milk.
If a composite number is multiplied by a composite number the result is a :
A problem of men, work and time.
A bird is flying between two trains approaching each othertype of problem.
Four boys were playing a game of cards .At the end each of them had Rs.400. They
lost in the reverse order of their alphabets. Five question were their.

SATYAM PAPER - 16 JAN 2006 - HYDERABAD


Hi,
Here is SATYAM paper held on 16th jan 2006 at hyderabad.
I think the cutoff is 8.

1. seating arrangement. The question goes on like this.


There were 6 persons a,b,d,e,k,p standing in a row. b is between d and p. e sits between a
and k. k doesnot sit after d and a doesnot sit after p and d.
The question was: who were on the extreeme ends of the row.
2. It was on number series.
24, 48, 30, 60, 36, ? , 42, 84.
3. Even this was on number series:
35, 25, 49, 35, 63, 45, ? , 55
4. This was on ratio and proportion.
A tin contains alchol and water in the ratio 7:9. first 20% of the alchol was removed and
the tin is filled with water. again another 10% of alchol was removed and the tin is filled
with water. now how much more alchol must me removed so that the resultant mixture is
the ration of 5:3 (numbers are not same but model is this)
5. This is on numbers:
when n is divided by 2 it gives quotient of u and remainder 1. when the same number n is
divided by 5 it gives quotient v and remainder 3. so which of the following is correct:
a) 3n+4=3(equations with u,v and n)
b)
c)
d)
something like this 3 more options are given. we have to find the correct realtion
between.
6. This was on Blood realtion: i dont remeber the qn.
7. this was on calender:
if jan 5th 2006 is wednesday. what day does july 4th 1807.
8. One problem on Compound interest.
9. This is on ratios:
a bag contains one rupee, 50 paise and 25 paise conis in the ration 2.5 : 3: 4., amounting
to Rs. 210. find the number of coins of one rupee.
10. this was on probability:
multiples of 6 or 8 between 1 to 99. what is the probability that a number selected was a
multiple.
11. one problem on areas:this is quite different.
A goat is tied to a rectagle with 12 * 8 mts long. and a goat is tied with a rope of length
10mts to one corner of the rectange. the goat cannot enter into rectangle. find out the area

the goat can graze.


12. Averages:
The average 10 members is 15665. If 2 members have 20000. then what is the average of
remaning?
13: ratios:
if the ratio of 3 numbers are 3: 4: 5(not exactly same). then which of the following have
the same ratio as this:
a) 144:687:456
b).........
c)........
d).............
e)...............
Sorry i dont remember other 2 qns.
All the best...Sirisha.
INFOSYS PAPER - 08 JUL 2006 - TAMILNADU
Hi Guys,
I am vigi. I attend Infosys on campus interview place: at sonacollege of technology
salem(tamil nadu).
There 400 peoples were attended, only 27 cleared written. I don't know why ok
as usual 1 hr for puzzles
30 min for english test.
Questions are
1. There are 27 Cigarrete from each Cigarrete he used to smoke only 2/3rd and
remaining is 1/3. so from 3 butts make 1full ciger finally how many ciger he smoke.
ANS: 40 ciger.
2.There are some apple if it arranged 3,5,7,9 rows get 1 reminder but if it is arranged 11
no reminder. how many apples are there ?
ANS:946
sol (3*5*7*9)+1=946
3.repeated temperature sum
ANS:-2,-1,1,2,3
4. four people 4 job(police,druggest,grocer,butcher), find their job (easy one)
5. There are 4 enclosure a man count the sheep and write it in other languge
75as ! @ ~ 225as(something) 183as(!~)like that then ~!@ what is this?

ANS: i don't know( repeated question)


6. some jewells diamond ,ruby,opal,.......... totaly 7 right and left windows are there u
have to place each side accordind to the condition given 4 questions each 2 marks.(Easy
one only).
7. In a family son age is 5 times daughter, wife age is 5 times daughter age, father is 2
times wife, summation of all their age is 81 find son age?
ANS:5 yrs
8. speed problem forward journey is 10m/hr, return journey is 15m/hr fine avg speed?
ANS:12 m/hr
9. and 10 th are simple one(repeated one).
so friends for infy written previous que is enough.
DON'T THINK ENGLISH ARE EASY BCOZ ENGLISH CUTOFF IS HIGH
COMPARE TO PUZZLES.
INFOSYS PAPER - 28 MAY 2006 - HYDERABAD
Infosys Question paper : 28 May 2006 , HYDERABAD
1. In cycle race held in circular ground, there are 1/5 ahead of arun and 5/6 after him.
Find the total number of cyclists.
2. Reema and Mona went to shopping, they had spent half of the money plus Rs.2 in
butcher shop, then they had gone to xxx spent half of the remaining +Rs.5.then they went
to bakery and spent half of the remaining amount. finally Rs.5 was left with them. how
many rupees did they carry.
Ans: 64
3.A person started two watches, he observed that after one hour, one watch gains 1
min/hr and the second watch loses 2 min/hr. After how much time will the two watches
have a difference of one hour.
Ans: 20 hrs
4.In a match Sachin scores 78 runs more than azhar,dravid's score exceeds azhars score
by 76 runs. total of azhar's and robins runs is 94.robin exceeds jadeja s score by 26 and
dravid exceeds robins score by 26 runs. Calculate the total score.
Ans: 338

5.A large cube is painted red on its outer surface and cut into 27 cubes by 6 straight cuts.
a) No of cubes whose 3 sides r painted
b) No of cubes whose 2 sides r painted
c) No of cubes whose 1 sides r painted
d) No of cubes whose 0 sides r painted
ans: a-8,b-12,c-6 d-1

6.On a holiday a,b,c,d,e plan to have a picnic, they had a running race.c beats d. a&e
overtake b.e is not the last.d overtakes e.who won the race.
Ans:c(not sure)

7.a) 46636,3125,256,27, --, 1 Ans:4=2^2


b) 3,10,7,8,--,12,9,16 ans:11(may be)
8.A motorcyclist says "I drove with the sped of ten miles/hr while going.while returning
traffic was less so I drove the same didstance with 15miles/hr." what is his average
speed.
Ans: 12miles/hr.
9. There are 2 systems And B.14 degrees in A equal to 36 in B.133 in A equivalent to
87.at what temperature both shoe equal readings.
Ans:52.5 (A=7/3B-70.)
10.5 persons A,B,C,D,E go for a meeting B and C are talking in English, when D joined
they used Spanish which was the only common language.A and E can speak only
Italian.and some conditions. one person can speak 5 languages, another 4 languages,one
3,one 2 and one can only speak one language. 4 QUESTIONS BASED ON THIS.
(Paper Submitted By : Kiranmai)
SATYAM PATTERN ON 5th AUGUST 2006 AT ST. THOMAS COLLEGE OF ENGG, KOLKATA

Hi friends,

I always used to read all your experiences and got benifited a lot.
Same new pattern no change. 60% in all standards, Written, GD,
Tech+HR interview.
Written: there will be 4 easy questions which can be answered in
5min, then try to do another 4 in 25 min, thats all. This is for those
who are fully confident of getting those 8 right, because cutoff will be
< 7 at max 8. Others try to answer maximum and for some question
we can eliminate 3 options easily. Be careful negative marking is there.
One thing written test is easy.
GD: for me it is the easiest, because we have attended a lot of GDs
before and we are fully aware of GDs. It is cake walk if you have some
practice before and able to speak for some time grabbing the chance.
Leadership qualities are seen more. Try to give a chance for people
who are sitting idle, thats all its a part of leadership quality. One great
thing is the Satyam moderator who is rating our GD, finally gave us a
compliment that our GD was a very good GD, we achieved this
because we planned that all of us must speak and not to make the GD
a fish market. And we covered a lot of points. Our GD topic was role of
media in bringing awareness in the society all of us were for the topic
and before the end we also covered some negative aspects regarding
that and some preliminary measures for those.
some questions of apti are1)Avarage weight of p,q,r is given (cannot remember) the ratio of students in class p&q
is 3:4.no of students in r is 25% more than p.Find the avarage of all the 3 classes.
2)Odd man out(5 options where given)
3)A,B,C,D,E are 5 in family.A& D are unmarried women & dont work.in family there are
businessman,professor,artist.B is the brother of a & is not artist or businessman.E is
husband.Who is professor?a)Ab)Bc)Dd)Ee)NONE OF THIS
4)pie chat is given for a salary 6000 what will be the ratio of radius with a salary of
1500.a)2:1b)1:2c)3:2d)none of these.
5)Sum in S.I. becomes 5 times its pincipal in 8 years what is the rate?a)5/2b)6/3c)d)none of
these.
2nd GD topics:
Satyam GD Probables:
---------------------1. US war on iraq-justified or not.
2. Role of UN in peacekeeping.
3. Position of Women in India compared to other nations.
4. Environment MAnagement.
5. Is China better than India in software.
6. Should SONIA gandhi be made the PM
7. BPOs in INDIA
8. Govt contribution to IT
9. will punch lines rule the Advt
10. premaritial sex

11. is china a threat to indian industry


12. india or west , which is the land of opportunities
13. water resources should be nationalised
14."BALANCE BETWEEN PROFESSIONALISM AND FAMILY"
15. Effect of cinema on Youth
16. Education in India compared to Foreign nations
17. Is it necessary to ban COCOCOLA in India.
18. What is the effect of movies on youth.(is it good or bad)
19. Are studies more benifitial in India or in Abroad.
20."UN's peace activities" and "America's war on Iraq".
21."Environment-Whose Responisibility".
22.Is China a threat to the indian software industry.
23.Role of UN in Peace keeping
24.War on Iraq
25.About Hockey being the primary game in India.
26.Can america occupy iraq
27.Cricket shud be banned or not.
28.IS CHINA A THREAT TO INDIA
29.Present state of Indian Cricket team.
30.Love marriage/Arranged marriage.
31.Advantages of Co-education.
Hot Topics:
----------1.How to deal with international terrorism.
2.Should we pursue our policy of dialogue with Pakistan?
3.Is peace and non-violence outdated concepts?

3rd interview:
technical is very simple.C C++,ORACLE,JAVA only basics & ur project.
hr wud b very easy,Q's like tell about urself, why do u want 2 join satyam,
r u ready 2 relocate.
Satyam GD Probables:
---------------------1. US war on iraq-justified or not.
2. Role of UN in peacekeeping.
3. Position of Women in India compared to other nations.
4. Environment MAnagement.
5. Is China better than India in software.
6.Should SONIA gandhi be made the PM
7. BPOs in INDIA
8. Govt contribution to IT
9. will punch lines rule the Advt
10. prematial sex
11. is china a threat to indian industry
12. india or west , which is the land of opportunities
13. water resources should be nationalised
14."BALANCE BETWEEN PROFESSIONALISM AND FAMILY"
15. Effect of cinema on Youth
16. Education in India compared to Foreign nations
17. Is it necessary to ban COCOCOLA in India.
18. What is the effect of movies on youth.(is it good or bad)
19. Are studies more benifitial in India or in Abroad.
20."UN's peace activities" and "America's war on Iraq".
21."Environment-Whose Responisibility".
22.Is China a threat to the indian software industry.
23.Role of UN in Peace keeping
24.War on Iraq
25.About Hockey being the primary game in India.

26.Can america occupy iraq


27.Cricket shud be banned or not.
28.IS CHINA A THREAT TO INDIA
29.Present state of Indian Cricket team.
30.Love marriage/Arranged marriage.
31.Advantages of Co-education.
IMS Study:
----------The topics of GD can be varied :
Hot Topics:
----------1.How to deal with international terrorism.
2.Should we pursue our policy of dialogue with Pakistan?
3.Is peace and non-violence outdated concepts?
Current Topics:
--------------1.A Unipolar World spells disaster for underdeveloped countries like India.
2.Is Globalisation Really Necessary?
3.What shall we do about our ever-increasing Population?
4.Corruption is the price we pay for Democracy.
5.Foreign Television Channels are destroying our culture.
6.What India needs is a Dictatorship.
7.With media publishing and telecasting trivia, censorship is the need of the hour.
8.Kaun Banega Krorepati is less about knowledge but more about money and personality.
9.Beauty contests degrade womanhood
10.The rise of regional blocs threatens independent nations like India
11.Six billion and one bronze!
12.Is dependence on computers a good thing?
13.Should the public sector be privatised?
14.China and India are similar nations with contrasting ways
15.Is India a Soft Nation?
16.Value based politics is the need of the hour
17.Religion should not be mixed with politics
18.How to deal with high oil prices
19.Our cricketers are not to blame for match fixing
20.Why cant we be world players in industry as we are in software?
21.Multinational corporations: Are they devils in disguise?
22.Should there be limits on artistic freedom (the controversy on Fire).
23.Should there be private universities?
24.Does banning fashion shows and New Year parties save our culture?
Social Topics:
1.Are Big Dams Necessary?
2.Films are corrupting the Indian Youth
3.A Gandhian State selling liquor is an anomaly
4.Bride burning and dowry may look bad, but are an integral part of India.
5.Our Culture is Decaying
6.We are not serious about saving Wildlife/Environment
7.The education system needs serious reforms
8.The impact of MTV on our psyche
9.Showing Violence and Crimes should not be allowed in films and on television.
10.Let us legalise gambling
Management Topics:
1.Is management an art or a science?
2.The Rush for MBA is really a rush for big money

3.Ethics in Business are just a passing fashion


4.The objective of Management is to maximise profits
5.Do professional managers have a chance in our family run businesses?
6.The Internet is an exercise in hype
7.Is an MBA necessary to succeed in life?
8.Family owned business vs professionally run businesses
9.Smaller businesses and start-ups have more scope for professional growth.
10.Dot com or doubt com?
Creative Topics:
1.The Wheel is Turning Round and Round
2.If I was the Finance Minister/Prime Minister
3.There is no right way to do a wrong thing
4.Group Task: How can we have Mount Everest in India?
5.Do Beauty and Brains Go Together?
6.When I woke up in the morning I saw
7.A ship docked in harbour cannot face the storms
8.Up the Down Staircase
9.Just as we have smoke free zones, we should have child free zones
10.Marriage is a social trap
SOCIAL TOPICS:
1. The Internet chains have come on the wings of science and technology but are no less
restrictive for all that.
2. Secularism has become a tool to justify the wrongs done by the minorities.
3. Media is a mixed blessing/How ethical is media?
4. To fight AIDs, stop being coy about sex education.
5. What should India strive for- Westernization or modernization?
ECONOMIC TOPICS:
1. Developing countries need trade, not aid.
2. Why do we lag behind China?
3. Capitalism is a very flawed system but the others are so much worse.
4. Flexibility of labour laws is the key to attracting more Foreign Direct Investment.
5. Is the business of business only business?
POLITICAL TOPICS:
1. Reserving seats for women in Panchayat has not only been a farce but has distracted from
developing a more genuine voice of women.
2. Have the nuclear tests of 1998 benefited or harmed India?
3. Voters, not, political parties are responsible for the criminalisation of politics.
4. The voters are required to be well informed and educated about their candidates so that
they can elect the right aspirant by their own assessment.
5. India should go for the presidential form of democracy.
ECONOMIC TOPICS:
1. In our economic matters, there is an excessive tendency towards the thinking rather than
doing.
2. Every cloud has a silver lining
3. Can the economy achieve an 8 percent growth rate?.
4. Is disinvestment really that good for India or is a rethink in order ?
5. Are co-operatives relevant in today's globalised environment?.
6. Foreign aid is a dangerous drug that can stimulate in small doses but become fatally
addictive in larger doses.
7. Modern day sport in industrialised society is an industry, as anything else.
8. Government should clean its own hands before pointing finger at the private sector for
corruption.
9. Is the NPA ordinance too harsh?
10. Reforms have to grow up.

11. The future lies with glocalisation .


12. Is the consumer really the king in India?.
13. Globalisation versus nationalism
14. Conditional access system for cable TV watchers: boon or bane?
15. If India is poorly governed, the reason is that we have designed our system of governance
for protecting, if not encouraging, corruption?
16. Commercialisation of health care : Good or Bad ?
17. For globalisation to succeed in India people must be able to see what is in it for them
18. Is the US economy headed the Japanese economy way?
19. Economic freedom not old fashioned theories of development will lead to growth and
prosperity
20. Markets left to themselves encourage greed.
21. For globalisation to succeed in India people must be able to see what is in it for them
22. Should businessmen run the finance ministry
23. Should important services like transport be left to market forces?.
24. Is there any point in having a business strategy when the world changes from month to
month?
25. Is the patents bill good for India? .
26. Is the business of business only business?.
27. Globalisation is good for developing countries
28. Public sector being a guarantor of job security is a myth.
29. Is industryless growth here to stay ?
30. Capitalism is a very flawed system but the others are so much worse ?
31. How can business get rid of the bad name that it has earned?
32. Government pumping money into the economy is not the solution for our economic
problems
33. Business ethics are no longer a luxury for corporates but a necessity?
34. How should privatisation proceeds be utilised ?
35. Is the budgeting exercise of any use?
36. Should agricultural subsidies be stopped ?
37. Will Mumbai's film industry ever evolve into a truly modern corporatised one?
38. Will market reforms enrich rich states further, while poorer ones lag further?.
39. Why do we lag behind China ?
40. Who says MNCs are superior to Indian companies ?.
41. Why not use a brand index to measure national prosperity?.
42. What we need to reduce scams is better regulatory bodies.
43. War rhetoric is misplaced in a country like India which is trying to globalise its economy.
44. Trade can help the poor ?
45. The power ministry should cut off supplies to all the defaulting SEBs.
46. Steal a few lakhs and you're a criminal. Steal a few hundred crores and you become an
industrialist.
47. Should PSUs be divested through strategic sale or public offer?
48. The state is above the law?
1.
2.
3.
4.
5.

Managerial skills learnt in the classroom can never match those learnt from experience
Democracy is hampering India progress
MBA in India is highly overrated.
Religion is a private affair and should be of no concern for the state
Decreasing defense expenditure and increasing social expenditure is the need of the hour

TCY Online:
1.Public sector is more a hindrance than help to promote socialism.
2.Economic betterment of the poorer nations is as important as disarmament to ensure lasting
world peace.
3.From public sector to privatization as in the U.K., is the right answer for Indias instant
economic breakthrough.
4.The doctrine of limited nuclear war is an ill-convinced, ill-logical, irrational and extremely
dangerous concept.

5.Some simple but effective electoral reforms will enable us to retain the present
parliamentary system and ensure the preservation of democracy in India.
6.We must have only two national parties to contest parliamentary elections and regional
parties should not be allowed to contest for the same.
7.We can increase our food production not only to match our population explosion but also for
export provided we adopt modern, mechanized farming methods with large size land
holdings.
8.Nuclear war cannot be won and should not be fought.
9.Private enterprise and not public sector will contribute to faster and higher economic growth
in India.
10.Inflation is inevitable in our developing country.
11.The policy of reservation is a legacy of the British and it has done more harm than good.
12.Do you think MBAs are useful in the manufacturing / production department?
13.For a marketing post graduate, without prior work experience working in a big marketing
firm is a disadvantage when compared with working in a small firm. Discuss.
14.Consumerism is destroying the social fabric of Indian culture.
15.Free market is a prerequisite for growth.
16.Cricket as a national obsession is a detriment to other sports.
17.To develop India has to empower women.
18.Formulate the governments health policy to control the spread of AIDS.
19.Advertising is a waste of resources.
20.Privatization will lead to less corruption.
21.State is the biggest violator of human rights.
22.There can never be a classless society.
23.Beauty pageants are a marketing gimmick.
24.Voting rights to illiterates in India is illogical because it is widely misused.
25.Joint family is a blessing in disguise.
26.Higher education should be made possible only for those who can pay for it.
27.The weaker sex is the weakness of the stronger sex.
28.Women cannot successfully combine both career and home.
29.Women are good managers.
30.Executive should be allowed to form unions.
31.Effect of liberalization on poverty.
32.Indians perform better as individuals rather than in groups.
33.Business and ethics go hand in hand, or do they?
34.Developing countries should spend more on development than on defense.
35.Political parties have outlived their utility.
36.Is Swadeshi relevant for India today?
37.Money is required to earn more money.
38.Foreign trade is necessary for any country to survive .
39.Presidential Vs Parliamentary form of government of India.
40.Technology: The Ism Of The New Millennium?
41.Religion And Politics Should Not Mix
42.TRIPS Controversy And The Patent Act Amendment
43.Export Stagnation: Causes And Cures
44.Excessive Depiction Of Sex And Violence In Films
45.Classical Music Heritage And The Growing Pop- Culture
46.Decentralisation & The Panchayati Raj Institutions
47.Should India Sign The CTBT
48.State Interventions In Market Kind Or Mixed Economy
49.Science Is A Boon Or Bane
50.Is Swapping Terrorists For Hostages An Encouragement For Plane-Hijackers?
51.India and the political dynasties: The Nehru Family context
52.Nice Guys Finish Last
53.All Work And No Play Makes Jack A Dull Boy
54.Individual Freedom And Civil Society
55.Conventionalism And Modernity: The Ever going Debate
56.Should There Be A Restriction On Permissiveness Being propagated by The MTV Culture
And Foreign Media?

57.Marxism And Its Future All Over The World


58.The Growing Menace Of Casteism And Regionalism
59.Presidential Form Of Government Is Needed In India
60.Bullet For Bullet: Is It The Right Policy?
61.Capitation Fees Should Be Abolished
62.Arranged Marriages Are Better Than The Love-Marriages
63.Brain-Drain Has To Be Stopped
64.Business And Ethics Cant / Dont Go Together
65.Are women As good as Men Or Inferior?
66.Nothing Succeeds Like Success
67.The Malthusian Economic Prophecy Is No Longer Relevant
68.Secessionism In The North-East: Whos To Blame?
69.Should India Break Diplomatic Ties With Pakistan?
70.Age and Youth: Experience And Young Talent
71.East Is East & West Is Where All The Action Is: Mark Twain
72.Freedom Of Expression And The State Authority.
73.Capital Punishment Should Be Abolished
74.Tuitions Should Be Banned
75.India Needs Gujral Doctrine For Better International Relations
76.Doctors Accountability To Improve Health-Care
77.Universal Disarmament Is A Must
78.Indian Cricket Team Shouldnt Be Allowed To Play Abroad
HFCL CAMPUS TEST [1]
(1) TTL to CMOS pullup & vice-versa
(2) function of Ping
(3) SNMP protocol
(4) Application layer
(5) ## ----> token pasting in C
(6) Question on C: i^=j you have to tell the output given the values of i and j;
(7) Complexity of Binary Search tree
(8) Macro is given as follows : SQR(x) x*x
find the value of SQR(i-j) , when i and j were given
(9) Multiplexer 1 to 3 inputs--- A,B,C control lines--- S1,S2 Output --- Y .Write Y interms of
S1,S2
(10) Bandwidth minimum sampling theorem
(11) Shannon's Law
(12) Difference between fork() & execve()
(13) Banker's algorithm
(14) append(&struct , fp)
(15) Windows95 , X-Windows what are they?
(16) 16k memory , ending address of the address space FFFFH find the starting address?
(17) Difference between TCP/IP and OSI model

(18) Difference between Bridge and router


(19) A graph was given : " a qudrilateral with 1 diagonal " find the number of trees in the
graph
(20) Difference between TCP and UDP
(21-23) Pass by reference in C (3 questions)
(24) Synchronisation technique for IPC ( probably which method among the 4 choices was
best was asked)
(25) Address of RST 6.5
(26) Preorder Traversal
(27) Infix to Postfix
(28) What data structure is used to transform infix to postfix?
(29) 4 bit computer , size of ROM given , output of ROM gives the address , design a mod-n
counter
(30-31) FIFO , LRU page trace
(32) How many flip-flops in MOD-33 counter?
(33) printf("\nab\bcd\ref");
(34) doorom hello test
find argc and argv
(35) call main()
main()
{
toupper("Hello");
main();
}
what does this piece of code does?
(36-39) 4 question from Understanding Pointers in C on Pointer , Array , all from exercise in
the book
(40-41) 2 questions on precedence rule
HFCL CAMPUS TEST [2]
(1) ICMP protocol which layer?
(2) Ping - which protocol implemented?
(3) FTP - which protocol implemented?
(4) What kind of handshaking is used in TCP/IP?
(5) IP addressing ClassA , ClassB , ClassC

(6) End to end error correction is done by which layer ?


(7) Question on address bus and data bus ALE
(8) 16 bit address bus and 8 bit data bus , how much memory can be interfaced ?
(9) 1 bit opcode , (n-1) operand , find the length of Program Counter
(10) 4 bit ROM
(11) What is the benefit of memory interleaving ?
(12) How many maskable and non-maskable interrupt in 8085
(13) RISC what kind of Control Unit is implemented ?
(14) In Pipeline architechture , what is the value of CPI (Cycles Per Instruction)
(15) Where TLB is used?
(16)
struct a
{
char b[7];
char *s;
};
struct b
{
char *t;
struct a y;
};
struct b q={"Raipur" , "Kanpur" , "Jaipur"};
printf("%s %s" , q.t , q.y.s);
printf("%s %s" ,++q.t , ++q.y.s);
Find the ouput
(17) Heapsort worst case complexity
(18) Binary search complexity
(19) Where far pointer is used?
(20) Why address of operator(&) cannot be used on register variables? This company is in
Bangalore and they conducted a telephonic interview to screen the people at first level. This is
the Technical interview conducted for 3+ years experienced in Java, J2EE.
__________________________________________________
1. Why do you want to leave current company ?
2. Explain MVC architecture and functionalities of various components ?
3. I have a file of very very large file size at client side, and I have a JSP page. Using this JSP
page, if I want to send the file to a servlet (this servlet will store it somewhere), what is the
best method to do it ?
4. What is the difference between normal beans and EJBs ?

5. How system level services in EJBs are managed ? And tell about Deployment Descriptor ?
6. What are various types of EJBs ?
WRITTEN EXAM:
The written exam is very easy. A little bit of time management
will definitely take you to next round. There were three sections:I. Aptitude
II. Critical reasoning
III. Verbal ability
for critical reasoning u need 2 be focussed, concentated and apply ur full mind and nothing
else u need 2 have(ofcourse gud luck is must!!).
for verbal ability the questions involve word meanings, opposites.
Time management is ofcourse important to answer all the questions in time.
aptitude is the easy one. just refer to R.S. Agarwal .refer some basic concepts in
streams,tank problems,percentage,etc..
IMPORTANT:
NEGATIVE MARKING is there .So be carefull in answering.
u will be given rough sheet. Solve ur answers on rough sheet as neat as u can.
Before the written exam u will be given a form. U r required 2 write ur % and some other
personal details and also paste a photo.
If u take ur photo in formals(tie,coat), that will be best.
Fill ur % CAREFULLY.
sectional cutoff will be there. so answer every section carefully.
Well thats all about written exam. After sometime d results were announced and our college
students those cleared written were asked 2 report with 2 copies of RESUME .
INTERVIEW:
In the interview of ASSURGENT, some general technical questions are asked based on ur
resume e.g. my friend mentioned about robotics so she was asked questions abt robot etc.
Basically they r not interested in ur answering, they r checking ur confidence levels.
So solve them nicely on the paper as u can or explain them verbally how r u solving ur
problem.
usually HRs of ASSURGENT want us 2 be very POLITE and confident.
So be POLITE and DONT SHOW UR ATTITUDE. DONT ARGUE with them.
Prepare some common things e.g. which newspaper u read, name of its editor, which
sections of paper u read, hw u gather information, wht u surf on internet etc
My HR was a very young person. My experience is as follows:
HR: come in
Me: gud afternoon sir
HR: have ur seat
Me: thnku sir
Hr: give ur resume
I stood and gave it
Hr: tell me abt urself
Me: bla bla
Hr: so krishna prasad, whats ur family background?
Me: bla bla

Hr: IS it ur first company?


Me: no sir.
Hr:u have good %,then why haven't u selected so far?
Me: bla bla
Hr: ur favourite subject
Me: Data structures
Hr: then tell me abt stack.
Me: bla bla
Hr: in ur hobbies u mentioned abt music. then who is ur favourite music director?
Me: A.R.REHMAN.
Hr: what is his first album?
Me: bla bla
Hr: what is his latest album?
ME: pray for me brother.
Hr: in which year ?
Me: bla bla
Hr: explain abt function, array?
Me: bla bla
Hr: what do u know abt assurgent company?
Me: bla bla.
Hr: what is site address of assurgent?
Me: www.assurgent.techno.com
Hr: o.k krishna prasad. Good time with u. U can leave.
Me: I came out with smiling face.
Dont argue with interviewer. Dont show attitude.
Be POLITE and HONEST. Of course hv gud body lang and eye contact etc etc.
Then after waiting for 5 days,results were announced and my name was there.22 were
selected.

Written test :
In written test there were about 65(40 Aptitude + 25 Computer Related) questions and the
time limit was 60 minutes. This test is MANUAL TEST and comprised of Psycometric
test, aptitude, and basic computer related questions. There was 1/2 negative marking on
Aptitude, & no negative marking on Computer Related questions.
Technical Interview

This was about 90 minutes for me. Questions were started only from Aptitude (what was
in written) and later from subjects such as DBMS, C, OS, CN, Software Engineering, JAVA, and
other general questions. First the interviewer posed questions to know whether I am
really interested for joining cordys or not.
1: They asked to write a program in any language which was asked in Written Aptitude
Paper (Question is not in
my mind, but it was completely logical as i can say), It took a long time to solved
finally.
2: He gave two tables, table 'A' consists of eid, prjtid table 'B' consists of prjtid ,
prjtname and ask to select those
students how work on a particular prjt name.
4. Asked on 'c' Linked List , circularly doubly linked list and practical examples for that.

6. OSqs, like Demand Paging, Virtual Memory Concepts, Deadlock concept with real-time
example, etc.
7 Some basic question related to Computer Network.
The overall question what they asked, i answered very comfortably, & with confidence.
HR (Near around 150 minutes)
Tell abt your self and family
Appreciable work u have done in your previous life.
Strengths, weakness, hobbies etc. What you planned to remove your weakness?

Priority related question, like which one u'll gv first priority after joining: CORDYS or
your FAMILY.
Some Technical question was asked in this round also.
1. Let us suppose you need to tell all the features of OOPS to your Grand-Father, who
doesn't know even a
single letter of Computer. What real life example will u give to make him clear.
2. They asked to write a program to find the angle based on clock time.
3. Some DBMS query basically it was from JOIN operation.

4. Finally they asked a very twisted kind of question, like suppose there are two different
groups of two different
companies in front of you, and you are selected in both. Now you have to decide which
company you'll prefer
to join and why? Also the reason to cancel other one.
Lastly some questions related to my behaviours.
1. Given a Binary Search Tree, write a program to print the kth smallest element without
using any static/global variable. You can?t pass the value k to any function also.
2. What are the 4 basics of OOP?
3. Define Data Abstraction. What is its importance?
4. Given an array of size n. It contains numbers in the range 1 to n. Each number is present at
least once except for 2 numbers. Find the missing numbers.
5. Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which
aren?t present.
6. Given a string,find the first un-repeated character in it? Give some test cases

7. You are given a dictionary of all valid words. You have the following 3 operations permitted
on a word: delete a character, insert a character, replace a character. Now given two words word1 and word2 - find the minimum number of steps required to convert word1 to word2.
(one operation counts as 1 step.)
8. Given a cube of size n*n*n (i.e made up of n^3 smaller cubes), find the number of smaller
cubes on the surface. Extend this to k-dimension.
9. What is a C array and illustrate the how is it different from a list.
10. What is the time and space complexities of merge sort and when is it preferred over quick
sort?
11. Write a function which takes as parameters one regular expression(only ? and * are the
special characters) and a string and returns whether the string matched the regular
expression.
12. Given n red balls and m blue balls and some containers, how would you distribute those
balls among the containers such that the probability of picking a red ball is maximized,
assuming that the user randomly chooses a container and then randomly picks a ball from
that.
13. Find the second largest element in an array with minimum no of comparisons and give the
minimum no of comparisons needed on an array of size N to do the same.
14. Given an array of size n, containing every element from 1 to n+1, except one. Find the
missing element.
15. How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do
the same
16. Explain polymorphism. Provide an example.
17. Given an array all of whose elements are positive numbers, find the maximum sum of a
subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the
array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of
3, 5 and 7)
18. You are given some denominations of coins in an array (int denom[])and infinite supply of
all of them. Given an amount (int amount), find the minimum number of coins required to get
the exact amount. What is the method called?
19. Given an array of size n. It contains numbers in the range 1 to n. Each number is present
at least once except for 1 number. Find the missing number

Hai,
On 25th AUG 2007 , Cordys, a product based company came to HYDERABAD CENTRAL
UNIVERSITY , HYDERABAD.
I was selected into Cordys and I want to share my experience with place ment procedure.
Placement procedure cosisted of three rounds.

Written test, Technical interview, HR.


Written test :
In written test there were about 122 questions and the time limit was 55 minutes. This test is
online test and comprised of Psycometric test, aptitude, and basic computer related questions.
Very easy test. Just reflect your self for psycometric questions.
Technical interview :
This was about 2hrs for me. Questions were posed from subjects such as DBMS, C, OS, CN,
Software engineering, JAVA, and other general questions. First the interviewer posed
questions to know whether I am really interested for joining cordysis or not.
Then he gave a real time proble on DBMS.
1: There is a institution which gives coaching for many courses such as java,C,C++ etc . The
courses were given online basis. The options to students are that a student can apply for as
many courses as he wish and select any faculty of his choice because the faculty were
versatile(knows all subjects). Then there may be chance that a 1000 students choose on subj
ex 'c'; and only one sir cannot teach and your Data base must have facility to divide students
based on faculty they choose. so a faculty may get only 2 stu.. and other may get 500 stu.
Write down the tables for it.
2:He gave two tables table consists of eid, prjtid table b consists of prjtid , prjtname and aske
to select those
students how wor on a particular prjt name.
3. Asked on transactions protocol procedures and asked how can I run two transaction on one
machine in a
atomic fashion.
4. Asked on 'c' doublylinked list , circularly doubly linked list and practical examples for that.
5. Asked on efficient search method for a list of numbers on unsorted list of numbers.
any improvements necessary for 'c' language.
6. OSqs
Asked does an OS do in case of dead lock
What is preemption, mutual exclusion, etc
7q ON CN
Which protocol is TCP ip , muticast and other simple ques:

HR
Tell abt yur self and family
Appreciable work u have done in prev 3 yrs.
Strengths, hobbies etc
Some kind of tech q?
You have to designa software for the vendor at super market. after calculating the bill, if you
give more amount , he gives the change. he gives change in efficient manner ex if 250 were
to be given back he gives 2 100 rupee notes and 1 50 rupees note.

The program output should be such that an efficient no of denominations should be displayed.
U have to take cases of available denominations and no of their availability. ( some times u
have 3 20 rupees notes and no 50 rs). the program also should have an idea of asking 5 rs
from the costomer if available ( if amt to be given back is 165 and if no denominations satisfy
it, if cust gives 5rs you can give 20 rs note).

MOST OF THE STUDENTS GOT THEIR WRITTEN CLEARED THIS WAY ONLY
next was a communication round, that was an intro cum extempore kinda round in which u
batches of 30 students were called in the conference room & were made t introduce
themselves one by one & HR was asking questions related to their hobbies, strebgths,
weaknesses & all. Also we were asked to speak upon a topic like.........
#
#
#
#
#

Ur native city
Ur family values (not value of ur family)
Tata Nano
Politics Vs Ethics
Bi-party Vs Multi-party......etc etc

After this results were declared, this communication round being an elimination round only 5060 students were able to make it to the next roundthat was the Technical cum HR round.
CS & IT students had seperate techincal round & HR rounds but ECE students (including me)
just had to pass through the TEchnical/HR round.
Mine TECHNICAL round was scheduled for 27th Nov at 9 am but when i reached my college, i
was shocked to see some students in formals, those who were not in the list of result for
previous round. [mind it,dont hesitate if u have some approach on ur TPO.]
My Technical/HR round : Group of 3 students were called in for this round. as soon as we
entered, the HR asked for our respective resume... after handing over resume, the 1st
question he asked was.......
HR : So, Gaurav sikka tell e something aboiut ur technical skills
ME : Sir m having a Basic knowledge of C & DE is kindda faviorite subject....
HR : What about Power electronics ?
ME : Sir, i m sorry but i never got a chance to study Power electronics
HR : Ok tell me whats an Op-amp
Me : Op-amp is the common name used for IC-741 & bla bla bla (i think he was just looking
for a gud start)
HR : OK, Good !
ME : Thankyou sir
HR : tell me smthin abt IC 555 Timer
ME : Sorry sir, i'v no idea about it.
HR : U know GSM ?
ME : Yes sir
HR : can u draw the Block diagram of GSM ?
ME : Yes sir sure, May i have that paper ?
HR : YEah sure
Me : After completing within half a minute......... handsed over the sheet to him
HR : Please explain it !
ME : explained everything....... i was confused in between my explanation so he made be
comfortale by asking me to cool down & all, after that i explained everything slowly.......
HR : in betwen my explanation he said... AB TO GAYA , AB TO GAYA :D

ME : I gave a amile & said sir just gimne 5 sec


HR : OK
ME : Then explained completely.
HR : Thankyou
ME :Thankyou sir & was leavng the door when he called me back......
HR : Have a seat, Tell e something about ur family
ME : Told
HR: why dont u join ur father
Me : Answered
HR : What do u think, u have some approach in corporate sector or not ?
ME : Answered
HR : What u expect from ur first job ?
ME : Answered
HR : Hobbies
ME : Animation :D he was impressed
HR : So u r ready to move to lucknow with us ?
ME : yeas sir no problem at all..........
Finally result was decl;ared after 6-7 hrs of waiting & waiting.......... i was 99.99% sure about
my selection...... & i got my name in the list....
buit even here some students managed to get there names in the final result with approach :D
........... hope u got my point loud & clear........
Some other questions from y fellow batch mates ........
8086 /8085 pin diag & architecture
details of GSM
SIM card
Data comunication (MODES : serial, paallel)
RADAR
IC 55 timer
i was not selkected in INFY & LnT so guys dont loose hope u will get placed in one or other
company sooon.
Best of luckAdobe interview for freshers
Written rounds:
Round 1: Aptitude - Trivially simple. Time could be a problem for junta not preparing for
CAT. Fifteen questions in fifteen minutes.
Round 2: Quant - This was even more trivial. Thirty questions in thirty minutes.
These two rounds were entirely objective, multiple-choice with no negative marking. We had
to fill in an OMR sheet and very few of us had pencils and erasers with us - almost everybody
had pens. That was bad as we couldn't change an option after marking it.
Round 3: Engineering. This included a lot of general stuff. Don't remember much about it.
Thirty minutes. 15 marks
Round 4: Code. This was a real test. A lot of questions and quite a few that I hadn't seen
before. We were supposed to write working C code in a limited time. 15 questions. 45 marks.
It was like Neo fighting Smith in Matrix 3!
10 were selected out of 60 people who wrote the test.

Interview1:
He is very soft-spoken and one of my friend told me that this guy had brutally destroyed him.
So I was terribly nervous. I usually am confident but in that room, I was stammering! Finally,
it turned out that he wasn't that brutal after all. Moral of the story: Stay confident at all times.
1.

He asked me my specialization? When I told him that I had none as I didn't want to
specialize in this stage, he was a little surprised but appeared satisfied with my
reason.

2.

Why not further studies? (He had noted that I was third in my batch. He appeared
impressed by that
Answer : I told him that my profile clearly indicated that I've been trying to get into
the industry via internships, industry-funded projects right from second year, second
sem. I said that I was fully sure that I didn't want to do MS anytime soon.

3.

He asked me to tell him about my favorite project.


Answer : I told him about the web-browser that I had developed for cell-phones. I
thought that was the only project which was closest to what Adobe was working on.
He appeared satisfied with my answers.

4.

He then looked at my grades. He commented that my lowest grade - B- was in Digital


Image Processing. I just looked at him like a doofus thinking of what to say. But he
quickly added, 'don't worry, it happens.' So people, be fully prepared to explain any
anomalous grades. I was prepared with the explanation of the W in the my gradesheet but not of the B- in DIP. I know that this is really stupid considering that I was
interviewing with Adobe. Don't make this mistake.

5.

He then asked me a question that had been asked in Round 4, written test:
Describe an optimal algorithm to find the second minimum number in an array of
numbers. What is the exact number of comparisons required in the worst case? Note
that they didn't ask the order in Big-Oh notation. They wanted the exact number of
comparisons.
Answer : I screwed up, big time in this question. I had superficially discussed this
question with my friend a while ago and he had outlined an algorithm which I thought
that I had understood, but I hadn't. I started off explaining it but got stuck in the
middle. He sternly told me to read it up again. One solution that I could tell him, and
which I had written in the test was this:
Use two variables - min and second min. Initialize them by comparing the first two
elements of the array. This is (1) comparison. Then, go through the entire array, from
index 2 to n-1 comparing each element, first with min and then with second min,
updating each variable as necessary. This will involve a worst case of two comparisons
for each element. Therefore, total number of comparisons = 2*(n-2) + 1 = 2*n - 3
comparisons.
I'll try to update this with a better solution, sometime soon.

6.

Given a polygon (could be regular, irregular, convex, concave), find out whether a
particular point lies inside it or outside it.
Answer : This is an easy, straight question from graphics. You shoot a ray parallel to
the x-axis passing through this point. Start with odd parity. Change parity of ray each
time it intersects an edge of the polygon (consider special case of when the line passes

through a vertex of the polygon. Change parity only if it passes through a vertex
which has one edge above it and one edge below the ray). If the parity of ray is even
when it passes through the point, it is inside the polygon, else it is not.
7.

He asked me to explain Canny's algorithm to him. (this was because my DIP project
was related to this)
Answer : This is simple. Study DIP

8.

Then, he gave me a practical problem to solve: Suppose you are given an image which
contains some text and some photos. How do you find the location of the image?
Answer : I gave various alternatives - from searching for RGB components, to using
OCR.. he didn't appear fully satisfied. I think he was looking for edge-detection, but
that would fail, if the text contained tables, etc.

Interview2 :
He was friendly at the start but this interview was my worst. He asked me my favorite subject.
I said that it was Programming. (He laughed at that)
1.

Which are the four storage classes in C.


Answer : static, extern, register, auto

2.

Given a program:
int i;
int main()
{
int j;
int *k = (int *) malloc (sizeof(int));
...
}

Where are each of these variables stored?


Answer : I started off correctly, but he was able to confuse me. He brought in shared
libraries, static libraries fundas into the discussion. We had a discussion for about
twenty-minutes on this. Finally, he was happy with one of my answers because I had
deduced which policy made sense and answered correctly. He said that out of all the
people interviewed so far (I was second last), nobody had been able to answer all of
these questions correctly
3.

Question on polymorphisms.
this is easy - get it from any C++ book. He tried to confuse me again, but this time I
was ready and he was finally satisfied.

Then he looked at my grades and said that out of all your grades, you have only two
Bs and one of them is in Compilers. Why? (Damn it.. three non-A grades and that's all
they ask about. What's wrong with this world?!)

4.

5.

Didn't you like Compilers? "Not in particular", I replied. "Fine. Now, I HAVE to ask you
questions on compilers", he said.
He again went back to the first question he had asked me. Once again, I had no
satisfactory answer for him.
Then he wrote out some code and asked me how the compiler will generate code for
it. I gave some answer, but he was clearly not satisfied. I thought it was all over by
then.
Then, he asked me a DIP question. He commented that he had given that particular
question to his juniors in IITB once and they had done a very good job at it. The
problem is this:
A teacher is writing on a blackboard and we want to pass all the information on the
blackboard over a low-bandwidth network in real-time. How do we do it.
Answer : I first suggested that we capture only a small portion of the board. To locate
that portion, we could search for the chalk in the prof's hand - of course, taking care
that it had the blackboard in the background (no point capturing a video of the prof
scratching his chin, na?). Further, if the prof was writing only text, we could convert
the video into text by OCR and then transmitting. Simple diagrams could also be
reduced to a set of vector-graphics instructions (we rarely, see the prof shading stuff).
I think he liked my approach, but was not completely satisfied. Anyway, we left it at
that and went forward.

6.

7.

8.

9.

Given a set of words one after another, give me a data structure so that you'll know
whether a word has appeared already or not.
Answer : I suggested various alternatives. but he kept helping me and finally, we
came up with an array of pointers to 26-trees (each node of the tree has 26 children).
Store every word as a path from the root to a leaf with pointers in the correct places.
For example, hello would be stored as - pointer from 'h' index of the root array to a
node which had a pointer from 'e' index of it's array to a node which had a pointer
from 'l' index of the array.. and so on. This is both time and space efficient.
He asked me some questions on Interprocess Communication: What's a semaphore?
How are they used? He would often pick out words from my answers and ask me what
they meant. He wanted to make sure that I really knew what I was talking about. I
was able to answer all his questions, but I made the mistake of telling him, when we
started off that I didn't know much about this subject as I had done it a long time ago.
He was very annoyed at that, apparently because a lot of people before me had said
this.
He then asked me some DB fundas. Transaction. Serializability, Consistent state, etc. I
was able to answer all of them. I stumbled around a bit in a few questions where I
was explaining correctly, but not using the keywords that he was looking for.
Finally, he asked me whether I had any questions. I thought that I should say
something to make him realize that I was not completely stupid and so asked him
whether there was any logic to the order in which the short-listed candidates were
called. This turned out to be a dumb move. The order was alphabetic and he sent me
off with a parting shot, saying "You guys do pattern recognition and stuff and still you
can't recognize such a simple pattern" Me and my big mouth! Moral of the story: Don't
ask questions for the sake of asking.

Interview3 : Puzzle round


After the first two interviews, this one was like having a warm batch after being cold and wet
for days! I did well in this one.

1.

There is a clock at the bottom of the hill and a clock at the top of the hill. The clock at
the bottom of the hill works fine but the clock at the top doesn't. How will you
synchronize the two clocks. Obviously, you can't carry either of the clocks up or down
the hill! And you have a horse to help you transport yourself. And, the time required
for going up the hill is not equal to the time required to go down the hill.
Answer : You have to go up the hill and come back, with horse, without horse,
getting four equations to solve four unknowns - time to go uphill - with horse, without
horse, time to go downhill - with horse, without horse. Then you can go up the hill and
set the clock to '(time when you left) + (time to go uphill with horse)'

2.

There was one more puzzle.. I don't remember it. but I do remember that we started
discussing ways of generating large prime numbers. I told him the funda of Mersenee
primes (luckily remembered it) and he was decently impressed.

3.

We also talked a bit about my phone browser project.

Finally, two people were selected out the ten that were shortlisted.

& T EMSYS PAPER ON 9th OCTOBER 2007


Hai friends, I am haritha from narayana engg.college , Nellore . Here in Nellore L&T
EMSYS have visited NBKR I want to share my experience for u r preparation guidance
1st Round: Written test
It consists of 3 sections
Section1: figure series. They will give a series of figures we have to find the next figure
in the sequence. This section is very easy.
Section2:This section consists of basic electronics .It is more than enough to go through
basics of opamps,digital electronics, switching theory & logic design.
Section3: This section consists of C questions.15 questions whose outputs are to be
determined and 1 program will be given. They will give on just basics. I got the program
to print the students name and marks and grade using functions and pointers.
There is no need to worry about section1 and section3 they will be from previous papers
it is sufficient if u just go thru the key. The questions order also wont change. The paper
for our seniors which took place in last year is the same one for us too. But they will
change section2.
The results of written test are given to college after 20 days.

2nd Round:
Friends this is an unpredictable round. Actually we have said that we have a GROUP
DISSCUSSION round but after going there we have conducted JAM session. We can talk
on any topic. They will not restrict us.
Once we cleared this round we have the final technical round
3rd Round:
Now I will share my technical round experience.My technical panel is very cool.
I have called by my HR.I entered the room.There were two in the panel I wished them.
HR: Tell me about itself.He interrupted me many times
HR: ur favorite subject?
ME: I told switching theory & logic design Rhone of my HR asked me how u can
produce a delay of 20nsec.
ME:I tried it but failed the answer is using D-FLIP FLOP
HR: Can u explain the logic of D-FLIP FLOP?
ME:I explained it clearly. The asked to draw the outputs but not truth table.
HR: Another favorite subject?
ME:VHDL (VHSIC HARDWARE DESCRIPTION LANGUAGE)
HR: Do u know C?
ME: yes
HR: Abt data types in C?
ME: explained on a paper clearly
HR:Size of primary datatypes?
ME:explained.
HR:Can u give the difference between the union and structure?
ME:Explained clearly by writing a program
HR:How to perform division operation with out using / operator?
ME:I told that I will write a program but they asked me to explain the logic
I told that using subtract operator we can perform it
HR:We should not use any arithmetic operators
ME:when I was thinking he asked me to give names of different operators. I named them
then I told that using shift operators we can perform / operation
HR:which type of shift?
ME:right shift
HR:So which shift for / and * operations?
ME:Left shift for * and right shift /
HR:He opened my written test paper and asked me to identify the small mistake I made
in the program I have written.
ME:I was searching for it One of my HR gave clues to identify it With his help I found it
last.
HR:Ok do u have any questions?
ME:No sir
HR:thank u haritha
ME:Thank u sir

Friends technical round is the elimination round in L&T.84 students have cleared the
written test out of 250. 44 have cleared the jam session and finally 11 have been selected
in technical round.This gives the importance of each round.
It is more than enough to have a good knowledge on basics.We have to answer them with
a lot of confidence this is a must.
After 20days the results are announced.
It is very great to see that 9 out of 11 arefrom our college.
I am very glad to be one of them.
This is my experience I hope that this will help u to prepare well.
Ok Friends GOOD LUCK TO U
HOPE THAT WE WILL MEET IN L&T.
MY SINCERE REQUEST TO U IS TO JUST CONTRIBUTE UR EXPERIENCE TO
ALL SO THAT ONE CAN GAIN SOMETHING FROM U .PLS PASS THIS
MESSAGE TO EVERYONE TO GUIDE OTHERS THRU THEIR CONTRIBUTION.
THANK U FRIENDS.
WEP INDIA TELEPHONIC INTERVIEW 2006
Hi,
I have attended a telephonic interview from Wep India Peripherals. It was pure technical.
first they asked me to describe about my current job, current CTC, Expected CTS and
whether willing to relocate? like that...after that they asked me whether i am ready for a
technical interview now (day before yesterday HR called up me to inform abt the
telephonic interview). and they asked me to rate myself from 1-10 for sql server, asp.net
and vb6.
here r the questions they asked. just for ur reference
ASP.NET

1) Difference between Server.Transfer and Response.Redirect?


2) Directives in .NET? - (Page directive & Error Directive)
3) Explain about Web.Config file?
4) How many web.config file can be used with an application?
5) Page level tracing and application level tracing?
6) Explain about ViewState and what will happen if view state is false?
7) Explain about Dataview?
8) What is Ispostback?
9) Use of datagrid and its major properties?
10) How dataset differ from data reader?
11) How to implement polymorphism in .NET?
12) Explain about the use of Ctype and its Syntax?
13) What is shared functions?
14) How to create xml using Dataset?
15) Explain about Global Assembly cache?

16) Where the compiled dll file stored?


17) Explain about garbage collectors?
18) How to register shared assembly?
19) Optional parameters in .NET?
VB6
1) How to create exe for vb application?
2) Early binding and late binding?
3) What is the use of option explicit and where to specify?
4) Cursor types and Lock types used with VB6?
5) How to transfer recordset values to an array?
6) How to create xml file from recordset?
7) How to track errors in vb6?
8) What is the differents between OnErrorResume and OnErrorResumeNext
9) How to register ActiveX controls?
10) What is the differents between dll and ocx control?
11) How to call an exe from vb6? ie using shell scripting
12) How to pass parameter to exe?
13) How to make a connection with database using code?
14) How to specify optional parameters in VB6?
15) How to specify password field?
SQL Server 2000
1) What are cursors?
2) What are triggers?
3) How to specify parameters in a stored procedure?
4) Marks of the students are stored in a table called marks.
How to find the row containing the second largest mark from the table using sql query?
there might have been more ques from sql server.but this is all i remember
finally they asked me if i am selected how soon i can join with them? and they told if am
selected from this round next round will be hands on, for that i have to appear in
person...and they told they will inform me soon about next round through mail. it lasted
around 45 min. ok Now am waiting for that.
(Paper Submitted By : Sankar)
It consists of 3 rounds
1)
written test
2)
tech interview
3)
HR interview.
There is no GD
Written test consists of 5 sections
1)
Analytical ability-20m,30min
2)
Verbal ability.30m,20min
3)
Attention to detail-20m,20min
4)
Technical-40m 30min
5)
Reading ability.-10m 20min

1st section is verbal ability it consists of


1)
rc 5m
2)
articles 10m
3)
select appropriate meaning 5m
4)
some stuff like find out errors 10m
Articles are very simple like names of large cities followes by in & villages by at just
based on this he asked 4 questions other also very simple We can get synonyms by
context I think no need to prepare for that. Errors also easy this paper is made by MERIT
TRAC so you can prepare questions from IBM also
2nd analytical ability is some what tough it has a cube prob
der r 3 cubes are placed horizontally and cutted into 64 (each cube) & den 1st one line
(4*4)row of second & 1st 2 rows of 3rd cube r removed & painted black all sides now
que are
1)
how many cubes r only 1 side painted
2)
how many cubes r 2 sides painted
3)
how many cubes r 3 sides painted
4)
how many cubes r no side painted
and 2 probs on time & distance 1 started with a speed 20kmph &den 2 started after 30
min 1 when started with a speed of 25kmph and 3 started after how many min wit a
speed 40kmph to reach all 3 at same time?
Some thing like that bt easy
Attehtion to detail this is very easy section & que on decision making r some twisted be
prepared from R S aggarwals VERBAL reasoning. Der r some que based on binary
numbers 5 prob r given $=1,*=0 then what is value of $$***$$/**$*$$$$ like this
Technical this is hardest in all sections we hav to do 40 q in 30 min & der r 10
progarammes each of 1 page length dont do them first be prepare from DS especially
from linkedlist&trees most of d q r based on that
READING ability they given a 2 page material on pipelining of microprocessors is
given followed by simple q s
They said there is sectional cutoff but I hav seen my answer paper & I got 76 out of 120
n der is nothing abt sutoff marks on dat sheet
TECHNICL interview
Sir: rakesh cum sit down
Me: thankyou sir good evening
Sir :ok rakesh tell me abt ur education from 10th class
Me:sir I hjav completed my 10th from Z.P high school with 76.8%&inter with
77.1%&purduing finsl yesr with 74.83%
Sir-u r from which branch
Me-eee sir
Sir-what r the subjects u hav upto in ur b tech
Me-told

Sir-wat is ur fav sub


Me-power systems sir
Sir ok I think power systems is big sub sub which parts it consists of
Me-generstion ,transmission distribution
Sir- how many types of generators r der
Me-ac dc
Sir-wat is diff
Me-output & some que s based on our basics and csme for C
sir-do u know linkedlist
me-no
sir-graph
me-no
sir-do u kno structures
me yes
sir-wat is diff bw structure n an array
me-1 is collection of similar datatypes n other is diff datatypes
sir-what is ude of structure
me-told
sir-do u kno pointers
me-yes sir
sir-wat is pass by ref n pass by value
me told
sir-wat abt increment n decree operatore
me-told
sir-write 1 programme i/p is HOW SIMPLE C PROGRAMMING IS u hav to calculate
how many spaces r der
me-tried bt not came
sir- ok leave it
sir do this one i/p is values of resistors n they r connected in parallel or in series the o/p is
equilent resistance
me-this time done it perfectly
sir ok rakesh u can leave I will give repopt on ur performance to hr he will tell u if u r
selected r not
me-thankyou
after 5 min hr came & told wait for HR
hr-rakesh sitdown
me-thankyou mam
she-tell me where u r studied ur intermediate (by seeing my resume)
me-told
she-how is ur experience upto now
me-its good mam
she-hav u attended any other comp before
me-yes mam I attended IBM cleared written bt not JAM mam
she-wat topic they given
me-primary education is more imp than higher edu
she-y u r not clered

me-he asked to tank abt 3 min mam bt I talked for 1 min


she-ok now tell me for 3 min
me I expected dis que bt talked only abt 2 min n said thats it mam
she-u got only 70s u not tried for 80s
me-still trying mam
she-how much %age u want get wen ur B.tECH completes
me-77 mam
she-77 why
me mam I got 77 in my 10th n 12th so I want toget77 in this too
she-y u r taken EEE
me for my rank it was the good branch in my college
she- k ny thing want to know from me
me-mam tell me the reason if I was rejected
ahe-hey y u r thinking u r not selected u r seledted man
me-thankyou verymuch mam
after hour they anounsed results I was there in the list
By,
SELECTION PROCEDURE:
3 rounds namely
1.written ,
2.technical,
3. HR.
WRITTEN TEST
its of 3 sections namely
1.aptitude(10 ques)
2.technical(15 ques)
3.english(5 ques)
APTITUDE:
its difficult than other 2 sections. ther r no objective type Q's. v sholud calculate n writ
answers.
!. some consecutive pages r missed in a book whose sum is 9808. find those pages.
2. water melon of 200 kg is kept for selling by a merchand. at morning he find tat 99% of
that friuts has water and he found due to hot summer only 98% of water is present in
evening.find weight of water melon. ans 198.
3.if the order of vowels r arrangd in reverse order wat ll b in middle. ans.i
4.there are two dads named jhon, vikram. ther r two sons micky, vicky. 4 went to shop
and spent some amount. find who is father of vicky.(sorry i dont no it fully)
5.one esculater related problem.
6.123456789=100. using +,-,* signs in between the digits how many no. of ways its
possible if in its same order.
sorry i cant remember others.

The CTS company conducts


Written test
Technical interview

Mark verification regarding written test all guys well known about pattern My suggestion is, in my written i had Venn
diagram,cube,binary logic code like 1 is represented as & like this 0 is* like this,data sufficiency
The paper for was easy and a good preparation of R.S.Agarwal quant and aptitute can make u get through in aptitude
part.Except cubes,i did everything. Please make sure u get 15 above in quant.
Regarding verbal .... i felt some difficulties here ., the passsage we got was a bit difficult, but a bit of concentration can
make u get through in that too. A good basics of grammar is necessary for u to get through. then analytical section
every one can do it without any preparation...
The results were declared in 2 hours. n for god's grace my name was called. This is how my interview went
Interview experiences:
int: Good afternoon Srinivas
me: GA sir
int :had lunch?
me: yes sir(with a broad smile)
int: what did u hv??
me: Chicken Biryani
int: SO u killed a hen and ate??
me: hehe....
int: oh!! he killed the hen n u had the chicken...right??
me: yes sir!!!
int: well srinivas,tell something abt ur family
me: told...(some questions related to my answer..told confidently)
int: R u gud in C??(i replied yes)
int: what is an array?
me: told
int: what is function overloading?
me: Doono sir
int: what is software development life cycle?
me: i donno sir(full stunned by d question.)
int: ohh...u r from ece right...sry sry...
me: Its ok sir(i dont know y i told so)
int: what is eddy current?
me: i donno sir
int: jus try to recollect
me: tried n told "sry sir i cannot recollect.it was 2 yrs when i read tht"
int: thats nt d rite answer.U studied A,B,C... 12 yrs bac but u remember...y cudnt u remember this??
me: told some bakwaas
int" asked my fav subj i told mc...asked abt mc
me: told
int: why into software?
me: told
int: hw can u cope up wid IT ppl?
me: told
int: u cudnt remember a question of 2 yrs bac...hw can i recruit u??
me: gave a gud answer
int: any questions?
me: asked n he answered
int: thnk u...
jus be thorough with ur technical skills and be confident in everything....even ur walking style...ur way of speech and
all...and above all....believe in god and urself....u ll be in CTS...all d best n c u all in CTS :) bye

I had questions like following:1. What is the difference between a class and object?
2. What is stored procedure? What are its advantages and disavantages?
3. Which is better trigger or stored procedure?
4. What is difference between data set and data reader?(.net)
5. Write a querry for accesing unique rows from emp(Ename,Age) sorted by age?
6. What is the difference between Function overloading, Function Overriding and Virtual
Functions?
7. Difference between multiple and multilevel inheritence?
8. Differnce between interfaces and abstract classes?
Sorry i don't remember remaining two. Like this he is concerntarting on OOPs,
DBMS, .NET
Coming to the 2nd section. This consists of 20 questions. Questions on Aptitude. All the
qestions came from R.S.Agarwal. Questions like Ages, Time and work,distance....etc
Coming to the 3rd section. This consists of 20 questions. He had given all C programs
and asks us to point out the errors and outputs. All the questions are from Test ur C skills
by Yashwanth Kanithkar
Thats all I'm still waiting fro the result...
Write a Code
1.

To reverse a string using a recursive function, without swapping or using an

extra memory.
2.

To reverse a linked list as above. given a macro like

#define MAX(A,B) {to return that is larger}


what will MAX(i++,j),MAX(i,j++) return.
3.

Difference between Macro and ordinary definition. Difference between Class

and Struct.

4.

Testing and Maintenance.(will you work in it and what are they) Give the

outputs of a compiler and assembler and loader and linker etc. If a new data structure,
suppose a queue is to be added like int, long etc., where shall the changes be -- lex
or yacc or where.
5.

what is a Real Time OS.Name some.

6.

Describe VRTX in few words.

7.

How does the scheduler know the time how it should be scheduled

8.

sockets, TLI, streams.. and much about project

9.

What is deadlock? How do you avoid it?

10.

What is a semaphore?

11.

What exactly happens after each system call in sockets, both at the client and

at the server.
12.

What is the difference between widget & gadget in XWindows?

13.

Tell about strtok & strstr functions.

Test Pattern
1.Test I - Aptitude
2.Test II- English
3.Tech Interview
4.HR Interview
5.GM Interview
Aptitude
qns 1-10 - 1 mark each Logical Analysys which had sequence completion...for that strictly
follow RS Agarwal -Verbal & Non-Verbal....
qns 11-20- 1 mark each Data Sufficiency in which a question will be given with 2
statements....we have to analyse wether we r able to get the answer from a single statement,
both statements or neither of those statements....refer Verbal & Non-Verbal RS Agarwal.....
qns 21-35- 2 marks each Numerical Ability in which normal aptitude problems like trains,
time and distance, time and work etc...like.. -train passing a post -train passing a man
standing in another moving train... -trains passing each other.. -some men doin a
work...change in time wen some more men helped and wen some left the job after
completing half of it....
-questions like... a/3 = b/4 = c/5...then find the value of (a+b+c)/c...... Strictly refer
Quantitative Aptitude- R S Agarwal..
qns 36-45 5 marks each Programming section.....to my surprise C or BASIC languages wer
not ther...insted they created a new language with new keywords....new looping functions
etc. And a programming code was given wich was based on That particular
language....so...we had to compare each statement of the code with the description given for
each keyword used.........even though the code seemd very complicated....belive me it'll be a
simple program like A+B or assigning a value to A.. Almost 5-6 questions wer of this
type.....the rest wer algorithm and some simple questions..... Heard that some had flow
charts....but it was not ther in mine.. Ther isnt any book to refer for this section.....as it may
change always...
English
20 questions wer ther....100% simple......i'll say that its a lifeline while writing the
aptitude....score 20/20 for that...
Tech Interview
I wont say that its a normal one.....questions will be strictly based on the resume......and if ur
not strong in wat in wrote in resume...then its game over.....ther will be C questions.....but
dont expect normal C interview questions.....questions will be something we hadnt
imagined...he started the process by a friendly talk....and simple questions like enter strings in
all the ways.....

Passing on to the core question of interview.....he asked me to write the equivalent code for
modulus operator in C(%).....then he asked to
write the equivalent code for finding the absolute value of a number....the remaining questions
wer from wat i wrote in resume....he asked me about html,linux file systems....difference
between DBMS and RDBMS etc..... 6 candidates wer interviewd by that panel.....in wich 4 wer
eliminated...
HR Interview
Its not an interview actually.....they just need to talk to u....to check ur communication
skill,confidence etc.....be interactive.....i think its entirely different from the normal HR
interviews......for me he asked me to sell my mini project product to an imaginary crowd.....be
confident....avoid breaks in ur speech.....watever u say.....be sure that it wont affect the flow
of words.......im writing it once again....they expect a friendly talk without being stressed or
tensed........then ur forwarded to the GM...
GM Interview
Now the situation is really serious......he checks wether ur fit for the company...wether ur
industry ready.......he'll check it in many ways.....he may give real world situations.....like wat
will u do if u found that ur boss had forwarded a wrong design.....how will u inform
him??......and he'll ask wat r ur qualities....and will ask questions regarding that......
Also will test u by asking how u'll react if u wer eliminated....be cool....eventhough it seems
very easy and interesting....beware this is the place wer maximum elimination occurs.....ask
him questions wich proves ur eagerness to work for the perot family and ur eagerness to know
more about the company......
Finally...after 1 hr long discusion.....it was 9 pm wen they gave the result to Santharam
Sir,our placement officer.......8 wer selected...eventhough i got selected, it was very
disppointing that only one was selected from our college....
Tips
1.Study the ppt very well....by-heart each and every word he says......it'll
be very useful....
2.And pronounce it as "Peroe Systems"....dont say perot.....
3.Be 100% interactive....
Now i thank all those who posted their experiences in freshersworld. it really helped me a
lot.....especially my senior Soumya who had posted last year.....

1. APTITUDE TEST(4 sections, separate cut off)


2. INTERVIEWa) technical interview
b) hr interview (1 essay of 5 minutes was also dere)
First of all they conducted aptitude test.aptitude test contains these sectoins.
1. ENGLISH ABILITY .
2. QUANTITIVE APTI.
3. LOGICAL REASONING.
4. TECHNICAL SKILLS.
These sections in paper contains 80 questions and duration was 80 mins.we have to do
each section in 20 minutes. We coudnt move to next section before 20 mins. and once a
section is completed we coudn't go back.there was sectional cutoff. some of the sample
questions which i remember are --

A) English ability. -Q1. which is suitable combination similar to - pesticide : crop :: antiseptic: ?
a) wound b) clothing c) bandage d) bleeding.
Q2. It is a long time.............i saw my friend who lives...............his parents...........he
neighbouring town.
a) when ; at ; of b) since ; with ; in. c) when ; for ; in d) since ; for ; of.
and other questions of selecting suitable words and also 3 questions based on one small
passage. it was very easy one and in fact d easiest section was english section only.
B) Quantitive aptitude-Q1. if ratio of milk and water in one container is 3:5 and in another is 1:2 they mixed
togeher then what is ratio of milk and water ?
Q2. dimension of a room is 5*8 meters. room floor is covered by carpet by leaving space
4cm from walls. if carpet is 18rs. per meter then total cost?
Q3. find out d odd one in d series
a)9 b)121 c)361 d)881
answer is d)881 since it is not a perfect square.
it also contains questions related to tabulaion,distance and time, work percentage , profit
and loss. R. S. AGGARWAL is more than sufficient.it is time consuming part be fast
otherwise u will not be able to attempt all the questions.
C) Logical reasoning -for me dis section was tough coz it really consumed time n it was not possible to attempt
all d questions in mere 20 minutes
although i tried my level best n i was sure i will cross d cut off of this section so guys b
fast 4 dis section. simple q based on venn diagram and selection of suitable statement
were also there refer R.S.AGGARWAL (verbal).
D) Technical skills -this section was complete technical so be prepare. it contains C ,C++, DBMS ,RBMS and
general computer architecture.
This is all about written test. 66 students were selected out of 600. i cleared dis round and
then dey gave ppt to the selected candidates only. from my college only three cleared the
written test.in ppt dey talked about company profile. my interview was on d same day.
TECHNICAL INTERVIEW-

here he asked me to show him my resume. then he asked me about ORACLE. i strictly
said no sir i m not good at oracle because i havnt studied it yet.
then he said ok which languages u have studied so far
strctly mention all d languages which u have mentioned in ur resume
i said c,c++,JAVA

Q1) what is the difference between c and c++?


Q2) what is object oriented programming?
Q3) what is the difference between the class n objects?
Q4) what was the need of classes?
truly speaking i loved dis question then i described from the beginning mentioning the
name of the person who invented C++ and all the things which were
required to move to classes n object oriented concept.
Q5) what is encapsulation?
always try to give precise n exact definitions with examples
Q6) what is abstraction?
Q7) what is the need for abstraction? give some practical example?
Q8) what is inheritence?
Q9) give a real life example of inheritance?
Q10) what is polymorphism?
Q11) write a program for SWAPPING?
main()
{
int a=5;
int b=10;
a=a+b; //a=15
b=a-b; //b=15-10=5
printf("value of b is %d",b);
a=a-b; //a=15-5=10
printf("value of a is %d",a);
}
actually i did this program witout using temporary variable then he asked me is there any
other method then i very smartly said yes sir v can also use a temporary variable.
Q12) what is jvm?
Q13) what do u know about data base management system?
Q14) what is rdbms?
Q15) write a query to create a table?
Q16) if v dont pass the fields name then vil d table b created?
Q17) what is preprocessor?
Q18) what is the difference between compiler and interpretter?
Q19) what is the command to make a file in dos?
i said i was not able to recollect it now.
Q20) what are header files?
Q21) what r the needs for header files?
Q21) what is d difference between preprocessor directives n header files?
Q22) what is the use of main in any program?
Q23) when v make graphics in c++ then which header file v include?

questions were very simple n was all basics a student from cs branch must know. i was
asked to wait outside after a few minutes i was called 4 the H.R. roundmay i come in mam?
hi vinay please come in
may i have a seat mam?
ya sure please sit.
ok vinay take dis paper n now i vil give u 5 mins write something abot urself ur college
ur branch n y u opted 4 dat branch
n how do u see urself after 5 years 4rm now?
i quickly finished the work in less than 2 mins.
mam started readin it
ok vinay wat do ur father do?
mam my father is a govt. servant
how long has he been serving 4 his organization?
27 years
oh dat is a very long time would u serve 4 an organisation 4 such a long time
i said mam it depends totlly on d work environment n also if there is a kind of emotional
bond b/w me n employees of the company
so u r avery emotional kind of person
yes mam i m a very emotional kind of person.
ok imagine u r a ceo of a company n one of ur friend who is emotionally attached to u
asks u to leak the secrets of the company wud u do dat?
no mam the first priority is 4 the firm 4 which i m serving n no compromise on dat part.
ok so u r emotional but not ethnically emotional.
wat kind of person r u? domestic or international?
i said domestic n justified wid my views
next she asked traditional or modern? i said traditional
n gave the example of lalu prasad yadav (rail minister of india) being a traditional kind of
person in speaking n living he is popular all over the world
she asked me really
then i said mam he recently gave management classes to students 4rm HORWARD
UNIV.
mam u must hav read in the news paper? she said yes i did.
ok what kind of animal do u like? n y?
i said ANT coz hard working, always moving towards its goal, n team work.
i think u watch national geography channel a lot.
i said no mam i dont.
then wat do u watch in ur tv set.
i said i dont get time to see tv
then she asked me how do i manage my time?

mam after my college i use to give tuitions to school going children.


u like teaching dem?
i said no mam i dont like teaching them infact i love teaching them.
ok yes its gr8 fun then she mentiond dat she also used to give tuitions at her time
u live in hostel or some whre else
i said my hometown is in udaipur bt i live here with my relatives
ok vinay thank u very much
thank u mam it was pleasure talking to u
same here
she asked me 4 two photographs of mine
zensar is a company which takes both technical n hr interviews of all d candidates
irrespective of the performance
Result came after 8 days to my college they selected only 13 out of 66 who cleared the
apti n i was one of them. only thing i wud say to u is hard work is the only key to
success because what i believe is dat luck is a loser's excuse 4 winner's position.
this was my fifth interview within a span of 2 months. n thank god this time i made it
earlier companies were
1) US TECHNOLOGY
2) TECH MAHINDRA
3) MASTEK
4) PERSISTENT
so never lose hope n whenever u fail then jus think dere is something better 4 u in the
store. have faith in GOD n no one can stop u 4rm reaping the success of ur dreams.
ALL THE BEST!
Hi,
This is the second round, means INTERVIEW.
Mine interview was around 20 min.
There wer e 2 ppl in the pannel. One wll ask technical nd other will HR questions.
They wll ask ur favourite subject. I told thm networking. So they asked questions frm this.
Few questions are:
1: Define Network
2:Diff b/w OSI nd TCP/IP
3: Diff b/w Switches, Bridges nd Routers. Which one is better nd why?
4:Diff b/w LAN nd WAN
5:Function of Session layer
6:Capacitance of coaxial cabel
7: Demorgans law
8: Maxwell eqn
9: Shenon's eqn
10: Define S/N
12: AM, FM, PM
13: why clock is required nd what is synchronisation?
14: What is an Amplifier nd types of it?
Few of my frnds asked questions frm GSM, Mobile Communication, SAtellite communication,
Filters etc. But all questions were basic one.

So prepare urself fr ur favourite subjects.


Also wear a big smile on ur face nd be confidant wht r u answering. I had given all answers
except 2 or 3.
And after tht they wll ask some HR questions.
Best of LUCK.

Hi Friends, I went to the interview which was an off campus one.If im not wrong they
were around 2k students who gave the Interview out of which 30 got selected.
This is how the whole selection procedure was
1) Aptitude+Technical written test
2) Technical Interview
3) H.R Interview
The Aptitude comprised of Verbal reasoning, Quants, Analytical Reasoning.The
technical had C&C++ and DBMS. In verbal they had Fill in the blanks,Rcs and Give the
closest meaning. Verbal was quite easy though the reading passages were a bit tuff but
still not that hard either.
For Quants a bit of brushing of basics is really going to help, they asked questions like
two trains moving in each direction etc. The analytical reasoning was the easiest of all.
In Technical they concentrated more on the programs of C&C++ like a program and then
depending on that the errors which can pop up while execution. Out of 2000 students 250
cleared the Apptitude.
Then came the technical interview,dis is how it went
1)Tell me something about Yourself?
Told
2)What is the difference between C nd C++?
told
3)Why is C++ called the oops Language?
Oops..Dont Know..told about encapsulation,abstratction etc...she looked quite satisfied.
and then came the programs...
4)given a set of 10 numbers write a program which is going to choose numbers which
only end with 3(not 6,9) and then add them.then Select numbers which start wid 9 and
add them after that subtract the sum of both...Took a bit of time but wrote.She was happy.
5)Given a set of numbers wap so as to pick a number which is a perfect square.
6)Wap for a palyndrome( Eg DAD)
7)WAP to take a number from the user (any digits) seperate the digits and add the squares
of the digits.
8)WAP on Bubble sort using Pointes.
well those were the programs though they were easy it took a bit of pain to re call the
logic of each nd every program.
She didnt asked a thing on DBMS.
After around 4 hrs the technical results were declared and I got through then came HR
interview,nd dis is how that went
HR-Sorry for making you wait this long( The time was 8 30 pm-The actual time was 9

AM of day 2)
Ray- No,probs sir.
HR-ok,tell me something about ur profile
Ray-Said
HR-OK Good..Now what are your career Goals and how are you planning to achieve
them
Ray-Said
HR-Stress a bit more on your skills
Ray-Comm skills,Team player and PROBLEM SOLVING ABILITY
HR-what do u mean by problem solving ability(PSA)?
Ray-Said
HR-Give one example where in ur PSA was utilised
Ray-made one and said..lol
HR-why HSBC??
Ray-Said
HR-What you know abt HSBC??
Ray-HSBC-Hong Kong Shanghai Banking Co-operation.
It has its branches in 82 countries.
It work in various domains like Data warehousing,Mainframes etc.
It is an Industry in Itself
HR-You got any questions for me??
Ray-Yep..asked one.
HR-OKay..Ray Thankyou.
Ray-My pleasure...
This is how it went and after 2 hrs the result was declared and BOY..my name was
actually there..and I was so happy... The pay package which dey offered was hmmm...
well..am not suppose to say that.
My advice to all is They are concentrating more on your comm skills, so be sure that in
both ur HR nd TEch interview ur FLUENT dont stammer aruond and make sure what ur
talking makes sense because specially in HR there was lot of Cross questioning.
HSBC doesnt have any BOND process so with the pay package and the scope which it
has it definelty one of the best companies around to work for.
By,
Give the output of the programs in each case unless mentioned otherwise
1.

void main()

{
int d=5;
printf("%f",d);
}Ans: Undefined

2.

void main()

{
int i;
for(i=1;i<4,i++)
switch(i)
case 1: printf("%d",i);break;
{
case 2:printf("%d",i);break;
case 3:printf("%d",i);break;
}
switch(i) case 4:printf("%d",i);
}Ans: 1,2,3,4
3.

void main()

{
char *s="\12345s\n";
printf("%d",sizeof(s));
}Ans: 6
4.

void main()

{
unsigned i=1; /* unsigned char k= -1 => k=255; */
signed j=-1; /* char k= -1 => k=65535 */
/* unsigned or signed int k= -1 =>k=65535 */
if(i<j)
printf("less");
else
if(i>j)
printf("greater");
else
if(i==j)
printf("equal");
}Ans: less
5.

void main()

{
float j;
j=1000*1000;
printf("%f",j);
}
1. 1000000

2. Overflow
3. Error
4. None
Ans: 4
6.

How do you declare an array of N pointers to functions returning pointers to

functions returning pointers to characters?


be answered in at least
7.

Ans: The first part of this question can

three ways:

Build the declaration up incrementally, using typedefs:


typedef char *pc;

/* pointer to char */

typedef pc fpc();

/* function returning pointer to char */

typedef fpc *pfpc;

/* pointer to above */

typedef pfpc fpfpc();


typedef fpfpc *pfpfpc;
pfpfpc a[N];
8.

/* function returning... */
/* pointer to... */

/* array of... */

Use the cdecl program, which turns English into C and vice versa:
cdecl> declare a as array of pointer to function returning

returning pointer to char

pointer to function

char *(*(*a[])())()

cdecl can also explain complicated declarations, help with casts, and indicate which
set of parentheses the arguments
one

go in (for complicated function definitions, like the

above). Any good book on C should explain how to read these complicated

declarations "inside out" to understand them ("declaration mimics use"). The pointerto-function declarations in the examples above have not included parameter type
information. When the parameters have complicated types, declarations can *really*
get messy. (Modern versions of cdecl can help here, too.)
9.

A structure pointer is defined of the type time . With 3 fields min,sec hours

having pointers to intergers.


Write the way to initialize the 2nd element to 10.
10.

In the above question an array of pointers is declared. Write the statement to

initialize the 3rd element of the 2 element to 10


11.

int f()

void main()
{
f(1);
f(1,2);
f(1,2,3);
}
f(int i,int j,int k)
{

printf("%d %d %d",i,j,k);
}What are the number of syntax errors in the above?
Ans: None.
12.

void main()

{
int i=7;
printf("%d",i++*i++);
}Ans: 56
13.

#define one 0

#ifdef one
printf("one is defined ");
#ifndef one
printf("one is not defined ");
Ans: "one is defined"
14.

void main()

{
intcount=10,*temp,sum=0;
temp=&count;
*temp=20;
temp=&sum;
*temp=count;
printf("%d %d %d ",count,*temp,sum);
}
Ans: 20 20 20
15.

There was question in c working only on unix machine with pattern matching.

16.

what is alloca()

Ans : It allocates and frees memory after use/after getting

out of scope
17.

main()

{
static i=3;
printf("%d",i--);
return i>0 ? main():0;
}
Ans: 321
18.

char *foo()

{
char result[100]);
strcpy(result,"anything is good");

return(result);
}
void main()
{
char *j;
j=foo()
printf("%s",j);
}
Ans: anything is good.
19.

void main()

{
char *s[]={ "dharma","hewlett-packard","siemens","ibm"};
char **p;
p=s;
printf("%s",++*p);
printf("%s",*p++);
printf("%s",++*p);
}Ans: "harma" (p->add(dharma) && (*p)->harma)
"harma" (after printing, p->add(hewlett-packard) &&(*p)->harma)
"ewlett-packard"
Mistral Solutions
C Section
1. What does the following program print?
#include <stio.h>
int sum,count;
void main(void)
{< BR> for(count=5;sum+=--count;)
printf("%d",sum);
}
a. The pgm goes to an infinite loop b. Prints 4791010974 c. Prints 4791001974
d. Prints 5802112085 e. Not sure
2. What is the output of the following program?
#include <stdio.h>
void main(void)
{
int i;< BR> for(i=2;i<=7;i++)
printf("%5d",fno());
}
fno()
{
staticintf1=1,f2=1,f3;
return(f3=f1+f2,f1=f2,f2=f3);
}
a. produce syntax errors b. 2 3 5 8 13 21 will be displayed c. 2 2 2 2 2 2 will be displayed
d. none of the above e. Not sure

3. What is the output of the following program?


#include <stdio.h>
void main (void)
{
int x = 0x1234;
int y = 0x5678;
x = x & 0x5678;
y = y | 0x1234;
x = x^y;
printf("%x\t",x);
x = x | 0x5678;
y = y & 0x1234;
y = y^x;
printf("%x\t",y);
}
a. bbb3 bbb7 b. bbb7 bbb3 c. 444c 4448
d. 4448 444c e. Not sure
4. What does the following program print?
#include <stdio.h>
void main (void)
{
int x;
x = 0;
if (x=0)
printf ("Value of x is 0");
else
printf ("Value of x is not 0");
}
a. print value of x is 0 b. print value of x is not 0 c. does not print anything on the screen
d. there is a syntax error in the if statement e. Not sure
5. What is the output of the following program?
#include <stdio.h>
#include <string.h>
int foo(char *);
void main (void)
{
char arr[100] = {"Welcome to Mistral"};
foo (arr);
}
foo (char *x)
{
printf ("%d\t",strlen (x));
printf ("%d\t",sizeof(x));
return0;
}
a. 100 100 b. 18 100 c. 18 18 d. 18 2 e. Not sure
6. What is the output of the following program?
#include <stdio.h>
display()
{
printf ("\n Hello World");
return 0;
}
void main (void)
{

int (* func_ptr) ();


func_ptr = display;
printf ("\n %u",func_ptr);
(* func_ptr) ();
}
a. it prints the address of the function display and prints Hello World on the screen
b. it prints Hello World two times on the screen
c. it prints only the address of the fuction display on the screen
d. there is an error in the program e. Not sure
7. What is the output of the following program?
#include <stdio.h>
void main (void)
{
int i = 0;
char ch = 'A';
do
putchar (ch);
while(i++ < 5 || ++ch <= 'F');
}
a. ABCDEF will be displayed b. AAAAAABCDEF will displayed
c. character 'A' will be displayed infinitely d. none e. Not sure
8. What is the output of the following program?
#include <stdio.h>
#define sum (a,b,c) a+b+c
#define avg (a,b,c) sum(a,b,c)/3
#define geq (a,b,c) avg(a,b,c) >= 60
#define lee (a,b,c) avg(a,b,c) <= 60
#define des (a,b,c,d) (d==1?geq(a,b,c):lee(a,b,c))
void main (void)
{
int num = 70;
char ch = '0';
float f = 2.0;
if des(num,ch,f,0) puts ("lee..");
else puts("geq...");
}
a. syntax error b. geq... will be displayed c. lee.. will be displayed
d. none e. Not sure
9. Which of the following statement is correct?
a. sizeof('*') is equal to sizeof(int) b. sizeof('*') is equal to sizeof(char)
c. sizeof('*') is equal to sizeof(double) d. none e. Not sure
10. What does the following program print?
#include <stdio.h>
char *rev(int val);
void main(void)
{
extern char dec[];
printf ("%c", *rev);
}
char *rev (int val)
{
char dec[]="abcde";
return dec;
}
a. prints abcde b. prints the address of the array dec

c. prints garbage, address of the local variable should not returned d. print a e. Not sure
11. What does the following program print?
void main(void)
{
int i;
static int k;
if(k=='0')
printf("one");
else if(k== 48)
printf("two");
else
printf("three");
}
a. prints one b. prints two c. prints three
d. prints one three e. Not sure
12. What does the following program print?
#include<stdio.h>
void main(void)
{
enum sub
{
chemistry, maths, physics
};
struct result
{
char name[30];
enum sub sc;
};
struct result my_res;
strcpy (my_res.name,"Patrick");
my_res.sc=physics;
printf("name: %s\n",my_res.name);
printf("pass in subject: %d\n",my_res.sc);
}
a. name: Patrick b. name: Patrick c. name: Patrick
pass in subject: 2 pass in subject:3 pass in subject:0
d. gives compilation errors e. Not sure
13. What does
printf("%s",_FILE_); and printf("%d",_LINE_); do?
a. the first printf prints the name of the file and the second printf prints the line no: of the
second printf in the file
b. _FILE_ and _LINE_ are not valid parameters to printf function
c. linker errors will be generated d. compiler errors will be generated e. Not sure
14. What is the output of the following program?
#include <stdio.h>
void swap (int x, int y, int t)
{
t = x;
x = y;
y = t;
printf ("x inside swap: %d\t y inside swap : %d\n",x,y);
}
void main(void)
{
int x;

int y;
int t;
x = 99;
y = 100;
swap (x,y,t);
printf ("x inside main:%d\t y inside main: %d",x,y);
}
a. x inside swap : 100 y inside swap : 99 x inside main : 100 y inside main : 99
b. x inside swap : 100 y inside swap : 99 x inside main : 99 y inside main : 100
c. x inside swap : 99 y inside swap : 100 x inside main : 99 y inside main : 100
d. x inside swap : 99 y inside swap : 100 x inside main : 100 y inside main : 99
e. Not sure
15. Consider the following statements:
i) " while loop " is top tested loop ii) " for loop " is bottom tested loop
iii) " do - while loop" is top tested loop iv) " while loop" and "do - while loop " are top tested
loops.
Which among the above statements are false?
a. i only b. i & ii c. iii & i d. ii, iii & iv e. Not sure
16. Consider the following piece of code:
char *p = "MISTRAL";
printf ("%c\t", *(++p));
p -=1;
printf ("%c\t", *(p++));
Now, what does the two printf's display?
a. M M b. M I c. I M d. M S e. Not sure
17. What does the following program print?
#include <stdio.h>
struct my_struct
{
int p:1;
int q:1;
int r:6;
int s:2;
};
struct my_struct bigstruct;
struct my_struct1
{
char m:1;
};
struct my_struct1 small struct;
void main (void)
{
printf ("%d %d\n",sizeof (bigstruct),sizeof (smallstruct));
}
a. 10 1 b. 2 2 c. 2 1 d. 1 1 e. Not sure
18. Consider the following piece of code:
FILE *fp;
fp = fopen("myfile.dat","r");
Now fp points to
a. the first character in the file.
b. a structure which contains a char pointer which points to the first character in the file.
c. the name of the file. d. none of the above. e. Not sure.
19. What does the following program print?

#include <stdio.h>
#define SQR (x) (x*x)
void main(void)
{
int a,b=3;
a = SQR (b+2);
}
a. 25 b. 11 c. 17 d. 21 e. Not sure.
20. What does the declaration do?
int (*mist) (void *, void *);
a. declares mist as a function that takes two void * arguments and returns a pointer to an int.
b. declares mist as a pointer to a function that has two void * arguments and returns an int.
c. declares mist as a function that takes two void * arguments and returns an int.
d. there is a syntax error in the declaration. e. Not sure.
21. What does the following program print?
#include <stdio.h>
void main (void)
{
int mat [5][5],i,j;
int *p;
p = & mat [0][0];
for (i=0;i<5;i++)
for (j=0;j<5;j++)
mat[i][j] = i+j;
printf ("%d\t", sizeof(mat)); < BR> i=4;j=5;
printf( "%d", *(p+i+j));
}
a. 25 9 b. 25 5 c. 50 9 d. 50 5 e. Not sure
22. What is the output of the following program?
#include <stdio.h>
void main (void)
{
short x = 0x3333;
short y = 0x4321;
long z = x;
z = z << 16;
z = z | y;
printf("%1x\t",z);
z = y;
z = z >> 16;
z = z | x;
printf("%1x\t",z);
z = x;
y = x && y;
z = y;
printf("%1x\t",z);
}
a. 43213333 3333 1 b. 33334321 4321 4321 c. 33334321 3333 1
d. 43213333 4321 4321 e. Not sure
23. What is the output of the following program?
#include <stdio.h>
void main (void)
{
char *p = "Bangalore";

#if 0
printf ("%s", p);
#endif
}
a. syntax error #if cannot be used inside main function b. prints Bangalore on the screen
c. does not print anything on the screen
d. program gives an error "undefined symbol if" e. Not sure
24. If x is declared as an integer, y is declared as float, consider the following expression:
y = *(float *)&x;
Which one of the following statments is true?
a. the program containing the expression produces compilation errors;
b. the program containing the expression produces runtime errors;
c. the program containing the expression compiles and runs without any errors;
d. none of the above e. Not sure
25. What is the return type of calloc function?
a. int * b. void * c. no return type: return type is void
d. int e. Not sure
part 1 of paper
first aptitude having five sections (50 questions and 45 minutes)
part 2
second c debugging (test ur c skills - yashwant kanitkar)(questions 20 time 30 min.)
paper 1
section one
15 questions (data sufficiency)
a alone is sufficient
b alone is sufficient
a and b are both sufficient
a and b both are insufficient
section two
five questions (reading comprehence )
very easy
section three
15 questions (logical reasoning)
a pare is given and some hints are given u can fine out the ans
one hotel has two zones (east and west) not all east zone flats have ocean view but all weat
zone flats have harbour view all ocean view flats has extra charge in harbour view flats above
and on 3rd floor have extra charge west zone flats lower than 3rd floor some has kitchen so
extra charge all other flats of east zone not having ocean view has kitchen so extra charges

section four
10 questions verbal reasoning four or five sentences are given related to single topic four

options are given which are having order of three sentences(abe or bec) select correct order
sections five
five computational questions which were easy
* total 12 members half are in club a one third in b and one fourth in c how many are not in
any club
ans 5(check)
these type of questions u can find in
R. S. Agrawal
or IMS package of CAT
in question it was written that all five sections carry their cutoffs so attempt all but in electrical
one guy was selected who didnot attempt reading comprehension but attempted all 45
questions this paper also has negative marking of 50%
paper 2
1.what does p in
const char *p
stands for
p can be changed like this
2.main()
sturct date {
char name[20];
int age ;
float sal;
};
sturct data d ={"rajesh"};
printf("%d%f",d.age,d.sal);
}
tell the output
3.main()
int i=7;
printf("%d"i++*i++);
output
4.void main()
{
int d ;
int i=10;
d =sizeof(++i);
printf("%d");
output
5.difference between
extern int f();
int f();
6.choose correct
(i)stack is automatically cleared
(ii)heap is automatically cleared
(iii)user has to clear stack and heap
(iv)system takes care of ----------

7. What'll be the output:


main()
{char *a,*f();
a=f();
printf("%s",a);
}
char *f()
{return("Hello World");
8.What'll be the output:
main()
{char*a,*f();
a=char*malloc(20*sizeof(char));
a=f();
printf("%s",a);
}
char *f()
{char n[20];
strcpy(n,"Hello World");
return(n);
}
9.What is the error :
main()
{int j=10;
switch(j)
{ case 20:
pritnf("Less than 20");
break;
case 30:
printf("Less than 30");
break;
default:
printf("hello");
}
10.which is valid :
(i)char arr[10];
arr="hello";
(ii) char arr[]="hello";
11.
main()
{
char *str;
str=char*malloc(20*sizeof(char));
strcpy(str,"test");
strcat(str,'!');
printf("%s",str);
}
12. How many times main is get called :
main()
{
printf("Jumboree");
main();
}
ans: till stack overflow.
13. Which statement is true about main :

(i) Varible no. of Arguments can be passed main.


(ii) Main can be called from main();
(iii) We can't pass arguments are passed in main
(iv) main always returns an int
14. Output ?
main()
{
int i,j;
for(i=0,j=0;i<5,j<25;i++,j++);
printf("%d %d",i,j);
}
15.main()
{
int i;
if(i=0) //it's assisnment not logical operator
printf(" Hell ");
else
printf("Heaven");
like this
no negative marking and more than one answers but paper I is cutoff paper i think c paper will
not be checked

Interview
they will give u puzzles in first round which will be from site techinterview.org this site has 70
puzzles and their answers so go through them
second round has c coding of data structure circular quese,tree etc also questions from c and
c++ like virtual functions
far near huge memory concepts like heap,stack etc
then in third round hr questions like hobbies and interets make ur curriculam vite and bring it
with ur file
they want people with good aptitude in interview rounds ur aptitude and approach matters so
solve puzzles.
Test Paper :1
Paper Type
Test Date
Posted By

: Technical - C & C++


: 7 July 2003
: admin

Ubinetics Test Pattern- July 2003


20 c objective Qs to be answered in 30 minutes
All questions are related to basic c concepts like expression, arrays, loops ,structure ,
pointers around 3 or 4 qs on array with loops
Since paper is very easy cutoff is very high.
They will select 20% of the student for the interview after written test. Freshersworld.com
point to remember.
Each correct ans 1 marks
Each wrong answer 1 -ve mark
Sample Paper

Some of the questions will not have answers .Please forgive us.
1. Difference b/n scanf("%s",msg);and scanf("%[\^n]",msg); where msg is a char array.
2. What is ure of comma operator in for loop.
3. int shw(int *a){
*a = 10;
/* return stmt is missing */
}
main(){
int p=3,q=4;
q = shw(&p);
printf("%d %d",p,q);
}
4. which is true
a. all automatic variables are declared with in the function
b. all variables are automatic
c. all not declared variables are automatic
d. none
5. What is recursion. Recursive prog to generate Fibonacci series . Is it a best method?
6. write 7*a interms of +,-,<<
7. count number of 1's in a 32 bit integer.(i had not remembered whether array or integer).
8. main(){
char *s1 = "hello",*s2 ="abce";
strcpy(s1,"");
s2[0] = s1[0];
printf("%d%d",strlen(s1),strlen(s2));
}
9. regarding memset
10.Algorithm to delete a node in Double linked list.
11. Difference b/n fgets,fscanf which u will prefer.
Unix
11.What is creon and whats diff b/n 'at' command.
12. what is system call and lib function. whats diff b/n them. abt execve - expalin.
13.some thing abt makeall
14. write abt TCP,IP,ICMP
Enter Your Comments

TEXAS INSTRUMENTS PAPER - 08 SEP 2005


Test Paper 01
1. Can we declare a static function as virtual?
Ans: No. The virtual function mechanism is used on the specific object that determines which
virtual function to call. Since the static functions are not any way related to objects, they
cannot be declared as virtual.
2. Can user-defined object be declared as static data member of another class?
Ans: Yes. The following code shows how to initialize a user-defined object.
#include
class test
{
int i ;
public :

test ( int ii = 0 )
{
i = ii ;
}
};
class sample
{
static test s ;
};
test sample::s ( 26 ) ;
Here we have initialized the object s by calling the one-argument constructor. We
can use the same convention to initialize the object by calling multiple-argument constructor.
3. What is forward referencing and when should it be used?
Ans: Consider the following program:
class test
{
public :
friend void fun ( sample, test ) ;
};
class sample
{
public :
friend void fun ( sample, test ) ;
};
void fun ( sample s, test t )
{
// code
}
void main( )
{
sample s ;
test t ;
fun ( s, t ) ;
}
This program would not compile. It gives an error that sample is undeclared identifier in the
statement friend void fun ( sample, test ) ; of the class test. This is so because the class
sample is defined below the class test and we are using it before its definition. To overcome
this error we need to give forward reference of the class sample before the definition of class
test. The following statement is the forward reference of class sample. Forward referencing is
generally required when we make a class or a function as a friend.
4. The istream_withassign class has been derived from the istream class and overloaded
assignment operator has been added to it. The _withassign classes are much like their base
classes except that they include overloaded assignment operators. Using these operators the
objects of the _withassign classes can be copied. The istream, ostream, and iostream classes
are made uncopyable by making their overloaded copy constructor and assignment operators
private.
5. How do I write my
Ans: This is shown in
#include
ostream& myhex
{
o.setf ( ios::hex)
return o ;
}
void main( )

own zero-argument manipulator that should work same as hex?


following program.
( ostream &o )
;

{
cout << endl << myhex << 2000 ;
}
6.We all know that a const variable needs to be initialized at the time of declaration. Then how
come the program given below runs properly even when we have not initialized p?
#include
void main( )
{
const char *p ;
p = "A const pointer" ;
cout << p ;
}
Ans: The output of the above program is 'A const pointer'. This is because in this program p is
declared as 'const char*' which means that value stored at p will be constant and not p and so
the program works properly
7. How do I refer to a name of class or function that is defined within a namespace?
Ans: There are two ways in which we can refer to a name of class or function that is defined
within a namespace: Using scope resolution operator through the using keyword. This is
shown in following example:
namespace name1
{
class sample1
{
// code
};
}
namespace name2
{
class sample2
{
// code
};
}
using namespace name2 ;
void main( )
{
name1::sample1 s1 ;
sample2 s2 ;
}
Here, class sample1 is referred using the scope resolution operator. On the other hand we can
directly refer to class sample2 because of the statement using namespace name2 ; the using
keyword declares all the names in the namespace to be in the current scope. So we can use
the names without any qualifiers.
8. While overloading a binary operator can we provide default values?
Ans: No!. This is because even if we provide the default arguments to the parameters of the
overloaded operator function we would end up using the binary operator incorrectly. This is
explained in the following example:
sample operator + ( sample a, sample b = sample (2, 3.5f ) )
{
}
void main( )
{

sample s1, s2, s3 ;


s3 = s1 + ; // error
}
9. How do I carry out conversion of one object of user-defined type to another?
Ans: To perform conversion from one user-defined type to another we need to provide
conversion function. Following program demonstrates how to provide such conversion
function.
class circle
{
private :
int radius ;
public:
circle ( int r = 0 )
{
radius = r ;
}
};
class rectangle
{
private :
int length, breadth ;
public :
rectangle( int l, int b )
{
length = l ;
breadth = b ;
}
operator circle( )
{
return circle ( length ) ;
}
};
void main( )
{
rectangle r ( 20, 10 ) ;
circle c;
c=r;
}
Here, when the statement c = r ; is executed the compiler searches for an overloaded
assignment operator in the class circle which accepts the object of type rectangle. Since there
is no such overloaded assignment operator, the conversion operator function that converts the
rectangle object to the circle object is searched in the rectangle class. We have provided such
a conversion function in the rectangle class. This conversion operator function returns a circle
object. By default conversion operators have the name and return type same as the object
type to which it converts to. Here the type of the object is circle and hence the name of the
operator function as well as the return type is circle.
10. How do I write code that allows to create only one instance of a class?
Ans: This is shown in following code snippet.
#include
class sample
{
static sample *ptr ;
private:
sample( )
{

}
public:
static sample* create( )
{
if ( ptr == NULL )
ptr = new sample ;
return ptr ;
}
};
sample *sample::ptr = NULL ;
void main( )
{
sample *a = sample::create( ) ;
sample *b = sample::create( ) ;
}
Here, the class sample contains a static data member ptr, which is a pointer
to the object of same class. The constructor is private which avoids us from creating objects
outside the class. A static member function called create( ) is used to create an object of the
class. In this function the condition is checked whether or not ptr is NULL, if it is then an
object is created dynamically and its address collected in ptr is returned. If ptr is not NULL,
then the same address is returned. Thus, in main( ) on execution of the first statement one
object of sample gets created whereas on execution of second statement, b holds the address
of the first object. Thus, whatever number of times you call create( ) function, only one object
of sample class will be available.
11. How do I write code to add functions, which would work as get and put properties of a
class?
Ans: This is shown in following code.
#include
class sample
{
int data ;
public:
__declspec ( property ( put = fun1, get = fun2 ) )
int x ;
void fun1 ( int i )
{
if ( i < 0 )
data = 0 ;
else
data = i ;
}
int fun2( )
{
return data ;
}
};
void main( )
{
sample a ;
a.x = -99 ;
cout << a.x ;
}
Here, the function fun1( ) of class sample is used to set the given integer value into data,
whereas fun2( ) returns the current value of data. To set these functions as properties of a
class we have given the statement as shown below:
__declspec ( property ( put = fun1, get = fun2 )) int x ;

As a result, the statement a.x = -99 ; would cause fun1( ) to get called to set the value in
data. On the other hand, the last statement would cause fun2( ) to get called to return the
value of data.
12. How do I write code to make an object work like a 2-D array?
Ans: Take a look at the following program.
#include
class emp
{
public :
int a[3][3] ;
emp( )
{
int c = 1 ;
for ( int i = 0 ; i <= 2 ; i++ )
{
for ( int j = 0 ; j <= 2 ; j++ )
{
a[i][j] = c ;
c++ ;
}
}
}
int* operator[] ( int i )
{
return a[i] ;
}
};
void main( )
{
emp e ;
cout << e[0][1] ;
}
The class emp has an overloaded operator [ ] function. It takes one argument an integer
representing an array index and returns an int pointer. The statement cout << e[0][1] ; would
get converted into a call to the overloaded [ ] function as e.operator[ ] ( 0 ). 0 would get
collected in i. The function would return a[i] that represents the base address of the zeroeth
row. Next the statement would get expanded as base address of zeroeth row[1] that can be
further expanded as *( base address + 1 ). This gives us a value in zeroth row and first
column.
13. What are formatting flags in ios class?
Ans: The ios class contains formatting flags that help users to format the stream data.
Formatting flags are a set of enum definitions. There are two types of formatting flags:
On/Off flags
Flags that work in-group
The On/Off flags are turned on using the setf( ) function and are turned off using the unsetf( )
function. To set the On/Off flags, the one argument setf( ) function is used. The flags working
in groups are set through the two-argument setf( ) function. For example, to left justify a
string we can set the flag as,
cout.setf ( ios::left ) ;
cout << "KICIT Nagpur" ;
To remove the left justification for subsequent output we can say,
cout.unsetf ( ios::left ) ;
The flags that can be set/unset include skipws, showbase, showpoint,
uppercase, showpos, unitbuf and stdio. The flags that work in a group can have only one of
these flags set at a time.

14. What is the purpose of ios::basefield in the following statement?


cout.setf ( ios::hex, ios::basefield ) ;
Ans: This is an example of formatting flags that work in a group. There is a flag for each
numbering system (base) like decimal, octal and hexadecimal. Collectively, these flags are
referred to as basefield and are specified by ios::basefield flag. We can have only one of these
flags on at a time. If we set the hex flag as setf ( ios::hex ) then we will set the hex bit but we
won't clear the dec bit resulting in undefined behavior. The solution is to call setf( ) as setf
( ios::hex, ios::basefield ). This call first clears all the bits and then sets the hex bit.
15. Can we get the value of ios format flags?
Ans: Yes! The ios::flags( ) member function gives the value format flags. This function takes
no arguments and returns a long ( typedefed to fmtflags) that contains the current format
flags.
16. Is there any function that can skip certain number of characters present in the input
stream?
Ans: Yes! This can be done using cin::ignore( ) function. The prototype of this function is as
shown below:
istream& ignore ( int n = 1, int d =EOF ) ;
Sometimes it happens that some extra characters are left in the input stream while taking the
input such as, the ?\n? (Enter) character. This extra character is then passed to the next input
and may pose problem.
To get rid of such extra characters the cin::ignore( ) function is used. This is equivalent to
fflush ( stdin ) used in C language. This function ignores the first n characters (if present) in
the input stream, stops if delimiter d is encountered.
17. Write a program that implements a date class containing day, month and year as data
members. Implement assignment operator and copy constructor in this class.
Ans: This is shown in following program:
#include
class date
{
private :
int day ;
int month ;
int year ;
public :
date ( int d = 0, int m = 0, int y = 0 )
{
day = d ;
month = m ;
year = y ;
}
// copy constructor
date ( date &d )
{
day = d.day ;
month = d.month ;
year = d.year ;
}
// an overloaded assignment operator
date operator = ( date d )
{
day = d.day ;
month = d.month ;
year = d.year ;
return d ;

}
void display( )
{
cout << day << "/" << month << "/" << year ;
}
};
void main( )
{
date d1 ( 25, 9, 1979 ) ;
date d2 = d1 ;
date d3 ;
d3 = d2 ;
d3.display( ) ;
}
18. When should I use unitbuf flag?
Ans: The unit buffering (unitbuf) flag should be turned on when we want to ensure that each
character is output as soon as it is inserted into an output stream. The same can be done
using unbuffered output but unit buffering provides a better performance than the unbuffered
output.
19.What are manipulators?
Ans: Manipulators are the instructions to the output stream to modify the output in various
ways. The manipulators provide a clean and easy way for formatted output in comparison to
the formatting flags of the ios class. When manipulators are used, the formatting instructions
are inserted directly into the stream. Manipulators are of two types, those that take an
argument and those that don?t.
20. What is the difference between the manipulator and setf( ) function?
Ans: The difference between the manipulator and setf( ) function are as follows:
The setf( ) function is used to set the flags of the ios but manipulators directly insert the
formatting instructions into the stream. We can create user-defined manipulators but setf( )
function uses data members of ios class only. The flags put on through the setf( ) function can
be put off through unsetf( ) function. Such flexibility is not available with manipulators.
21. How do I get the current position of the file pointer?
Ans: We can get the current position of the file pointer by using the tellp( ) member function
of ostream class or tellg( ) member function of istream class. These functions return (in bytes)
positions of put pointer and get pointer respectively.
22. What are put and get pointers?
Ans: These are the long integers associated with the streams. The value present in the put
pointer specifies the byte number in the file from where next write would take place in the file.
The get pointer specifies the byte number in the file from where the next reading should take
place.
23. What do the nocreate and noreplace flag ensure when they are used for opening a file?
Ans: nocreate and noreplace are file-opening modes. A bit in the ios class defines these
modes. The flag nocreate ensures that the file must exist before opening it. On the other hand
the flag noreplace ensures that while opening a file for output it does not get overwritten with
new one unless ate or app is set. When the app flag is set then whatever we write gets
appended to the existing file. When ate flag is set we can start reading or writing at the end of
existing file.

24. What is the limitation of cin while taking input for character array?
Ans: To understand this consider following statements,
char str[5] ;
cin >> str ;
While entering the value for str if we enter more than 5 characters then there is no provision
in cin to check the array bounds. If the array overflows, it may be dangerous. This can be
avoided by using get( ) function. For example, consider following statement,
cin.get ( str, 5 ) ;
On executing this statement if we enter more than 5 characters, then get( ) takes only first
five characters and ignores rest of the characters. Some more variations of get( ) are
available, such as shown below:
get ( ch ) ? Extracts one character only
get ( str, n ) ? Extracts up to n characters into str
get ( str, DELIM ) ? Extracts characters into array str until specified delimiter (such as
'\n'). Leaves delimiting character in stream.
get ( str, n, DELIM ) ? Extracts characters into array str until n characters or DELIM
character, leaving delimiting character in stream.
25. What is the purpose of istream class?
Ans: The istream class performs activities specific to input. It is derived from the ios class. The
most commonly used member function of this class is the overloaded >> operator which can
extract values of all basic types. We can extract even a string using this operator.
26. Would the following code work?
#include
void main( )
{
ostream o ;
o << "Dream. Then make it happen!" ;
}
Ans: No! This is because we cannot create an object of the ostream class since its constructor
and copy constructor are declared private.
27. Can we use this pointer inside static member function?
Ans: No! The this pointer cannot be used inside a static member function. This is because a
static member function is never called through an object.
28. What is strstream?
Ans: strstream is a type of input/output stream that works with the memory. It allows using
section of the memory as a stream object. These streams provide the classes that can be used
for storing the stream of bytes into memory. For example, we can store integers, floats and
strings as a stream of bytes. There are several classes that implement this in-memory
formatting. The class ostrstream derived from ostream is used when output is to be sent to
memory, the class istrstream derived from istream is used when input is taken from memory
and strstream class derived from iostream is used for memory objects that do both input and
output. Ans: When we want to retrieve the streams of bytes from memory we can use
istrestream. The following example shows the use of istrstream class.
#include
void main( )
{
int age ;
float salary ;
char name[50] ;
char str[] = "22 12004.50 K. Vishwanatth" ;
istrstream s ( str ) ;
s >> age >> salary >> name ;
cout << age << endl << salary << endl << name ;
cout << endl << s.rdbuf( ) ;

}
Here, s is the object of the class istrstream. When we are creating the object s, the
constructor of istrstream gets called that receives a pointer to the zero terminated character
array str. The statement s >> age >> salary >> name ; extracts the age, salary and the
name from the istrstream object s. However, while extracting the name, only the first word of
name gets extracted. The balance is extracted using rdbuf( ).
29. When the constructor of a base class calls a virtual function, why doesn't the override
function of the derived class gets called?
Ans: While building an object of a derived class first the constructor of the base class and then
the constructor of the derived class gets called. The object is said an immature object at the
stage when the constructor of base class is called. This object will be called a matured object
after the execution of the constructor of the derived class. Thus, if we call a virtual function
when an object is still immature, obviously, the virtual function of the base class would get
called. This is illustrated in the following example.
#include
class base
{
protected :
int i ;
public :
base ( int ii = 0 )
{
i = ii ;
show( ) ;
}
virtual void show( )
{
cout << "base's show( )" << endl ;
}
};
class derived : public base
{
private :
int j ;
public :
derived ( int ii, int jj = 0 ) : base ( ii )
{
j = jj ;
show( ) ;
}
void show( )
{
cout << "derived's show( )" << endl ;
}
};
void main( )
{
derived dobj ( 20, 5 ) ;
}
The output of this program would be:
base's show( )
derived's show( )
30. Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Ans: Yes, we can have a reference as a data member of a class. A reference as a data
member of a class is initialized in the initialization list of the constructor. This is shown in

following program.
#include
class sample
{
private :
int& i ;
public :
sample ( int& ii ) : i ( ii )
{
}
void show( )
{
cout << i << endl ;
}
};
void main( )
{
int j = 10 ;
sample s ( j ) ;
s.show( ) ;
}
Here, i refers to a variable j allocated on the stack. A point to note here is that we cannot bind
a reference to an object passed to the constructor as a value. If we do so, then the reference i
would refer to the function parameter (i.e. parameter ii in the constructor), which would
disappear as soon as the function returns, thereby creating a situation of dangling reference.
31. Why does the following code fail?
#include
class sample
{
private :
char *str ;
public :
sample ( char *s )
{
strcpy ( str, s ) ;
}
~sample( )
{
delete str ;
}
};
void main( )
{
sample s1 ( "abc" ) ;
}
Ans: Here, through the destructor we are trying to deal locate memory, which has been
allocated statically. To remove an exception, add following statement to the constructor.
sample ( char *s )
{
str = new char[strlen(s) + 1] ;
strcpy ( str, s ) ;
}
Here, first we have allocated memory of required size, which then would get deal located
through the destructor.
32. assert( ) macro...
We can use a macro called assert( ) to test for conditions that should not occur in a code. This

macro expands to an if statement. If test evaluates to 0, assert prints an error message and
calls abort to abort the program.
#include
#include
void main( )
{
int i ;
cout << "\nEnter an integer: " ;
cin >> i ;
assert ( i >= 0 ) ;
cout << i << endl ;
}
33. Why it is unsafe to deal locate the memory using free( ) if it has been
allocated using new?
Ans: This can be explained with the following example:
#include
class sample
{
int *p ;
public :
sample( )
{
p = new int ;
}
~sample( )
{
delete p ;
}
};
void main( )
{
sample *s1 = new sample ;
free ( s1 ) ;
sample *s2 = ( sample * ) malloc ( sizeof ( sample ) ) ;
delete s2 ;
}
The new operator allocates memory and calls the constructor. In the constructor we have
allocated memory on heap, which is pointed to by p. If we release the object using the free( )
function the object would die but the memory allocated in the constructor would leak. This is
because free( ) being a C library function does not call the destructor where we have deal
located the memory.
As against this, if we allocate memory by calling malloc( ) the constructor would not get
called. Hence p holds a garbage address. Now if the memory is deal located using delete, the
destructor would get called where we have tried to release the memory pointed to by p. Since
p contains garbage this may result in a runtime error.
34. Can we distribute function templates and class templates in object libraries?
Ans: No! We can compile a function template or a class template into object code (.obj file).
The code that contains a call to the function template or the code that creates an object from
a class template can get compiled. This is because the compiler merely checks whether the
call matches the declaration (in case of function template) and whether the object definition
matches class declaration (in case of class template). Since the function template and the
class template definitions are not found, the compiler leaves it to the linker to restore this.
However, during linking, linker doesn't find the matching definitions for the function call or a
matching definition for object creation. In short the expanded versions of templates are not
found in the object library. Hence the linker reports error.

35. What is the difference between an inspector and a mutator ?


Ans: An inspector is a member function that returns information about an object's state
(information stored in object's data members) without changing the object's state. A mutator
is a member function that changes the state of an object. In the class Stack given below we
have defined a mutator and an inspector.
class Stack
{
public :
int pop( ) ;
int getcount( ) ;
}
In the above example, the function pop( ) removes top element of stack thereby changing the
state of an object. So, the function pop( ) is a mutator. The function getcount( ) is an
inspector because it simply counts the number of elements in the stack without changing the
stack.
36. Namespaces:
The C++ language provides a single global namespace. This can cause problems with global
name clashes. For instance, consider these two C++ header files:
// file1.h
float f ( float, int ) ;
class sample { ... } ;
// file2.h
class sample { ... } ;
With these definitions, it is impossible to use both header files in a single program; the sample
classes will clash. A namespace is a declarative region that attaches an additional identifier to
any names declared inside it. The additional identifier thus avoids the possibility that a name
will conflict with names declared elsewhere in the program. It is possible to use the same
name in separate namespaces without conflict even if the names appear in the same
translation unit. As long as they appear in separate namespaces, each name will be unique
because of the addition of the namespace identifier. For example:
// file1.h
namespace file1
{
float f ( float, int ) ;
class sample { ... } ;
}
// file2.h
namespace file2
{
class sample { ... } ;
}
Now the class names will not clash because they become file1::sample and file2::sample,
respectively.
37. What would be the output of the following program?
#include
class user
{
int i ;
float f ;
char c ;
public :
void displaydata( )
{
cout << endl << i << endl << f << endl << c ;
}

};
void main( )
{
cout << sizeof ( user ) ;
user u1 ;
cout << endl << sizeof ( u1 ) ;
u1.displaydata( ) ;
}
Ans: The output of this program would be,
9 or 7
9 or 7
Garbage
Garbage
Garbage
Since the user class contains three elements, int, float and char its size would be 9 bytes (int4, float-4, char-1) under Windows and 7 bytes (int-2, float-4, char-1) under DOS. Second
output is again the same because u1 is an object of the class user. Finally three garbage
values are printed out because i, f and c are not initialized anywhere in the program.
Note that if you run this program you may not get the answer shown here. This is because
packing is done for an object in memory to increase the access efficiency. For example, under
DOS, the object would be aligned on a 2-byte boundary. As a result, the size of the object
would be reported as 6 bytes. Unlike this, Windows being a 32-bit OS the object would be
aligned on a 4-byte boundary. Hence the size of the object would be reported as 12 bytes. To
force the alignment on a 1-byte boundary, write the following statement before the class
declaration.
#pragma pack ( 1 )
38. Write a program that will convert an integer pointer to an integer and vice-versa.
Ans: The following program demonstrates this.
#include
void main( )
{
int i = 65000 ;
int *iptr = reinterpret_cast ( i ) ;
cout << endl << iptr ;
iptr++ ;
cout << endl << iptr ;
i = reinterpret_cast ( iptr ) ;
cout << endl << i ;
i++ ;
cout << endl << i ;
}
39. What is a const_cast?
Ans. The const_cast is used to convert a const to a non-const. This is shown in the following
program:
#include
void main( )
{
const int a = 0 ;
int *ptr = ( int * ) &a ; //one way
ptr = const_cast_ ( &a ) ; //better way
}
Here, the address of the const variable a is assigned to the pointer to a non-const variable.
The const_cast is also used when we want to change the data members of a class inside the
const member functions. The following code snippet shows this:
class sample

{
private:
int data;
public:
void func( ) const
{
(const_cast (this))->data = 70 ;
}
};
40. What is forward referencing and when should it be used?
Ans: Forward referencing is generally required when we make a class or a function as a friend.
Consider following program:
class test
{
public:
friend void fun ( sample, test ) ;
};
class sample
{
public:
friend void fun ( sample, test ) ;
};
void fun ( sample s, test t )
{
// code
}
void main( )
{
sample s ;
test t ;
fun ( s, t ) ;
}
On compiling this program it gives error on the following statement of test class. It gives an
error that sample is undeclared identifier. friend void fun ( sample, test );
This is so because the class sample is defined below the class test and we are using it before
its definition. To overcome this error we need to give forward reference of the class sample
before the definition of class test. The following statement is the forward reference of class
sample.
class sample ;
41. How would you give an alternate name to a namespace?
Ans: An alternate name given to namespace is called a namespace-alias. namespace-alias is
generally used to save the typing effort when the names of namespaces are very long or
complex. The following syntax is used to give an alias to a namespace.
namespace myname = my_old_very_long_name ;
42. Using a smart pointer can we iterate through a container?
Ans: Yes. A container is a collection of elements or objects. It helps to properly organize and
store the data. Stacks, linked lists, arrays are examples of containers. Following program
shows how to iterate through a container using a smart pointer.
#include
class smartpointer
{
private :
int *p ; // ordinary pointer
public :
smartpointer ( int n )

{
p = new int [ n ] ;
int *t = p ;
for ( int i = 0 ; i <= 9 ; i++ )
*t++ = i * i ;
}
int* operator ++ ( int )
{
return p++ ;
}
int operator * ( )
{
return *p ;
}
};
void main( )
{
smartpointer sp ( 10 ) ;
for ( int i = 0 ; i <= 9 ; i++ )
cout << *sp++ << endl ;
}
Here, sp is a smart pointer. When we say *sp, the operator * ( ) function gets called. It
returns the integer being pointed to by p. When we say sp++ the operator ++ ( ) function
gets called. It increments p to point to The next element in the array and then returns the
address of this new location.
43. Can objects read and write themselves?
Ans: Yes! This can be explained with the help of following example:
#include
#include
class employee
{
private :
char name [ 20 ] ;
int age ;
float salary ;
public :
void getdata( )
{
cout << "Enter name, age and salary of employee : " ;
cin >> name >> age >> salary ;
}
void store( )
{
ofstream file ;
file.open ( "EMPLOYEE.DAT", ios::app | ios::binary ) ;
file.write ( ( char * ) this, sizeof ( *this ) ) ;
file.close( ) ;
}
void retrieve ( int n )
{
ifstream file ;
file.open ( "EMPLOYEE.DAT", ios:

1]. The following variable is available in file1.c


static int average_float;

all the functions in the file1.c can access the variable


[2]. extern int x;
Check the answer
[3]. Another Problem with
# define TRUE 0
some code
while(TRUE)
{
some code
}
This won't go into the loop as TRUE is defined as 0
[4]. A question in structures where the memebers are dd,mm,yy.
mm:dd:yy
09:07:97
[5]. Another structure question
1 Rajiv System Analyst
[6]. INFILE.DAT is copied to OUTFILE.DAT
[7]. A question with argc and argv .
Input will be
main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
---------------------------------------------------------------------int x;
main()
{
int x=0;
{
int x=10;
x++;
change_value(x);
x++;
Modify_value();
printf("First output: %d\n",x);
}
x++;
change_value(x);
printf("Second Output : %d\n",x);
Modify_value();
printf("Third Output : %d\n",x);
}
Modify_value()
{
return (x+=10);
}

change_value()
{
return(x+=1);
}
---------------------------------------------------------------------------main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
----------------------------------------------------------------------main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s\n",p2);
}
---------------------------------------------------------------------main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
-------------------------------------------------------------------#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
---------------------------------------------------------------------main()
{
char *ptr = "Ramco Systems";
(*ptr)++;

printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
--------------------------------------------------------------------#include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
----------------------------------------------------------------#include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Enter Your Commentsmostly triad is only for mech guys only

TRIAD PAPER
C - language:
1. write a program to calculate ncr
2. write a program to exchange the values of two variables
using
pointers
3. write program to open one file input some numbers and find
smallest,largest, avg. and store them in another file.
4. write a structure node using linked list
5. write a program to reverse a string
co-ordinate geometry
1. find the perpendicular distance from a point P(a,b) to a
line lx+my+n=0;
2. y=x^3+2x^2+5x+2 find the slope of this eqn when x=12;

( Hint :find dy/dx and substitute x=12)


3. circle is x^2+y^2=a^2 . if the centre is shifted to (25,16)
what
is the eqn of new cirlce.
4. pt rotation P(x,y) about origin in anticlockwise direction
by an
angle theta. find new coordinates.
before this there will be some question on puzzles(gre
barrons).
prepare co-ordinate geometry and fundamental of c.

regarding interview :
1.they will ask whether u r interseted to go
aborad,
ans:say no, not interested.
2. tell some project works that r done and or
going
to
be do in c , c++,
3. personal interview.
4. be perfect in c, they r asking that how u done
this
in test paper.
5.they ask u do be agree to the company bond. bond
is
for 3 years , breaking is at cost of 50,000.

apptitude ;
some puzzles r given around 9, study well it is
easy,
for it they provide 20 min00110

Elico Questions
*16 ppl can do a work in 3 hrs?, how much time vil 5 ppl take?
* 185 miles. travelled in bus for 2 hrs a dist of 85. in how much time, he need to travel the
ramaining 100 miles, if he need to get an average of 50 miles per hr.
*efface=? : similer word

* a 6 mtrs wide road is laid around a garden. rad area is 564sq mtsr. if the length of the
garden is 20 mtrs?, wat is the width of it.
*Woman said pointing to a guy " his mother is the only daughter of my mother"
* a 2 digit no, the diff of its digits is one twelth of it. Find sum of the 2 digits
-data insufficient
-6
-8
-10
-none
Cpp
* #include
main()
{
int x=20, t;
&t=x;
x=50;
cout<<x<<" "<<t;
}
o/p?
50 20
t
----*include<iostream.h>
int sum(int a, int b=5, int c=10);
main()
{
cout<<sum(5)<<endl<<sum(10,5)<<endl<<sum(5,10,10);
}
int sum(int a, int b, int c)
{ return a+b+c;}
ans?
20 25 25
-----* #include
main()
{
int x=20, &t;
&t=x;
int &tt;
cout<<x<<" "<<t;
}
o/p?
compile time error, as all references must b initialisded.
------

what vil deleter operator vill do?


- invoke delete operator, n then destructor
- search if any destructor, n then invoke delete operasor
.....
------What vil new operator vil do?
-invoke comnstructor, then new operator, then do typecasting
-invoke new operator and then constructor
-invoke constructor n do typecast
....
-----which is violating data encapsulation?
-friend
-public
-private
-protected
-virtual
------Friend fns are useful but r controversy bcoz,
-they violate data encapsulation
-they access private fdata of a class
-both
-none of the above
------which of the following is true?
//there are 4/5 q's in these format.
-a const member can't b changed
...........
------which of the following is false? in case of destructors, constructors
............
------what key word is used to off overload.
- extern "C"
-register "C"
-static "C"
-off "C"
-----A,B,C,D,E,F are 6 members, facing the center of a circle.
A is btn B , E
C btn D, f
E is immediate right to D
q's on it
Sample Question Paper
1.

Which of the following best explains life cycle of Defect ?


a) Defect Found -> Defect Logged -> Defect Debugged -> Defect Closed -> Defect
Rechecked

b) Defect Found -> Defect Debugged -> Defect Reported -> Defect Rechecked ->
DefectClosed
c) Defect Debugged -> Defect Found -> Defect Closed -> Defect Reported ->
DefectRechecked
d) Defect Found -> Defect Logged -> Defect Debugged -> Defect Rechecked ->
Defect Closed
2.

Which group does Winrunner ,Load Runner ,SQA Suite fall under ?
a) Databases
b) Automated Test Tools
c) Operating Systems

3.

d) Rapid Application Development Tool


i = 0;
j = 0;
for(j=1;j<10;j++)
i=i+1;
In the (generic) code segment above what will be the value of the variable i at
completion ?
a) 0
b) 1
c) 3

4.

d) 9
Which of the following statements is true when a derivation inherits both a virtual and
non-virtual instance of a base class ?
a) Each derived class object has base objects only from the non virtual instance
b) Each base class object has derived objects only from the non-virtual instance
c) Each derived class object has base objects only from the virtual instance

5.

d) Each derived class object has a base object from the virtual instance and a base
object from non-virtual instance.
class Word
{
public:
Word(const char*,int = 0);
};
Referring to the sample code above what is the minimum number of arguments
required to call the constructor ?

a) 0
b) 1
c) 2
6.

d) 3
Which one of the following represents a correct and safe declaration of NULL ?
a) typedef((void *)0) NULL;
b) typedef NULL(char *)0;
c) #define NULL((void *)0)

7.

d) #define NULL((char*)0)
#include <iostraem>

Referring to the sample code above ,which of the following could you use to make the
standars I/O Stream classes accessible without requiring the scope resolution operator
?
a) using namespace std::iostream
b) using namespace std;
c) using namespace iostream ;
8.

d) using iostream;
Which one of the following statements allocates enough space to hold an array of 10
integers that are initialized to 0 ?
a) int *ptr = (int *) calloc(10,sizeof(int));
b) int *ptr = (int *) alloc( 10*sizeof(int));
c) int *ptr = (int *) malloc( 10*sizeof(int));

9.

d) int *ptr = (int *)calloc(10*sizeof(int));


What function will read a specified number of elements from a file ?
a) fread()
b) readfile()
c) fileread()

d) gets()
10. What is the largest value an integer can hold in a Standard C compiler ?
a) 32767
b) 65536
c) 2147483647
d) INT_MAX

11. With every use of memory allocation function should be used to release allocated
memory which is no longer needed ?
a) dropmem()
b) dealloc()
c) release()
d) free()
12. int a=1;
int ab=4;
int main()
{
int b=3,a=2;
printf("%i*/%i*/%*/i",a,b,ab);
}
13. kernal execute the first process when system is start--ans :- init();
14. process id of kernal
(a) 1
(b) 0
(c) 2
(d) none
15. Which one of the following represents a correct and safe declaration of NULL ?
a) typedef((void *)0) NULL;
b) typedef NULL(char *)0;
c) #define NULL((void *)0)
d) #define NULL((char*)0)
16. Which one of the following statements allocates enough space to hold an array of 10
integers that are initialized to 0 ?
a) int *ptr = (int *) calloc(10,sizeof(int));
b) int *ptr = (int *) alloc( 10*sizeof(int));
c) int *ptr = (int *) malloc( 10*sizeof(int));
d) int *ptr = (int *)calloc(10*sizeof(int));.
After written ,group discussion and interview will be there
Topics for group discussion:

1.
2.
3.
4.
5.

Is IT sector made a difference to rural India.


Does the world need army?
are there stars in the sky?
capital punishment should be avoided .
Is India really shining ?

Ramco
Directions: Each of the following question has a question and two statements labelled as (i)
and (ii). Use the data/information given in (i) and (ii) to decide whether the data are sufficient
to answer the question record your answer as

A) If you can get the answer from (1)alone but not from (2)
B) If you can get the answer from (2)alone but not from (1)
C) If can get the answer from (1)and (2)together ,although neither statement by
itself suffice
D) If statement (1)alone suffices and statement (2) alone also suffice.
E) If can't get the answer from statements (1) and (2) together and you need more
data.
1.

What will be the population of city X in 1991?


1) Population of the city has 55% annual growth rate
2) in 1991,the population of city X was 8 million
Ans:C

2.

Was it Rani's birthday yesterday?


1)Lata spends Rs.100 on Rani's birthday
2)Lata spent Rs.100 yesterdayAns: E

3.

Is 3*5 or is 4*6 greater ?


1) a*b =b*a
2) a*b is the remainder of ab%(a+b)
Ans:B

4.

Will the graph X-Y pass through the origin?


1) x proportional to the Y
2)increment in y per units rise of x is fixed.
Ans:E

5.

What was the value of the machine 2 years ago?

1) the deprecition of the value of the machine per year is 10%


2)present value of the machine is rs 8000/
Ans:C
6.

What will be the area of a square that can be inscribed in a circle?


1) Radius of the circle is T
2) Length of a diagonal of the square is 2r
Ans:D

7.

There are two figures viz., a circle and a square. Which having greater area?
1) Perimeter of the circle is the same as the perimeter of the square.
2) Eleven times the radius is equal to seven times the length of one side of the square.
Ans: D

8.

A candidate who was found to be under weightin medical test had been selected
provisionally subject to his attainment of 60Kg weight within one year. What should be
the percentage increase of his weightso that selection is confirmed after one year.
1) Weight (Kg)=16+8 Height (ft) is standard equation for the Indian population. The
candidates height is 5.5
2) His present weight is 55Kg.
Ans: D

9.

Is angle =90
1) sin**2()+cos**2()=1
2) sin**2()-+cos**2()=1
Ans: E

10. What will be the average age of workers of an Institution after two years?
1) Present average age is 35 years
2) There are total 20 workers in the Institution
Ans: A
11. Is AB>AM ( A Triangle is given )
1) AB<AC
2) M is any point other than B and C on BC
Ans: E
12. Is X^2+Y^2<X+Y?
1) 0<X<1

2) 0<Y<1 and X!=Y (X not equal to Y)


Ans: C
13. Can it be concluded that angle ABO = angle ODC
1) ABCD is a Parallelogram and O is the point of intersection of the diagonals.
2) Angle DOC =75deg. and angle DAO =35deg.
Ans: A
14. What is the value of x+y?
1) 2y=x+6
2) 5x=10y-30
Ans: E

15. How many students are there in the class?


1) 30 students play foot ball and 40 play cricket .
2)Each student plays either foot ball or cricket or both.
Ans: E
16. What is the value of a:b?
1) a=x+10%ofx
2) b=a+10%ofa
Ans: B
17. What is the maximum value of the expression 5+8x-8x^2?
1) x is real
2) x is not positive
Ans: C
18. What will be the value of the greatest angle of the triangle ABC?
1) Angles of the triangle are in the ration 2:5:3
2) The side opposite to the greatest angle is the longest side.
Ans: A
19. What is the range of values of x?
1)( x-2 ) / ( 2x + 5 ) < 1/3
2)2x /3 + 17/3 > 3x - 20
Ans: D

20. Of the two which one is the greater -- -3/x , -3/y?


1)

x,y>0 <![endif]>

Technical Questions
21. Find the output for the following C program

main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s\n",p2);
}
Ans. An empty string
22. Find the output for the following C program
main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
Ans. 57 94
23. Find the output for the following C program
main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
Ans. 5 20 1
24. Find the output for the following C program
#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);

swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}

Ans. 10 5
25. Find the output for the following C program
main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Ans. Samco Systems
26. Find the output for the following C program
#include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}

Ans. Compilation error giving it cannot be an modifiable 'lvalue'


27. Find the output for the following C program
#include<stdio.h>
main()

{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Ans. RamcoSystems
28. Find the output for the following C program given that
[1]. The following variable is available in file1.c
static int average_float;
Ans. All the functions in the file1.c can access the variable
29. Find the output for the following C program

# define TRUE 0
some code
while(TRUE)
{
some code
}
Ans. This won't go into the loop as TRUE is defined as 0
30. Find the output for the following C program
main()
{
int x=10;
x++;
change_value(x);
x++;
Modify_value();
printf("First output: %d\n",x);
}
x++;

change_value(x);
printf("Second Output : %d\n",x);
Modify_value(x);
printf("Third Output : %d\n",x);
}
Modify_value()
{
return (x+=10);
}
change_value()
{
return(x+=1);
}
Ans. 12 1 1
31. Find the output for the following C program

main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}
Ans. 11 16
32. Find the output for the following C programmain()
{
int a=0;
if(a=0) printf("Ramco Systems\n");
printf("Ramco Systems\n");
}
Ans. Ony one time "Ramco Systems" will be printed
33. Find the output for the following C program
#include<stdio.h>
int SumElement(int *,int);
void main(void)
{
int x[10];

int i=10;
for(;i;)
{
i--;
*(x+i)=i;
}
printf("%d",SumElement(x,10));
}
int SumElement(int array[],int size)
{
int i=0;
float sum=0;
for(;i<size;i++)
sum+=array[i];
return sum;
}
34. Find the output for the following C program
#include<stdio.h>
void main(void);
int printf(const char*,...);
void main(void)
{
int i=100,j=10,k=20;
-- int sum;
float ave;
char myformat[]="ave=%.2f";
sum=i+j+k;
ave=sum/3.0;
printf(myformat,ave);
}
35. Find the output for the following C program
#include<stdio.h>
void main(void);
{
int a[10];
printf("%d",((a+9) + (a+1)));
}

36. Find the output for the following C program


#include<stdio.h>
void main(void)
{
struct s{
int x;
float y;
}s1={25,45.00};
union u{
int x;
float y;
} u1;
u1=(union u)s1;
printf("%d and %f",u1.x,u1.y);
}
37. Find the output for the following C program
#include<stdio.h>
void main(void)
{
unsigned int c;
unsigned x=0x3;
scanf("%u",&c);
switch(c&x)
{
case 3: printf("Hello!\t");
case 2: printf("Welcome\t");
case 1: printf("To All\t");
default:printf("\n");
}
}
38. Find the output for the following C program
#include<stdio.h>
int fn(void);
void print(int,int(*)());
int i=10;
void main(void)
{
int i=20;

print(i,fn);
}
void print(int i,int (*fn1)())
{
printf("%d\n",(*fn1)());
}
int fn(void)
{
return(i-=5);
}
39. Find the output for the following C program
#include<stdio.h>
void main(void);
{
char numbers[5][6]={"Zero","One","Two","Three","Four"};
printf("%s is %c",&numbers[4][0],numbers[0][0]);
}
40. Find the output for the following C program
int bags[5]={20,5,20,3,20};
void main(void)
{
int pos=5,*next();
*next()=pos;
printf("%d %d %d",pos,*next(),bags[0]);
}
int *next()
{
int i;
for(i=0;i<5;i++)
if (bags[i]==20)
return(bags+i);
printf("Error!");
exit(0);
}
41. Find the output for the following C program
#include<stdio.h>
void main(void)

{
int y,z;
int x=y=z=10;
int f=x;
float ans=0.0;
f *=x*y;
ans=x/3.0+y/3;
printf("%d %.2f",f,ans);
}
42. Find the output for the following C program
#include<stdio.h>
void main(void);
{
double dbl=20.4530,d=4.5710,dblvar3;
double dbln(void);
dblvar3=dbln();
printf("%.2f\t%.2f\t%.2f\n",dbl,d,dblvar3);
}
double dbln(void)
{
double dblvar3;
dbl=dblvar3=4.5;
return(dbl+d+dblvar3);
}
43. Find the output for the following C program
#include<stdio.h>
static int i=5;
void main(void)
{
int sum=0;
do
{
sum+=(1/i);
}while(0<i--);
}
44. Find the output for the following C program
#include<stdio.h>

void main(void)
{
int oldvar=25,newvar=-25;
int swap(int,int);
swap(oldvar,newvar);
printf("Numbers are %d\t%d",newvar,oldvar);
}
int swap(int oldval,int newval)
{
int tempval=oldval;
oldval=newval;

newval=tempval;
}
45. Find the output for the following C program
#include<stdio.h>
void main(void);
{
int i=100,j=20;
i++=j;
i*=j;
printf("%d\t%d\n",i,j);
}
46. Find the output for the following C program
#include<stdio.h>
void main(void);
int newval(int);
void main(void)
{
int ia[]={12,24,45,0};
int i;
int sum=0;
for(i=0;ia[i];i++)
{
sum+=newval(ia[i]);
}
printf("Sum= %d",sum);
}

int newval(int x)
{
static int div=1;
return(x/div++);
}
47. Find the output for the following C program
#include<stdio.h>
void main(void);
{
int var1,var2,var3,minmax;
var1=5;
var2=5;
var3=6;
minmax=(var1>var2)?(var1>var3)?var1:var3:(var2>var3)?var2:var3;
printf("%d\n",minmax);
48. Find the output for the following C program
#include<stdio.h>
void main(void);
{
void pa(int *a,int n);
int arr[5]={5,4,3,2,1};
pa(arr,5);
}
void pa(int *a,int n)
{
int i;
for(i=0;i<n;i++)
printf("%d\n",*(a++)+i);
}
49. Find the output for the following C program
#include<stdio.h>
void main(void);
void print(void);
{
print();
}
void f1(void)

{
printf("\nf1():");
}
50. Find the output for the following C program
#include "6.c"
void print(void)
{
extern void f1(void);
f1();
}
static void f1(void)
{
printf("\n static f1().");
}
51. Find the output for the following C program
#include<stdio.h>
void main(void);
static int i=50;
int print(int i);
void main(void)
{
static int i=100;
while(print(i))
{
printf("%d\n",i);
i--;
}
}
int print(int x)
{
static int i=2;
return(i--);
}
52. Find the output for the following C program
#include<stdio.h>
void main(void);
typedef struct Ntype

{
int i;
char c;
long x;
} NewType;
void main(void)
{
NewType *c;
c=(NewType *)malloc(sizeof(NewType));
c->i=100;
c->c='C';
(*c).x=100L;
printf("(%d,%c,%4Ld)",c->i,c->c,c->x);
}
53. Find the output for the following C program
#include<stdio.h>
void main(void);
const int k=100;
void main(void)
{
int a[100];
int sum=0;
for(k=0;k<100;k++)
*(a+k)=k;
sum+=a[--k];
printf("%d",sum);
}

Sasken Exam 20th Jul 2004


Pattern : C(10 Qs) + Aptitude(10 Qs) + Discpline based[CS/EC](10 Qs)
Duration : 1 Hr
C questions
-----------1.Consider the following declaration:-

char const *p = 'd';


Which of the following is not a permissible operation
(a) *p++
(b) ++p
(c) (*p)++
(d) All
2.What is the output of the following code:void print_arr(float **p)
{
printf(" 0 %f 1 %f 2 %f\n",p[0][0],p[0][1],p[0][2]);
}
void main()
{
float arr[2][3] = {{0,1,2},{3,4,5}};
float **fl_arr;
fl_arr = (float *)arr;
print_arr(fl_arr);
fl_arr++;
print_arr(fl_arr);
}
(a)
(d)segmentation fault
3.What is the output of the following code:#define putchar (c) printf("%c",c)
void main()
{
char s='c';
putchar (s);
}
(a) c
(b) 99
(c) Compilation error
(d) Execution error
4.What is the output of the following code:void main()
{
printf("%d",printf("ABC\\"));
}
(a) ABC\\
(b) 1
(c) ABC\4
(d) ABC\3
5.What is the output of the following code:-

int compute(int n)
{
if(n>0)
{
n=compute(n-3)+compute(n-1);
return(n);
}
return(1);
}
void main()
{
printf("%d",compute(5));
}
(a) 6
(b) 9
(c) 12
(d) 13
6.What is the output of the following code:void main()
{
int i;
for(i=0;i<3;i++)
{
int i=100;
i--;
printf("%d..",i);
}
}
(a0..1..2..
(b)99..98..97..
(c)100..100..100..
(d)99..99..99..
7.What is the output of the following code:void main()
{
int a[]={9,4,1,7,5};
int *p;
p=&a[3];
printf("%d",p[-1]);
}
(a)6
(b)1
(c)7
(d)Error
8.What is the output of the following code:-

void main()
{
int a[]={10,20,30,40,50};
int *p;
p= (int*)((char *)a + sizeof(int));
printf("%d",*p);
}
(a)10
(b)20
(c)30
(d)40
9.Which code will run faster
for(i=0;i<100;i++)
for(j=0;j<10;j++)
a[i][j]=0;
OR
for(j=0;j<10;j++)
for(i=0;i<100;i++)
a[i][j]=0;
(a)First code
(b)Second code
(c)Same
(d)Compiler and hardware dependent
Aptitude
-------1.How many 2 digit numbers are there which have 8 as the unit number in it's square.
(a)3
(b)None
(c)2
(d)1
2. B is 8km East of A. C is 6km North of B. D is 12km East of C. E is 16km North of D. What is
the distance b/w A and E.
(a)20km
(b)22km
(c)18km
(d)30km
3. x+y = z
Then
(a)...
(b)y<Z
(c)...
4. 2<X<y<8
Then which is the greatest
(a) (x^2)y
(b) 5xy

(c) x(y^2)
(d) 5(x^2)y/12
5. A is taller than B, D is taller than D, D is shorter than E.Then which of the following is
correct.
(a) C is taller than E
(b) A is taller than C
(c) D is shorter than A
(d) B is shorter than C
6.A small passage was given and 4 options which summarizes it was given.The best was to be
chosen.
7.Another passage was given and 4 inference was given and correct was to be chosen.This
one is very easy.
8.Which of the following is a parellogram:(a)130,50,130,50(angle in deg)
(b)120,30,130,20
(c)90,90,90,90
(d)a & c
9. In the following series (an - 1)^2, 1 is the first term.Which are the next three
(a)1,3,4
(b)0,3,6
(c)0,1,2
(d)0,1,0

Computer science
---------------1.Deadlock occur when
(a)Some resources are held up by some process.
(b)...
(c)...
(d)None of these
2. A prefix expression can be equal to a postfix expression reversed only if
(a)It is left associative
(b)It is commutative
(c)It is right associative
3.How many lines will be printed in the following
Pascal pgm [I don't remember the Pascal version,so I am giving C version]
void print(int n)
{
if(n>0)
{
print(n-1);
printf("%d",n);//println(n) in Pascal version.
print(n-1);
}

}
(a)3
(b)7
(c)15
(d)31
4.Maximum number of nodes in a tree with n levels.
(a)2^(n-1)
(b)(2^n)-1
(c)2^(n-1) - 1
5.Complete graphwith n nodes have
(a)n-1 edges
(b)n(n-1)/2
6.If d is the degree of a node in a graph and n is number of vertices then number of edges in
that graph is
(a)Edi^n
(b)0.25Edi
(c)0.5Edi
7.A grammar was given and 4 strings was given and the one which was not possible was to be
chosen.
8.A problem related to ethernet in which a station sending a frame is of p probablity.There are
m stations to send pckts.4 option was given.It was a mathematical kind of question related to
probablity.
9.Which of the following layer in the OSI model does error handling
(a)Data link
(b)Network
(c)Transport
(d) a & c
10.A network problem in which Data rate,Propagation delay,and distance was given and it was
to find how many packets will be in the line. Choices where
(a)5000
(b)Not possible to find with given data
(c)1000
A
Interview [For CS students]
--------There is Tech as well as HR interview. Tech interview is the important one.
Tech interview questions
-----------------------They will ask about the project.They will ask general questions about it and most probably
will not go into
the implementation part of it.So one must have a general idea about the project done.

Interview is mainly based on Data Structures.Some


questions are as follows:- What is a tree,its application,order for insertion,deletion and traversal with worst case
analysis.
- What is a graph,its application.
- Height of a tree
- Balanced tree and how to balance a tree
- Minimum Spanning Tree
- Dijikstra's, Prim algorithms
- Define a structure for a linked list.
- Binary search and its analysis
- Heap sort and its analysis
- What is a heap and its application
- Cache and its working
- Memory(IO mapped)
- Recursive fns and types, its adv and disadv.
- Compiler(grammar)

*****C debugging questions like


(1)What is the problem with the following code
int * f(int a)
{
int i;
i=a;
return(&i);
}
Ans-> We can't return address of auto variable as it is allocation is made in stack which is
deallocated
when the function returns.
(2)
a.h b.c c.c d.c
int i=0 #include"a.h" #include"a.h" extern int
i;void main{.....}
|||
b.o c.o d.o
Compilation Phase
Linked to get exe.
Will there be any problem in any phase.If yes then where and what? In linking phase as there
will be multiple declaration
of i.
*****You will be told to write some code like
(1)To find string length by using recursive function.
(2)To find fibonaci series by using recursive function.
(3)To write code for malloc so that allocation may be made fastly.
(4)Write a fn prototype which return a pointer which
points to an array of 10 ints.
HR Interview
------------

- Introduce yourself
- Why should we take you
- What you know about Sasken and etc.

MOTOROLA PSGTECH 2003


There were basically 3 papers -software ,DSP, Semiconductor software paper (20 questions 45
minutes) concentrate more on data structures 10 questions from data structures and 10 from
C++ and data structures10 questions were in the fill in the blank format and 10 questions
were multiple choice questions.
1.

bubble sorting is

a)two stage sorting


b).....
c)....
d)none of the above
2.

.c++ supports

a) pass by value only


b) pass by name
c) pass by pointer
d) pass by value and by reference
3.

.Selection sort for a sequence of N elements

no of comparisons = _________
no of exchanges = ____________
4.

Insertion sort

no of comparisons = _________
no of exchanges = ____________
5.

what is a language?

a) set of alphabets
b)set of strings formed from alphabets
c)............
d)none of the above
6.

Which is true abt heap sort

a)two method sort


b)has complexity of O(N2)
c)complexity of O(N3)
d)..........
7.

In binary tree which of the following is true

a)binary tree with even nodes is balanced


b)every binary tree has a balance tree

c)every binary tree cant be balanced


d)binary tree with odd no of nodes can always be balanced
8.

Which of the following is not conducive for linked list implementation of array

a)binary search
b)sequential search
c)selection sort
d)bubble sort
9.

In c++ ,casting in C is upgraded as

a)dynamic_cast
b)static_cast
c)const_cast
d)reintrepret_cast
10.

Which of the following is true abt AOV(Active On Vertex trees)

a)it is an undirected graph with vertex representing activities and edges representing
precedence relations
b)it is an directed graph "" "" """ "" "" "" "" "" "
c)........
d).......
11.

Question on worst and best case of sequential search

12.

question on breadth first search

13.

char *p="abcdefghijklmno"

then printf("%s",5[p]);
14.

what is the error

struct { int item; int x;}


main(){ int y=4; return y;}
error:absence of semicolon

15.

Which of the following is false regarding protected members

a)can be accessed by friend functions of the child


b) can be accessed by friends of child's child
c)usually unacccessible by friends of class
d) child has the ability to convert child ptr to base ptr
16.

What is the output of the following

void main()
{
int a=5,b=10;
int &ref1=a,&ref2=b;
ref1=ref2;

++ ref1;
++ ref2;
cout<<a<<b<<endl;
} value of a and b
a)5 and 12
b)7 and 10
c)11 and 11
d)none of the above
17.

What does this return

f(int n)
{
return n<1?0:n==1?1:f(n-1)+f(n-2)
}
hint:this is to generate fibonacci series
code for finding out whether a string is a palindrome,reversal of linked list, recursive
computation of factorial with
blanks in the case of some variables.we have to fill it out
18.

for eg; for palindrome

palindrome(char * inputstring)
{
int len=strlen ( ?);
int start= ?;
end =inputstring + ?-?;
for(; ?<end && ?==?;++ ?,--?);
return(?==?); }
we have to replace the question marks(?) with corresponding variables
19.

.linked list reversal

Linked (Link *h)


{
Link *temp,*r=0,*y=h;
while(y!= ?) (ans:Null)
{
temp = ?;(ans:y->next)
some code here with similar fill in type
}
20.

fill in the blanks type question involving recursive factorial computation

Enter Your CommentsNCR Placement Paper and Sample Paper


The pattern for the company NCR Teradata in HYD.

The exam was of 1:45 and consisted of C,C++,DataStructures, total 4(5 Marks)... but I
couldn't get thru....
Note that the code or the values may not be correct.... Just get the concept.
Predict the o/p... each 1 mark
1.
static int i;
{
i=10;
...
}
printf("%d",i);
Ans: 10
2.
#define func1(a) #a
#define func2(a,b,c) a##b##c
printf("%s",func1(func2(a,b,c)))
Ans: func2(a,b,c)
3.
const int* ptr;
int* ptr1;
int a=10;
const int p=20;
ptr=a;
ptr1=p;
4.
class a
virtual disp()
{ printf("In a");}
class b:public a
disp()
{ printf("In b");}
class c:public a
disp()
{ printf("In c");}
main()
{
a obj;
b objb;
c objc;
a=objb;
a.disp();
a=objc;
a.disp();
Ans: "In a" "In a"
5.
a="str";
char *b="new str";
char *temp;
malloc(sizeof(temp)+1,....
strcpy(a,temp);
malloc(sizeof(b)+1,....

strcpy(temp,b);
6.
int m,i=1,j=0,k=-1;
m=k++||j++&&i++;
printf("%d...",m,i,j,k);
7.
class x
{
double b;
double *l;
float &c;
}
main()
{
double g=10.34;
double *f=1.3;
float k=9;
x o;
o.b=g;
o.l=f;
o.c=k;
}
Ans: Compiler Error
Write C/C++ code for following:
For all the probs, u will have decide on wht DS to use.... and u'r program must be
efficient...explain in detail... (5 Marks)
1. Find the Kth smallest element in a Binary Tree. (5 Marks)
2. Each worker does a job and is given a rating +ve,-ve or Zero.
Find the MaxSubSequenceSum for given no. of workers.
Ex: Workers=6; Ratings={1,0,-1,4,5,-3}
MaxSubSequenceSum=4+5=9 (5 Marks)
3. 1 to N ppl sitting in a circle. Each one passes a hot potato to the next person. After M
passes the person holding the potato is eliminated. The last person remaining is winner. Find
winner for given N,M.
Ex: N=5, M=2, Winner=4 (5 Marks)
4. Reverse a given Linked List. (5 Marks)
5. There is a file called KnowledgeBase.txt which contains some words. Given a sub-string u
have to find all the words which match the word in the file.
Ex: file contains a, ant, and, dog, pen.
If I give "an" I should get o/p as "ant, and" (10 Marks)
6. Company employee have id,level,no. of sub-ordinates under him...

If a emp leaves then his sub-ordinates are assigned to any of the emp's seniors...
Write four functions:
DSQ PAPER
Techanical paper
Questions 1 -5 are reference to the followig psedo code
{
input m,n,z
TEST:if ((m+n)/3&gt;5)z=z+1 else z =z-1
printf m,n,z
{
(m-m+1;n=n-3)
if (m+n+2)&gt;14 then goto test
print m,n,z
end
}
1. what is the final output of the if the input is 2,14,12 (m,n,z)
a)1,8,4 b)1,4,8 c)4,8,1 d)8,4,2
ans=C.
2. what is the final output if the input is 1,18,2? (m,n,z)
ans) 5,6,2 i.e ans =c.
3. How many times is TEST execute ed if the input is 2,14,1?
ans) twice ans=c.
4) How many times the TEST exected if the input is 1,18,2?
ans)four times
5) what are the values taken by Z when input being 8,24,1?
a)only 5 b)only 6 c)neither 5 or 6 d)both 5 and 6
ans)D.
6) the function f(x) is defined as follows
if x=0 then f(x) =1
if x&gt;0 then if ((x&gt;10)then f(x) =x-10 else f(x) =x+1))
if x&lt;0 then if (x**2 &lt;100) then f(x) =f(-x+1) else f(x) =f(-(x+1))
6) the above of f(2) +f(-3) is
ans=8.
7) the value of f(8)+f(9) is
ans=20
8) the value of f(1)+f(2)+f(3).............+f(10) is
ans=65
9) the value of f(-10)+f(-9)+f(-8) is
a) 33 b)25 c)-27 d)27
11. 1997 haeadecimal is
a)7cb b)7cd c)7cf d)7ca
ans-c
12. the remainder when 9FA (hexa) is divided by 8 is added to the
12(to base ten) to get x.then x has the binary opertion
ans=1110
13. the remainder when 1221 (in hexa) is diveded by 17(decimal) in (hexa)is
ans=0
14. The binary number 100010011 will the hexa representation
ans=113

15. The binary number 10011001 will the octal representation


ans=463
16 Find the odd man out
16 a) Intel b)motorola c)nec d)Ibm
ans =nec
17. a)BIt b)byte c)nibble d)field
ans= field
18 a)Tree b)Root c)Log d)leaf
ans=log
19. a)ROM b)PROM c)EPROM d)EEPROM
ans=ROM
20. a)MOVE b)DEL c)COPY d)REN
ans=DEL
21. What's the output of the following program
main()
{
int z=3;
printf(&quot;%d %d &quot;,z,main());
}
a)prints a value 3 b)prints junk value c)error message d)infinite loop
22) main()
{
int i=3,j=5;
while (i--,J--)
{
printf(&quot;%d %d&quot;.i,j);
}
}
The loop will be executed
a)3 times b)5times c)8times d)infinite times
23) main()
{
int i=3,j=5
If(i--,j--)
printf(&quot;%d %d &quot;,i,j);
}
The output of the program for (i,J)is
a)3,5 b)3,4 c)2,4 d)2,5
ans=B
24) main()
{
int i=3
printf (&quot;%d %d %d &quot;,++i,i-,i+=5);
}
The the out put of the program is
a)8,8,8 b)4,3,8 c)3,2,7 d)4,4,9
ans=B
25) main()
{
int times =5;
int i=3;

int j=4;
int k=34;
i=j+k;
while(times --)
{
i=times
j=times
k=times
}
printf(&quot;%d %d %d &quot; ,i,j,k)
}
THe output of the praogram is (i,j,k)
a)19,9,35 b)38,42,80 c)43,47,85 d)15,14,41
ans=C
26) main()
{
int num =32765;
while (num++);
printf(&quot; %d &quot;,num)
}
what&quot;s the out put ofthe program
a)prints all the number above 32765 including the number 32765
b)prints all the number above 32765 excluding the number 32765
ans=B.
27) main()
{
float k=3.4156
printf(&quot;%f %f &quot;,float(k),c(k))
}
The output of the program
a) 3.4156 ,3.4156 b)4,5 c)3,4 d)3.45 3.40
ans=C.
28) main()
{
int bounce =4;
printf (&quot;total number of bounce =%d&quot;,bounce ++);
}
The out put of the program is
ans=D (stoP)
29) main()
{
int number =25;
char name ='A'
printf(&quot;The addition of the name and the number is %o &quot;name +_number)
}
the output of the program is
a)compiler error
b)run time error
ans= A
30)
31) ODBC means
ans= open data base connectivity
32) ASCII stands for
ans= american standard for information interchange

33)
34) flops stands for
ans)floating point operation per second
35) by superconductivity
ans)
36) PERT stands for
Program evalution and review techniq
37) IMS is a
ans) data base system
38) HTML is a
ans) Hyper text markup language
39) The default backend of visual basic is
ans)sybase
40) Client server is based on
ans) distribution processing

44) computer viruses can spread from one system to anther by means of
a) infected disks b)links to a network
c)downloaded program from a bulletin boardd)all of the program
ans)D
45) A front end processor is usually used in
ans=multi processing.
46) A radio active material of mass 16gms loses in 10 years due to
radiation.How many more years will take for the material to attain a
mass of of 1gm ?
ans=80 years
47) A block of ice floats on water in a beaker as the melts the water
level n the beaker will remain the same
ans=Remains same.
48) if va,vn,vs are velocities of sound in a air ,water ,and steel then
ans)vs&gt;vn&gt;va
49) in usual computer arthimetic the value of the integer expression
22/5*2+8*2/6
ans= 8.
50) an operting system is a
a)file manager b)memory manager
c)i/o manager d)all of the above
ans=D.

1.How many liters of water must be added to 30 liters of alcohol to make a


solution thatis 25%
ans:120
2.How much is 3/7 larger than 20 percent of 2
ans;1/35
3.xyz=120,then which of the following cannot be a value of y
ans:0
4.a number of subsets of a set s is 128, then s has
ans:7
5. xsqrt(0.09)=3 , then x equals
ans:
6.perimeter of rectangle is s and the other sideis x, then the other side
ans:(s-2x)/2
7.solution of system of equations y-z=0,x+8y=4,3x+4y=7z is
ans:x=1,y=1,z=1

15. f(x,y) =x**2 -y**2 then the value of f(4,(f(1,2) is


ans =7.
16. if the radius of the circle is incresed by 6% then its area incresed
by
ans=36%
17. the average of seven numbers is 2.5 then their product
asn=17.5
18. the minimum of (2x+1)**2 + (x+2) is at x =
ans = (-4/5)
19. the probability of getting at least in a single through of three
coins is
ans=7/8.
20. atrain covers the distance D beteween two cities in hhours arriving
2 hours late.what rate would permit to train to arrive on schdule?
ans= (D/H-2)
21. in a single throw of dice ,the chance of throwing a total of 3 is
ans) 1/216.
22. a triangle of sides 3,4,5 then its----is
ans:6
23. Which of the following is next smaller invalue than--- one half
ans:2/5
24. if f(x)=1/x then f(f(f(x))) equals
ans:1/x
25. if f(x)=1/x**2 , then f(f(f(x)))
ans:1/x
26.if 8x+4y=6 and 4x+5y=7, x+y equl\als
ans:1
27. find the next number in the series 1,2,5,10,17,26
ans:37
28,.sqrt(0.16)+cubic root(0.027) equals
ans:0.7
29.if a,b&gt;0 and a+b=2 then the max value of ab is
ans:1
30. p and q are positiveintegers with their average 5, find how many
different values can p take
ans:9
31. if 0&lt;x&lt;1 which of the following is the largest
ans:1/x
33. If x,y,z are three consecutive natural numbers, which of the following
numbers should be x+y+z
ans:2/3
34. two persons run a race of 100m. the winner won by (110/11)m and one
second in time. find the speed of lsoer in met
ans:9.09
35. in a group of 15,7 can speak spanish, 8 can speak french and 3 can
speak neither,. how much of the group can speak both french and spanish
ans:1/5
36. which of the following intefgers is the square of an integer for every integer
ans:a**2+2n+1
37. which of the following has the largest numberical value
ans:0.2/0.000001
38. ifn is odd which of the following statements is true
ans: 3n+1 is even
39. which of the following is the prime
ans:80

Enter Your CommentsSample Test Paper :Alter Engineering

1.

int b=10;

int *p=&b;
*p++;
printf("%d",*p);
what is the output?
2.

What is the difference between malloc, calloc and realloc?

3.

What does malloc return in C and C++?

4.

main()

{
char *a="hello";
char *b="bye";
char *c="hai";
int x=10,y=100;
c=(x<y>)?a:b;
printf("%s",c);
}
whats the output?
5.

void main()

{
int a,b;
a=sumdig(123);
b=sumdig(123);
printf("%d %d",a,b);
}
int sumdig(int n)
{
static int sum;
int d;
if(n!=0)
{
d=n%10;
n=(n-d)/10;
sum=sum+d;
sumdig(n);
}
else
return s;

}
what is the output?
6.

Declare a pointer to a function that takes a char pointer

as argument and returns a void pointer.

7.

How do we open a binary file in Read/Write mode in C?

C++
8.

class A

{
public:
A()
{
}
~A();
};
class derived:public A
{
derived();
};
what is wrong with this type of declaration?
9.

what do you mean by exception handling?

10.

What are "pure virtual" functions?

11.

What is the difference between member functions and

static member functions?


12.

What is the4 difference between delete[] and delete?

13.

Question on Copy constructor.

14.

What are namespaces?

15.

One question on namespace.

16.

What are pass by valu and pass by reference?

what is the disadvantage of pass by value?


I didnt get this. if you have the answer plz tell me.
17.

How to invoke a C function using a C++ program?

18.

char *str;

char *str1="Hello World";


sscanf(str1,"%s",str);
what is the output?

19.

Difference between function overloading and function overriding.

20.

There is a base class sub, with a member function fnsub(). There are

two classes super1 and super2 which are subclasses of the base class sub.
if and pointer object is created of the class sub which points to any
of the two classes super1 and super2, if fnsub() is called which one
will be inoked?
i2 Technologies
Q1.Convert 0.9375 to binary
a) 0.0111
b) 0.1011
c) 0.1111
d) none
Ans. (c)
Q2.( 1a00 * 10b )/ 1010 = 100
a) a=0, b=0
b)a=0, b=1
c) none
Ans. (b)
Q3. In 32 bit memory machine 24 bits for mantissa and 8 bits for exponent. To increase the
range of floating point.
a) more than 32 bit is to be there.
b) increase 1 bit for mantissa and decrease 1 bit for exponent
c) increase 1 bit for exponent and decrease one bit for mantissa
Q4.In C, "X ? Y : Z " is equal to
a) if (X==0) Y ;else Z
b) if (X!=0) Y ;else Z
c) if (X==0) Y ; Z
Ans. (b)
Q5. From the following program
foo()
int foo(int a, int b)
{
if (a&b) return 1;
return 0;

}
a) if either a or b are zero returns always 0
b) if both a & b are non zero returns always 1
c) if both a and b are negative returns 0
Q6. The following function gives some error. What changes have to be made
void ( int a,int b)
{
int t; t=a; a=b; b=t;
}
a) define void as int and write return t
b) change everywhere a to *a and b to *b
Q7. Which of the following is incorrect
a) if a and b are defined as int arrays then (a==b) can never be true
b) parameters are passed to functions only by values
c) defining functions in nested loops
Q8. include<stdio.h>
void swap(int*,int*);
main()
{
int arr[8]={36,8,97,0,161,164,3,9}
for (int i=0; i<7; i++)
{
for (int j=i+1; j<8;j++)
if(arr[i]<arr[j]) swap(&arr[i],&arr[j]);
}
}
void swap(int*x,int*y)
{
int temp; static int cnt=0;
temp= *x;
*x=*y;
*y=temp;
cnt++;
}
What is cnt equal to

a) 7
b) 15
c) 1
d) none of these
Q9.

int main()
{
FILE *fp;
fp=fopen("test.dat","w");
fprintf(fp,'hello\n");
fclose(fp);
fp=fopen ("test.dat","w");
fprintf (fp, "world");
fclose(fp);
return 0;
}

If text.dat file is already present after compiling and execution how many bytes does the file
occupy ?
a) 0 bytes
b) 5 bytes
c) 11 bytes
d) data is insufficient
Q10.

f1(int*x,intflag)
int *y;
*y=*x+3;
switch(flag)
{
case 0:
*x=*y+1;
break;
case 1:
*x=*y;
break;
case 2:
*x=*y-1;
break;
}

return(*y)
main()
{
*x=5;
i=f1(x,0); j=f1(x,1);
printf("%d %d %d ",i,j,*x);
}
What is the output?
a) 8 8 8
b) 5 8 8
c) 8 5 8
d) none of these

Each question had 5 options.There were 25 question in all and all were Objective Type.
1

When compiled from command line what are linking options?

You have written a code in C++, and u have to use a C library , what would u do?
(Ans: write extern "c" in header files)

Fiber optic backbone is in which OSI layer?

void main()
{
int x=1;
int y=1;
int i;
for(i=2;i<=100;i++)
{
x=x+i;y=y*(i+1)/(i-1);
}
What are the values of x & y?

If we carry out operation (-3)+(-6),then which of the what will be the value of carry

and sign flag?


6

void abc(int a[])


{
int k=0;int j=50;
while(k<j)
{

if(a[i]>a[j])
k++;
else
j--;
}
How many times the loop will occur?
7

Integrate e^(x^-2)dx , with limits -infinity to +infinity?What is the final value?

Let p be a 16 bit number.The 2's complement of p will be represented by?

void main()
{
int a[]={5,4,3,2,1};
int x,y;
int *p=&a[2];
*p++;
x=++*p;
y=*(p++);
printf("%d %d",x,y)'
}
What will be the value of x and y?

10

Let there be a set of 3 numbers.Then number of groups possible?

11

A question on some technique used in DA-converter?

12

Which data structure to use for fastest search?

13

A binary tree contains 1024 elements.What is maximum number of comparisons

needed to search an
element?
14

s=1-1/4+1/16-1/32...... What is the value of S?(Ans = 0.8 Hint Its a GP)

15

A C++ class has multiple references to base class.Then some options were given?

16

for(i=0;i<20;i++)
{
a[i]=i;
}
for(i=0;i<20;i++)
{
a[i]=a[19-i];
}
What is final value of array a? Options were there.

17

In Java can a variable be initilised inside a loop?

18

Two dices are thrown.What is the probality that the the number on the first dice is

greater or equal to
number on the second dice?
Optimize the below 1,2,3,4 questions for time:
1)
int i;
if i=0 then i:=1;
if i=1 then i:=0;
2)
int i;
if i=0 then i:=1;
if i=1 then i:=0;
(given that i can take only two values (1,0))
3)
int i;
if i=0 then i:=1;
else if i=1 then i:=0;
(given that i can take only two values (1,0))
4)
int m,j,i,n;
for i:=1 to n do
m:=m+j*n
5) Expand the following
a) ISDN
b) CASE
c) CSMA/CD
d) OOPS
e) MIMD
6) In the following questions, answer A,B,C,D depending on when
the errors are detected?
A if no error is detected
B if semantic and syntactic checking
C if during Code genration & Symbol allocation
D run time
a) Array overbound
b) Undeclared identifier
c) stack underflow
d) Accessing an illegal memory location
7) How many page faults will occur for below sequence of pages when LRU
page replacement algorithm is used ( The memory can only have 3pages):
1,2,3,4,2,1,5,2,4 (something like that)

Sample Technical Paper

1.

Point out error, if any, in the following program

main()
{
int i=1;
switch(i)
{
case 1:
printf("\nRadioactive cats have 18 half-lives");
break;
case 1*2+4:
printf("\nBottle for rent -inquire within");
break;
}
}
Ans. No error. Constant expression like 1*2+4 are acceptable in cases of a
switch.
2.

Point out the error, if any, in the following

program
main()
{
int a=10,b;
a>= 5 ? b=100 : b=200;
printf("\n%d",b);
}
Ans. lvalue required in function main(). The second assignment should be written
in parenthesis as follows:
a>= 5 ? b=100 : (b=200);

3.

In the following code, in which order the functions would be called?


a= f1(23,14)*f2(12/4)+f3();
a) f1, f2, f3 b) f3, f2, f1
c) The order may vary from compiler to compiler d) None of the above

4.

What would be the output of the following program?

main()
{
int i=4;
switch(i)
{
default:
printf("\n A mouse is an elephant built by the

Japanese");
case 1:
printf(" Breeding rabbits is a hair raising experience");
break;
case 2:
printf("\n Friction is a drag");
break;
case 3:
printf("\n If practice make perfect, then nobody's perfect");
}
}
a) A mouse is an elephant built by the Japanese b) Breeding rabbits is a hare
raising experience
c) All of the above d) None of the above
5.

What is the output of the following program?

#define SQR(x) (x*x)


main()
{
int a,b=3;
a= SQR(b+2);
printf("%d",a);
}
a) 25
6.

b) 11 c) error d) garbage value

In which line of the following, an error would be

reported?
1. #define CIRCUM(R) (3.14*R*R);
2. main()
3. {
4. float r=1.0,c;
5. c= CIRCUM(r);
6. printf("\n%f",c);
7. if(CIRCUM(r))==6.28)
8. printf("\nGobbledygook");
9. }
a) line 1 b) line 5 c) line 6
7.

d) line 7

What is the type of the variable b in the following declaration?

#define FLOATPTR float*


FLOATPTR a,b;
a) float b) float pointer c) int d) int pointer

8.

In the following code;

#include<stdio.h>
main()
{
FILE *fp;
fp= fopen("trial","r");
}
fp points to:
a) The first character in the file.
b) A structure which contains a "char" pointer which points to the first character
in the file.
c) The name of the file. d) None of the above.
9.

We should not read after a write to a file without an intervening call to

fflush(), fseek() or rewind() < TRUE/FALSE>


Ans. True
10.

If the program (myprog) is run from the command line as myprog 1 2 3 ,

What would be the output?


main(int argc, char *argv[])
{
int i;
for(i=0;i<argc;i++)
printf("%s",argv[i]);
}
a) 1 2 3

b) C:\MYPROG.EXE 1 2 3

c) MYP d) None of the above


11.

If the following program (myprog) is run from the command line as myprog

1 2 3, What would be the output?


main(int argc, char *argv[])
{
int i,j=0;
for(i=0;i<argc;i++)
j=j+ atoi(argv[i]);
printf("%d",j);
}
a) 1 2 3
12.

b) 6 c) error d) "123"

If the following program (myprog) is run from the command line as myprog

monday tuesday wednesday thursday,


What would be the output?
main(int argc, char *argv[])

{
while(--argc >0)
printf("%s",*++argv);
}
a) myprog monday tuesday wednesday thursday

b) monday tuesday

wednesday thursday
c) myprog tuesday thursday d) None of the
above
13.

In the following code, is p2 an integer or an integer pointer?

typedef int* ptr


ptr p1,p2;
Ans. Integer pointer
14.

Point out the error in the following program

main()
{
const int x;
x=128;
printf("%d",x);
}
Ans. x should have been initialized where it is declared.
15.

What would be the output of the following program?

main()
{
int y=128;
const int x=y;
printf("%d",x);
}
a) 128 b) Garbage value c) Error d) 0
16.

What is the difference between the following

declarations?
const char *s;
char const *s;
Ans. No difference
17.

What would be the output of the following program?

main()
{
char near * near *ptr1;
char near * far *ptr2;
char near * huge *ptr3;

printf("%d %d %d",sizeof(ptr1),sizeof(ptr2),sizeof(ptr3));
}
a) 1 1 1
18.

b) 1 2 4

c) 2 4 4

d) 4 4 4

If the following program (myprog) is run from the command line as myprog

friday tuesday sunday,


What would be the output?
main(int argc, char*argv[])
{
printf("%c",**++argv);
}
a) m
19.

b) f c) myprog d) friday
If the following program (myprog) is run from the command line as myprog

friday tuesday sunday,


What would be the
output?
main(int argc, char *argv[])
{
printf("%c",*++argv[1]);
}
a) r b) f c) m d) y
20.

If the following program (myprog) is run from the command line as myprog

friday tuesday sunday,


What would be the output?
main(int argc, char *argv[])
{
while(sizeofargv)
printf("%s",argv[--sizeofargv]);
}
a) myprog friday tuesday sunday b) myprog friday tuesday
c) sunday tuesday friday myprog d) sunday tuesday friday
21.

Point out the error in the following program

main()
{
int a=10;
void f();
a=f();
printf("\n%d",a);
}
void f()

{
printf("\nHi");
}
Ans. The program is trying to collect the value of a "void" function into an
integer variable.
22.

In the following program how would you print 50 using p?

main()
{
int a[]={10, 20, 30, 40, 50};
char *p;
p= (char*) a;
}
Ans. printf("\n%d",*((int*)p+4));
23.

Would the following program compile?

main()
{
int a=10,*j;
void *k;
j=k=&a;
j++;
k++;
printf("\n%u%u",j,k);
}
a) Yes b) No, the format is incorrect
c) No, the arithmetic operation is not permitted on void pointers
d) No, the arithmetic operation is not permitted on pointers
24.

According to ANSI specifications which is the correct way of declaring main()

when it receives command line arguments?


a) main(int argc, char *argv[]) b) main(argc,argv) int argc; char *argv[];
c) main() {int argc; char *argv[]; } d) None of the above
25.

What error would the following function give on compilation?

f(int a, int b)
{
int a;
a=20;
return a;
}
a) missing parenthesis in the return statement b) The function should be declared

as int f(int a, int b)


c) redeclaration of a
26.

d) None of the above

Point out the error in the following program

main()
{
const char *fun();
*fun()='A';
}
const char *fun()
{
return "Hello";
}
Ans. fun() returns to a "const char" pointer which cannot be modified
27.

What would be the output of the following program?

main()
{
const int x=5;
int *ptrx;
ptrx=&x;
*ptrx=10;
printf("%d",x);
}
a) 5
28.

b) 10 c) Error d) Garbage value


A switch statement cannot include

a) constants as arguments b) constant expression as


arguments
c) string as an argument d) None of the above
29.

How long the following program will run?

main()
{
printf("\nSonata Software");
main();
}
a) infinite loop

b) until the stack overflows

c) All of the above d) None of the above


30.

On combining the following statements, you will get char*p; p=malloc(100);

a) char *p= malloc(100) b) p= (char*)malloc(100)


c) All of the above d) None of the above

31.

What is the output of the following program?

main()
{
int n=5;
printf("\nn=%*d",n,n);
}
a) n=5

b) n=5

c) n= 5 d) error

MODE: CAMPUS
COLLEGE: Government Engineering College, Aurangabad
RECRUITMENT FOR: Development/Testing
The test consisted of a 1hr technical objective
questions and 1hr ,Programming test. Tech. Qs
There were six sections and each consist of 5qs.

A.

Computer Algorithms

1. Time Complexity
2. Which of the following cannot be implemented
efficiently in Linear Linked
List
1. Quicksort
2. Radix Sort
3. Polynomials
4. Insertion Sort
5. Binary Search
3. In binary search tree , n=nodes, h=height of tree.
What's complexity?
1. o(h)
2. o(n*h)
3. o(nLogn)
4. o(n*n)
5. None
4.
5.
B.

C Programs

1. Printf("%d%d",i++,i++);
1. Compiler Dependent
2. 4 4
3. 4 3
4. 3 4
5. None of Above

2. void main()
{
printf("persistent");
main();
}
1. Till stack overflows
2. Infinite
3. 65535
4. 34423
5. None
3. Swapping
4. what does it do?
void f(int n)
{
if(n>0)
{
if(A[i]>A[j])
swap();
}
else
f(n-1);
}
1. Swap
2. Sort in Ascending order
3. Sort in Descending order
4. Computes permutation
5.
5. Given a Fibonacci function
f1=1;f2=1
fn=f(n-1)+f(n-2) which of the following is true?
1. Every Second element is even
2. Every third element is odd
3. The series increases monotonally
4. For n>2, fn=ceiling(1.6 * f(n-1))
5. None

C.

Operating System

1. Where the root dir should be located


1. Anywhere on System disk
2. Anywhere on Disk'

3. In Main memory
4. At a fixed location on Disk
5. At fixed location on System Disk
2. Problem on Concurrency
3. Problem on Round Robin Algorithm
4.
5.
D.

General

1. If x is odd, in which of the following y must be


even
1. X+Y=5
2. 2(X+Y)=7
3. 2X + Y =6
4. X+2Y=7
5.
2. 1000! How many digits? What is the most significant
and Least significant
digit
3.
4.
5.
E.

Theory

1. If a production is given
S -> 1S1
0S0
00
11
Then which of the following is invalid
1. 00101010100
2.
3.
4.
5.
2. Context free grammar cannot recognize
1. if-then-else
2. var
3. loops
4. syntax

5. None
3.
4.
5.

F.

DBMS

1. If table A has m rows and table B has n rows then


how many rows will the
following query return
SELECT A.A1,B.B1
FROM A,B
WHERE A.A3=B.B3
1. <=(m*n)
2. m*n
3. <=(m+n)
4. >=(m+n) and <=(m*n)
5. m+n
2. A Query optimizer optimizes according to which of
the following criteria
1. Execution time
2. Disk access
3. CPU usage
4. Communication time
5. None
3. Which of the following is not a characteristic of a
transaction
1. Atomicity
2. Consistency
3. Normalization
4. Isolation
5. Durability
4. The def. of Foreign key is there to support
1. Referential integrity
2. Constraint
3.
4.
5. None
5. Problem
Process A Process B
WRITELOCK(X) WRITELOCK(Y)

READ(X) READ(Y)
... ...
1. The problem is serializable
2. The problem is not serializable
3. It can be run in parallel
4.
5. None
PROGRAMMING SECTION

(This consisted of Two programs to be solved in 1

hour.)
A sparse matrix is a matrix in which a node with val=0 is not represented. The whole
matrix is represented by a Linked list where node typedef struct Node
{
int row;
int col;
int value;
sparsematrix next;
} Element, *sparsematrix;
The problem is, if there are two matrix given suppose m1 and m2, then add them and
return the resultant sparsematrix.
If suppose there are N functions say from 0,1,2,... N-1 and it's given that A[i][j]=1 if the
function i contains a call to
func. j otherwise A[i][j]=0, then write a function that will form groups of related functions
and print them line by line and at the end print the number of total groups
Enter Your CommentsThere were 24 questions.The questions are....

1.

one questions on ^ and & operations...which r repeated in a loop.

2.

one question on normal type conversion of float.

3.

macro question....#ifdefine.....#endif.

4.

one question on a union which has 2 fields....one is defined..value of the other?

5.

what is the best data structure for NOTEPAD

6.
7.

" " " " WORD PROCESSOR.


ONE QUESTION ON CONTINUOUS LEFT AND RIGHT SHIFTING TWO CONTENTS OF
ARRAYS...AND & THEM...

8.

work out on conversions and bitwise operators

9.

one question on a program correction....it's answer is line 7.

Geodesic's on-campus Recruitment @ Salem !!!


CRITERIA:
(i) The Criteria given to us is to have an Aggregate of 70% with no pendingarrears.
(ii) Only CSE,ECE and IT Departments were allowed to attend.
SELECTION:
Total attended - 196
Cleared Written - 11
SELECTION PROCEDURE:
The Preplacement Talk started for us by 9.00am in the morning. There were some interesting
facts in it,so be sure to listen it. After the PPT,we are sent for the written test.
WRITTEN TEST:
Unlike other companies, Geodesic had a very different written pattern. There were 2 Sections,
1) Algorithms and Logical Thinking
2) C Questions
1) Algorithms and Logical Thinking:
There were three questions in this sections.Each carries 5 marks. Ur Solution to the problem
must be an optimal one.
q1) There was a plane which should satisfy the condt 0<B
</B
q2) There are 'm' rows and 'n' columns, these have choclates in it. 2 users play a game
in turn, If player breaks a chocolate in a cell ,he can go either row wise or column wise and
the next player should play his turn.The one who is finally left with one square is the loser. If
player1 doesn't break a small chocolate and gives his turn for player2,what is the optimal
stragedy for winning? What are the positions of losing??
q3) There were 'n' people seated in a circle,every second person in the circle is
eliminated,again the circle is enclosed and the procedure is repeated. Describe this as a
function and 'n' should be decipted as a binary number.U should corelate n with f(n).Find f(10)
and f(20)?
(Hint: This problem is a variant of jospheus problem)
2) C Questions
Here there were 7 questions which were splitted as 1,2 and 3 mark problems!!
q1) A Train is of length 'n' meters which has individual compartments of size 1 or 2
meters in length. In how many possible ways that the length of the train is accommodated
with 1 or 2m compartments. Write a function Train (n) which computes this? (3m)
q2) Give the Structure definition of link list and how will u detect a loop in the linklist?
Write a Separate function for that? (3m)
q3) Perform addition of two numbers without using '+' operator? (2m)
q4)

Consider the code snippet,


int n[] = {0014,010,2,4,8,12};

int i;
for(i=0;i<6;i++)
{
printf("%d",n[i]);
}
What is the output of the above program?
(2m)
q5)
Find the output of the following program,
#define swap(x,y) x=x+y;y=x-y;x=x-y;
void main()
{
int x=5,y=10;
swap(x,y);
printf("%d %d",x,y);
swap1(x,y)
printf("%d %d",x,y);
}
int swap1(int x,int y);
{
int temp;
temp =x;
x=y;
y=temp;
return 0;
}
(2m)
q6)
Consider the following code snippet,
void main()
{
char s=127;
unsigned char u;
s++;
}
(a) is s > 127?
(b) is s < u?
(1m)
q7) Write a function which compares two strings ending with a null character which
returns '0' when they are same and '-1' when they are not same? U should not use strcmp()
function.
(2m)
After the written test was over we waited for results for a long time. And only 11
cleared. Hope there was Sectional Cut-off. If u r preparing for this company, then kindly
concentrate on 'C' well. Moreover the solution, they see ur approach for solving the problem.
All the Best!!!!
Prodex Paper
1.x=3
function(++x)...value 4 is passed to the function
2 x=3
function(x++)...value 3 is passed to the function
3.some ques on file opening...
if(name)..(exixts)
{
...
} the file can be opened
4.if(!name)...(not exixts)
{
...

the file cant b opened

5. a for loop ques does not print array...condition not satisfied


a[10]={10,14,18,20}
6.another for loop ques prints correctly...condition satisfied
7.main()
{
function(x,y);
}
void function(int *x,int *y)
{
.....
}
the function does not work.
8.A d();
a j;
it works well
Fundamentals of Programming
1.The programming language that was designed for specifying algorithm
Address
ASCII
ALGOL
None of these options
2. _____ contains the addresses of all the records according to the contents of the field
designed as the record key.
Index<------ans
Subscript
Array
File
3. _________ symbol is used for Processing of data.
Oval
Parallelogram<------ans
Rectangle
Diamond
4. __________ is the analysis tool used for planning program logic
Protocol
None of these options
PROLOG
Pseudocode
5. Machine language has two part format the first part is__________ and the second part is
__________
OPCODE,OPERAND<------ans
OPERAND,OPCODE
DATA CODE,OPERAND
OPERAND,CODEOP
6. Language Primarily used for internet-based applications
ADA
C++
JAVA;------ans
FORTRAN

7. _________ is a point at which the debugger stops during program execution and awaits a
further command.
Memory Dump
Watch point<------ans
Break point
None of these options
8. ________do not contain any program logic and are ignored by the language Processor
Protocol
Virus

Comment
None of these options
9. The component of data base management system is ________
Data definition Language
Data manipulation Language
Data definition Language and Data manipulation Language
None of these options
10. The quality of Algorithm is judged on the basis of_________
Time requirement
Memory Requirement
Accuracy of solution
All of these options<------ans
11. Advantages of using flow charts is
Effective Analysis
Efficient Coding
Time consuming
Effective Analysis and Efficient Coding<-----ans
Programming in C
12. The Real constants in C can be expressed in which of the following forms
Fractional form only
Exponential form only
ASCII form only
Both Fractional and Exponential forms<------ans
13. The program, which translates high-level program into its equivalent machine language
program, is called
Transformer

Language processor
Converter
None of these options<------ans<!--[if !supportEmptyParas]-->
14. Consider the following statements. i.Multiplication associates left to right ii.Division
associates left to right
iii.Unary Minus associates right to left
iv.subtraction associates left to right All are true <------ans
only i and ii are true
all are false
only iii and iv are true
15. What will be the value of variable a in the following code?
unsigned char a;
a = 0xFF + 1;
printf("%d", a);
0xFF
0x100
0 <------ans
0x0

16. What is the output of the following program?


#include <stdio.h>
void main()
{
printf("\n10!=9 : %5d",10!=9);
}
1<------ans
0
Error
None of these options
17. #include<stdio.h>
void main()
{
int x=10;
(x<0)?(int a =100):(int a =1000);
printf(" %d",a);
}
Error<------ans
1000
100
None of these options
18. Which of the following shows the correct hierarchy of arithmetic operations in C
(), **, * or /, + or (), **, *, /, +, (), **, /, *, +, (), / or *, - or + <-----Ans
19. What is the output of the following code?
#include<stdio.h>
void main()
{
int a=14;
a += 7;
a -= 5;
a *= 7;
printf("\n%d",a);
}
112<------ans
98
89
None of these options
20. What is the output of the following code? #include<stdio.h>
#define T t
void main()
{
char T = `T`;
printf("\n%c\t%c\n",T,t);
}
Error
Tt
TT
tt
21. The statement that prints out the character set from A-Z, is
for( a = `z`; a < `a`; a = a - 1)
printf("%c", &a);
for( a = `a`; a <= `z`; a = a + 1
printf("%c", &a);

for( a = `A`; a <= `Z`; a = a + 1)<----Ans printf("%c", a);


for( a = `Z`; a <= `A`; a = a + 1)
printf("%c", a);
22. The statement which prints out the values 1 to 10 on separate lines, is
for( count = 1; count <= 10; count = count + 1) printf("%d\n",count);
for( count = 1; count < 10; count = count + 1) printf("%d\n",count);<------ans
for( count = 0; count <= 9; count = count + 1) printf("%d ",count);
for( count = 1; count <> 10; count = count + 1) printf("%d\n",count);
23. What does the term `call-by-reference` refer to?
Passing a copy of a variable into a function. Passing a pointer to a variable into a function.
<------ans
Choosing a random value for a variable.
A function that does not return any values.
24. What is the output of the following code? #include<stdio.h>
void swap(int&, int&);
void main()
{
int a = 10,b=20;
swap (a++,b++);
printf("\n%d\t%d\t",a, b);
}
void swap(int& x, int& y)
{
x+=2;
y+=3;
}
14, 24
11, 21 <------ans
10, 20
Error
25. What is the output of the following program code
#include<stdio.h>
void abc(int a[])
{
a++;
a[1]=612;
}
main()
{
char a[5];
abc(a);
printf("%d",a[4]);
}
100
612
Error<------ans
None of these options
26. which of the following is true about recursive function
i. it is also called circular definition
ii. it occurs when a function calls another function more than once
iii. it occurs when a statement within the function calls the function itself
iv. a recursive function cannot have a return statement within it"
i and iii<------ans
i and ii
ii and iv
i, iii and iv
27.What will happen if you assign a value to an element of an array whose subscript exceeds
the size of the array?

The element will be set to 0


Nothing, its done all the time
Other data may be overwritten
Error message from the compiler
28. What is the output of the following code? #include<stdio.h>
void main()
{
int arr[2][3][2]={{{2,4},{7,8},{3,4},}, {{2,2},{2,3},{3,4}, }}; printf("\n
%d",**(*arr+1)+2+7);
}
16 <------ans
7
11
Error
29. If int s[5] is a one dimensional array of integers, which of the following refers to the third
element in the array?
*( s + 2 ) <------ans
*( s + 3 )
s+3
s+2
30. #include"stdio.h"
main()
{
int *p1,i=25;
void *p2;
p1=&i;
p2=&i;
p1=p2;
p2=p1;
printf("%d",i);
}
The output of the above code is :
Program will not compile <------ans
25
Garbage value
Address of I
31. What is the output of the following code? void main()
{
int i = 100, j = 200;
const int *p=&i;
p = &j;
printf("%d",*p);
}
100
200 <------ans
300
None of the above
32. void main()
{
int i=3;
int *j=&i;
clrscr();
printf("%d%d",++*j,*(&i));
}
What is the output of this program?
33

4 3 <------ans
4,address of i printed
Error:Lvalue required
33. What is the output of the following code? #include<stdio.h>
void main()
{
int arr[] = {10,20,30,40,50};
int *ptr = arr;
printf("\n %d\t%d\t",*ptr++,*ptr);
}
10 20
10 10<------ans
20 20
20 10
34. Which of these are reasons for using pointers?
1.To manipulate parts of an array
2.To refer to keywords such as for and if
3.To return more than one value from a function 4.To refer to particular programs more
conveniently
1 & 3 <------ans
Only 1
Only 3
All of the above
35. struct num
{
int no;
char name[25];
};
void main()
{
struct num n1[]={{25,"rose"},{20,"gulmohar"}, {8,"geranium"},{11,"dahalia"}};
printf("%d%d" ,n1[2].no,(*&n1+2)->no+1);
}
What is the output of this program?
88
8 9 <------ans
98
8 , unpredictable
36. During initializing a union
Only one member can be initialised.
All the members will be initialised. Initialisation of a union is not possible.<------ans
None of these options
37. Self referential structure is one
a. Consisting the structure in the parent structure
b. Consisting the pointer of the structure in the parent structure
Only a
Only b
Both a and b
Neither a nor b
38. Individual structure member can be initialized in the structure itself
True
False
Compiler dependent
None of these options
39. Which of the following is the feature of stack?

All operations are at one end


It cannot reuse its memory
All elements are of different data types
Any element can be accessed from it directly<------ans
40. When stacks are created
Are initially empty<------ans
Are initialized to zero
Are considered full
None of these options
41. What is time required to insert an element in a stack with linked implementation?
(1)
(log2n)<------ans
(n)
(n log2n)
42. Which of the following is the feature of stack?
All operations are at one end
It cannot reuse its memory
All elements are of different data types
Any element can be accessed from it directly<------ans
43. Time taken for addition of element in queue is
(1)
(n)
(log n)<------ans
None of these options
44. When is linear queue said to be empty ? Front==rear
Front=rear-1
Front=rear+1
Front=rear<------ans
45. When queues are created
Are initially empty<------ans
Are initialized to zero
Are considered full
None of the above
46. What would be the output of the following program?
#include <stdio.h>
main()
{
printf("\n%c", "abcdefgh"[4]);
}
abcdefgh
d
e <------ans
error
47. Select the correct C code which will read a line of characters(terminated by a \n) from
input_file into a character array called buffer. NULL terminate the buffer upon reading a \n.
int ch, loop = 0; ch = fgetc( input_file ); while( (ch != `\n`)&& (ch != EOF) ){buffer[loop] =
ch; loop++; ch = fgetc(input_file );} buffer[loop] = NULL;
int ch, loop = 0; ch = fgetc( input_file ); while( (ch = "\n")&& (ch = EOF)) { buffer[loop] =
ch; loop--; ch = fgetc(]input_file ); } buffer[loop]= NULL;
int ch, loop = 0; ch = fgetc( input_file ); while( (ch <> "\n")&& (ch != EOF) ) { buffer[loop] =
ch; loop++; ch = fgetc(input_file ); } buffer[loop] = -1;
None of the above

48. What is the output of the following code ?


void main()
{
int a=0;
int b=0;
++a == 0 || ++b == 11;
printf("\n%d,%d",a,b);
}
0, 1
1, 1 <------ans
0, 0
1, 0
49. What is the output of the following program? #define str(x)#x
#define Xstr(x)str(x)
#define oper multiply
void main()
{
char *opername=Xstr(oper);
printf("%s",opername);
}
opername
Xstr
multiply <------ans
Xstr
50. What is the output of the following code ? #include<stdio.h>
#include<string.h>
void main()
{
char *a = "C-DAC\0\0ACTS\0\n"; printf("%s\n",a); }
C-DAC ACTS
ACTS
C-DAC <------ans
None of these
51. #include<stdio.h>
void main()
{
while (1)
{if (printf("%d",printf("%d")))
break;
else
continue;
}
}
The output is
Compile time error
Goes into an infinite loop
Garbage values <------ans
None of these options
52. Select the correct C statements which tests to see if input_file has opened the data file
successfully.If not, print an error message and exit the program.
if( input_file == NULL ) { printf("Unable to open file.\n");exit(1); }
if( input_file != NULL ) { printf("Unable to open file.\n");exit(1); }
while( input_file = NULL ) { printf("Unable to open file.\n");exit(1);}
None of these options

53.The code
int i = 7;
printf("%d\n", i++ * i++);
prints 49
prints 56 <------ans
is compiler dependent
expression i++ * i++ is undefined
54. Recursive procedure are implemented by
Linear list
Queue
Tree
Stack<------ans
55. Which of these are reasons for using pointers?
1. To manipulate parts of an array
2. To refer to keywords such as for and if
3. To return more than one value from a function 4. To refer to particular programs more
conveniently
1 & 3<------ans
only 1
only 3
None of these options
56. The expression x = 4 + 2 % -8 evaluates to -6
6
4
None of these options
57. What is the output of the following code? #include<stdio.h>
main()
{
register int a=2;
printf("\nAddress of a = %d,", &a); printf("\tValue of a = %d",a);
Address of a,2 <------ans
Linker error
Compile time error
None of these options
58. What is the output of the following code? #include<stdio.h>
void main()
{
int arr[]={0,1,2,3,4,5,6};
int i,*ptr;
for(ptr=arr+4,i =0; i<=4; i++) printf("\n%d",ptr[-i]);(as the 0=4,for -1 it becomes =3)
}
Error
65432
0 garbage garbage garbage garbage
4 3 2 1 0 <------ans
59. Which of the following is the correct way of declaring a float pointer:
float ptr;
float *ptr; <------ans
*float ptr;
None of the above
60.If the following program (newprog) is run from the command line as:newprog 1 2 3 What
would be the output of the following?
void main (int argc, char*argv[])
{

int I,j=0;
for (I=0;I<argc;I++)
j=j + atoi(argv[I]);
printf("%d",j);
}
123
6
123
Compilation error<------ans

C-Test Paper
1. #include
* What is wrong in the following problem
main() {
int i,j;
j = 10;
i = j++ - j++;
printf("%d %d", i,j);
}
ans: 0, 12
2.#include <STDIO.H
* What is the output of the following problem
main() {
int j;
for(j=0;j<3;j++)
foo();
}
foo() {
static int i = 10;
i+=10;
printf("%d\n",i);
}
/* Out put is (***since static int is used i value is retained between
* 20 function calls )
* 30
* 40
*
/
3.#include <STDIO.H
#include <STDIO.H
#include <STRING.H
/* This is asked in PCS Bombay walk-in-interview
* What is wrong in the following code
*/
main()
{
char *c;
c = "Hello";
printf("%s\n", c);
}
/*ans:- Hello, The code is successfully running */

4. #include <STDIO.H
/* This problem is given in PCS BOMBAY walk-in-interview.
* What is the final value of i and how many times loop is
* Executed ?
*/
main()
{
int i,j,k,l,lc=0;
/* the input is given as 1234 567 */
printf("Enter the number string:<1234 567 \n");
scanf("%2d%d%1d",&i,&j,&k);
for(;k;k--,i++)
for(l=0;l
printf("%d %d\n",i,l);}
printf("LOOPS= %d\n", lc-1);
}
/* Ans: i = 16, and loop is executed for 169 times */
5.#include <STDIO.H
/* This is given in PCS Bombay walk-in-interview */
/* What is the output of the following program */
main() {
union {
int a;
int b;
int c;
} u,v;
u.a = 10;
u.b = 20;
printf("%d %d \n",u.a,u.b);
}
/* Ans : The latest value assigned to any of the union member
will be present in the union members so answer is
20 20
*/
6.#include <STDIO.H
main()
{
float i, j;
scanf("%f %f", &i, &j);
printf("%.2f %.3f", i, j);
}
/Ans:- 123.34 3. 234 */
7.#include <STDIO.H
/* This is given in PCS Bombay walk-in-interview
* What is the out put of the following problem ?
*/
main()
{
char *str = "12345";
printf("%c %c %c\n", *str, *(str++), *(str++));

}
/* Ans: It is not 1 2 3
* But it is 3 2 1 Why ??
*/
8.#include <STDIO.H
/* This problem is asked in PCS Bombay Walk-in-interview
* Write a macro statement to find maximum of a,b
*/
#define max(a,b) (ab)?a:b
main()
{
int a,b;
a=3;
b=4;
printf("%d",max(a,b));
}
/* Ans is very simple the coding is just for testing it
and output is 4 */
~
9.#include <STDIO.H
/* This problem is asked in PCS Bombay
* What is the output of the following coding
*/
main()
{
int len=4;
char *st="12345678";
st = st -len;
printf("%c\n",*st);
}
/* Ans : It will print some junk value */
~
10.#include <STDIO.H
main()
{
func(1);
}
func(int i){
static char *str ={ "One","Two","Three","Four"};
printf("%s\n",str[i++]);
return;
}
/* Ans:- it will give warning because str is pointer to the char but
it is initialized with more values
if it is not considered then the answer is Two */
11.
#include <STDIO.H
main()
{
int i;
for (i=1;i<100; i++)
printf("%d %0x\n",i,i);
}

/* Ans:- i is from 1 to 99 for the first format,


for the second format 1to9, ato f, 10 to 19,1ato1f, 20 to 29, etc */

12.#include <STDIO.H
/* This problem is asked in PCS Bombay walk-in-interview
* In the following code please write the syntax for
* assing a value of 10 to field x of s and id_no 101 of s
*/
struct {
int x;
int y;
union {
int id_no;
char *name;
}b;
}s,*st;
main()
{
st = &s;
st-x=10;
st-b.id_no = 101;
printf("%d %d\n",s..x,s.b.id_no);
}
/* Ans: The answer is st-x=10;
* st-b.id_no=101;
*/
13.#include <STDIO.H
/* This problem was asked in PCS Bombay in a walk-in-interview
* Write a recursive function that calculates
* n * (n-1) * (n-2) * ....... 2 * 1
*/
main() {
int factorial(int n);
int i,ans;
printf("\n Enter a Number:");
scanf("%d",&i);
ans = factorial(i);
printf("\nFactorial by recursion = %d\n", ans);
}
int factorial(int n)
{
if (n <= 1) return (1);
else
return ( n * factorial(n-1));
}
~
14.#include <STDIO.H
/* This problem is asked in PCS Bombay walk-in-interview
* What is the output of the following problem
*/
main(){
int j,ans;
j = 4;
ans = count(4);
printf("%d\n",ans);

}
int count(int i)
{
if ( i < 0) return(i);
else
return( count(i-2) + count(i-1));
}
/* It is showing -18 as an answer */
15.#include<STDIO.H
main()
{
int i=4;
if(i=0)
printf("statement 1");
else
printf("statement 2");
}
/* statement 2 */

This is pcsb paper.


1. #include <STDIO.H
* What is wrong in the following problem
main() {
int i,j;
j = 10;
i = j++ - j++;
printf("%d %d", i,j);
}
ans: 0, 12
2.#include <STDIO.H
* What is the output of the following problem
main() {
int j;
for(j=0;j<3;j++)
foo();
}
foo() {
static int i = 10;
i+=10;
printf("%d\n",i);
}
/* Out put is (***since static int is used i value is retained between
* 20 function calls )
* 30
* 40
*
/

3.#include <STDIO.H
#include <STDIO.H
#include <STRING.H
/* This is asked in PCS Bombay walk-in-interview
* What is wrong in the following code
*/
main()
{
char *c;
c = "Hello";
printf("%s\n", c);
}
/*ans:- Hello, The code is successfully running */
4. #include <STDIO.H
/* This problem is given in PCS BOMBAY walk-in-interview.
* What is the final value of i and how many times loop is
* Executed ?
*/
main()
{
int i,j,k,l,lc=0;
/* the input is given as 1234 567 */
printf("Enter the number string:<1234 567 \n");
scanf("%2d%d%1d",&i,&j,&k);
for(;k;k--,i++)
for(l=0;l
printf("%d %d\n",i,l);}
printf("LOOPS= %d\n", lc-1);
}
/* Ans: i = 16, and loop is executed for 169 times */
5.#include <STDIO.H
/* This is given in PCS Bombay walk-in-interview */
/* What is the output of the following program */
main() {
union {
int a;
int b;
int c;
} u,v;
u.a = 10;
u.b = 20;
printf("%d %d \n",u.a,u.b);
}
/* Ans : The latest value assigned to any of the union member
will be present in the union members so answer is
20 20
*/
6.#include <STDIO.H
main()
{
float i, j;
scanf("%f %f", &i, &j);

printf("%.2f %.3f", i, j);


}
/Ans:- 123.34 3. 234 */
7.#include <STDIO.H
/* This is given in PCS Bombay walk-in-interview
* What is the out put of the following problem ?
*/
main()
{
char *str = "12345";
printf("%c %c %c\n", *str, *(str++), *(str++));
}
/* Ans: It is not 1 2 3
* But it is 3 2 1 Why ??
*/
8.#include <STDIO.H
/* This problem is asked in PCS Bombay Walk-in-interview
* Write a macro statement to find maximum of a,b
*/
#define max(a,b) (ab)?a:b
main()
{
int a,b;
a=3;
b=4;
printf("%d",max(a,b));
}
/* Ans is very simple the coding is just for testing it
and output is 4 */
~
9.#include <STDIO.H
/* This problem is asked in PCS Bombay
* What is the output of the following coding
*/
main()
{
int len=4;
char *st="12345678";
for(i=0; i<6; i++)
st = st -len;
printf("%c\n",*st);
}
/* Ans : It will print some junk value */
~
10.#include <STDIO.H
main()
{
func(1);
}
func(int i){
static char *str ={ "One","Two","Three","Four"};

printf("%s\n",str[i++]);
return;
}
/* Ans:- it will give warning because str is pointer to the char but
it is initialized with more values
if it is not considered then the answer is Two */
11.
#include <STDIO.H
main()
{
int i;
for (i=1;i<100; i++)
printf("%d %0x\n",i,i);
}
/* Ans:- i is from 1 to 99 for the first format,
for the second format 1to9, ato f, 10 to 19,1ato1f, 20 to 29, etc */

12.#include <STDIO.H
/* This problem is asked in PCS Bombay walk-in-interview
* In the following code please write the syntax for
* assing a value of 10 to field x of s and id_no 101 of s
*/
struct {
int x;
int y;
union {
int id_no;
char *name;
}b;
}s,*st;
main()
{
st = &s;
st-x=10;
st-b.id_no = 101;
printf("%d %d\n",s.x,s.b.id_no);
}
/* Ans: The answer is st-x=10;
* st-b.id_no=101;
*/
13.#include <STDIO.H
/* This problem was asked in PCS Bombay in a walk-in-interview
* Write a recursive function that calculates
* n * (n-1) * (n-2) * ....... 2 * 1
*/
main() {
int factorial(int n);
int i,ans;
printf("\n Enter a Number:");
scanf("%d",&i);
ans = factorial(i);
printf("\nFactorial by recursion = %d\n", ans);
}
int factorial(int n)
{

if (n <= 1) return (1);


else
return ( n * factorial(n-1));
}
~
14.#include <STDIO.H
/* This problem is asked in PCS Bombay walk-in-interview
* What is the output of the following problem
*/
main(){
int j,ans;
j = 4;
ans = count(4);
printf("%d\n",ans);
}
int count(int i)
{
if ( i < 0) return(i);
else
return( count(i-2) + count(i-1));
}
/* It is showing -18 as an answer */
15.#include<STDIO.H
main()
{
int i=4;
if(i=0)
printf("statement 1");
else
printf("statement 2");
}
/* statement 2 */

Sample Test Paper


Technical Questions
1.

main()

{
char **p=="Hello";
printf("%s",**p);
}
Ans: Garbage or nothing
2.

main()
{
printf("%d%c\n");

printf("%d%c\n");
}
Ans: Garbage Value
3.

main()
{
int x==5;
printf("%d%d",x++,++x);
}
Ans==6 6

4.

main()
{
int x==4;
printf("%d",printf(" %d %d ",x,x) );
}
Ans: 4 4 5

5.

main()
{
union
{
int i;
char p;
struct
{
int t;
char e;
char o;
}w;
};
printf("%d\n",sizeof(l) );
}
Ans: 4

6.

main()
{
int i==0,n==6;
while(n--0);
i+==n;
printf("%d\n",i);
}
Ans: -1

7.

ain()
{
char a[]=="Hello";
printf("%c\n",*a++);
}
Ans: Error

8.

a=3,b=2,c=1;
What's the value of k?
k== a< b < c-1;
Ans: 0

9.

main()
{
int a=3;
do
{
printf("%d", a);
a=-1;
} while(a0);
}
Ans: 3

10.

It is not "exact" Question; But the given Answers is:


a) PASS1 PASS2
b) PASS1 FAIL1

c)FAIL1 FAIL2
d)FAIL1 PASS2
main()
{
char c==-32;
int i==-64;
unsigned u==-26;
if(ci)
printf("PASS1");
if( i < c)
printf("PASS2");
else
printf("FAIL1");
if(i<U)
printf("PASS2");
else
printf("FAIL2");
}
Ans: PASS1 PASS2 PASS1
11.

main()

{
int i==0;
for( i==0; i<= ;i++)
{
switch(i)
{
case 0: i+==5;
case 1: i+==2;
case 2: i+==5;
default: i+==4;
break;

}
printf("%d",i);
}
Ans: 16 21
12.

main()

{
int i==4;
switch(i)
{
case 1:
printf("HEllo"):
case default: // "case" should not come with "default"
printf("****");
}
}
Ans: Error
13.

main()

{
int sum==0,count;
for(count==1;sum+==count)
printf("%d\t",sum);
}
Ans: Error
14.

define cond(a) a=e && a<=0


main()
{
char s=='R';
if( cond(s) )
printf("UPPER CASE");
else
printf("LOWER CASE");

}
Ans:UPPER CASE
15.

main()

{
static int i==5;
printf("%d\t",i--);
if( i)
main();
}
Ans: 5 4 3 2 1
16.

main()

{
char *a1=="new",*a2=="dictionary",*t;
swap(a1,a2);
printf("(%s%s)",a1,a2);
t=;
a1=;
a2==t;
printf("-(%s%s)",a1,a2);
}
swap( char *s1,char *s2)
{
char *temp;
s1=s2;
s2=s1;
temp=s1;
}
Ans: (newdictionary)-(dictionarynew)
17.

*p++?

Ans: increments Address

18.

main()

{
int a[]=={ 10,20,30,40,50};
char*p==(char*)a;
printf("%d", * ( (int *) p+4);
}
Ans: 50
19.
1.

one question nothig but calling a function before it has been defined.
Three beauty pageant finalists-Cindy, Amy and Linda-The winner was

musician. The one who was not last or first was a math major.The one who came in
third had black hair. Linda had red hair. Amy had no musical abilities. Who was
first?
(A) Cindy
2.

(B) Amy

(C) Linda

(D) None of these

Two twins have certain peculiar characteristics. One of them always lies on

Monday, Wednesday, Friday. The other always lies on Tuesdays, Thursday and
Saturdays. On the other days they tell the truth. You are given a
conversation.Person A- today is Sunday, my name is Anil Person B-today is Tuesday,
my name is Bill What day is today?
(A) Sunday (B) Tuesday
3.

(C) Monday

(D) Thursday

The difference of a number and its reciprocal is 1/2.The sum of their squares

is
(A) 9/4
4.

(C) 5/3

(D) 7/4

The difference of a number and its square is 870.What is the number?

(A) 42
5.

(B) 4/5

(B) 29

(C) 30

(D) 32

A trader has 100 Kg of wheat, part of which he sells at 5% profit and the rest

at 20% profit. He gains 15% on the whole. Find how much is sold at 5% profit?
(A) 60
6.

(B) 50

(D) 33.3

Which of the following points are collinear?

(A) (3,5)
(C) (4,5)
7.

(C) 66.66

(4,6)
(4,6)

(2,7)
(2,7)

(B) (3,5)

(4,7)

(2,3)

(D) (6,7)

(7,8)

(2,7)

A man leaves office daily at 7pm.a driver with car comes from his home to

pick him from office and bring back home. One day he gets free at 5.30 and instead
of waiting for driver he starts walking towards home. In the wayhe meets the car
and returns home on car. He reaches home 20 minutes earlier than usual. In how

much time does the man reach home usually?


(A) 1 hr 20 min
8.

(C) 1 hr 10 min

(D) 55 min

If m:n = 2:3,the value of 3m+5n/6m-n is

(A) 7/3
9.

(B) 1 hr

(B) 3/7

(C) 5/3

(D) 3/5

dog taken four leaps for every five leaps of hare but three leaps of the dog is

equal to four leap of the hare. Compare speed?


(A) 12:16
10.

(B) 19:20

(C) 16:15

(D) 10:12

A watch ticks 90 times in 95 seconds. And another watch ticks 315 times in

323 secs. If they start together, how many times will they tick together in first
hour?
(A) 100 times
11.

(B) 101 times

(C) 99 times

(D) 102 times

The purpose of defining an index is

(A) Enhance Sorting Performance

(B) Enhance Searching Performance

(C) Achieve Normalization

(D) All of the above

12.

A transaction does not necessarily need to be

(A) Consistent
13.

(B) Repeatable

To group users based on common access permission one should use

(A) User Groups


14.

(B) Roles

(C) Grants

(D) None of the above

PL/SQL uses which of the following

(A) No Binding
15.

(C) Atomic (D) Isolated

(B) Early Binding

(C) Late Binding

(D) Deferred Binding

Which of the constraint can be defined at the table level as well as at the

column level
(A) Unique
16.

(B) Not Null

(C) Check

(D) All the above

To change the default date format in a SQLPLUS Session you have to

(A)

Set the new format in the DATE_FORMAT key in the windows Registry.

(B)

Alter session to set NLS_DATE-FORMAT.

(C)

Change the Config.ora File for the date base.

(D)

Change the User Profile USER-DATE-FORMAT.

17.

Which of the following is not necessarily an advantages of using a package

rather than independent stored procedure in data base.


(A) Better performance.

(B) Optimized memory usage.

(C) Simplified Security implementation.


18.

(D) Encapsulation.

Integrity constrains are not checked at the time of

(A) DCL Statements.

(B) DML Statements.

(C) DDL Statements.

(D) It is checked all the above cases.

19.

Roll Back segment is not used in case of a

(A) DCL Statements. (B) DML Statements.

(C) DDL Statements.

(D) all of the

above.
20.

An Arc relationship is applicable when

(A) One child table has multiple parent relation, but for anyone instance of a child
record
only one of the relations is applicable.
(B) One column of a table is related to another column of the same table.
(C) A child table is dependent on columns other than the primary key columns of
the parent
table.
(D) None of the above.
21.

What is true about the following C functions?

(A) Need not return any value.

(B) Should always return an integer.

(C) Should always return a float.

(D) Should always return more than one

value.
22.

enum number { a=-1, b=4, c,d,e,} what is the value of e?

(A) 7
23.

(B) 4

(C) 5

(D) 3

Which of the following about automatic variables within a function is correct?

(A) Its type must be declared before using the variable.


(C) They are not initialized to zero.
24.

(B) They are local.

(D) They are global.

Consider the following program segment

int n, sum=5;
switch(n)
{
case 2:sum=sum-2;
case 3:sum*=5;
break;
default:sum=0;
}
if n=2, what is the value of the sum?
(A) 0
25.

(B) 15

(C) 3

(D) None of these.

Which of the following is not an infinite

loop?
(A) x=0;

(B) # define TRUE 0....

do{

While(TRUE){....}

/*x unaltered within the loop*/

(C) for(;;)

{....}

....}
While(x==0);
26.

(D) While(1) {....}

Output of the following program is


main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
{
case 0:
i+=5;
case 1:
i+=2;
case 5:
i+=5;
default:
i+=4;
break;
}
}
}
(A) 5,9,13,17

27.

(B) 12,17,22

(C) 16,21

(D) syntax error.

What does the following function print?

func(int i)
{
if(i%2) return 0;
else return 1;
}
main()
{
int i=3;
i=func(i);
i=func(i);
printf("%d",i);
}
(A) 3
28.

(B) 1

(C) 0

(D) 2

What will be the result of the following program?

char*g()

{
static char x[1024];
return x;
}
main()
{
char*g1="First String";
strcpy(g(),g1);
g1=g();
strcpy(g1,"Second String");
printf("Answer is:%s", g());
}
(A) Answer is: First String

(B) Answer is: Second String

(C) Run time Error/Core Dump


29.

(D) None of these

Consider the following program

main()
{
int a[5]={1,3,6,7,0};
int *b;
b=&a[2];
}
The value of b[-1] is
(A) 1

30.

(B) 3

(C) -6

(D) none

Given a piece of code

int x[10];
int *ab;
ab=x;
To access the 6th element of the array which of the following is incorrect?
(A) *(x+5)

(B) x[5]

(C) ab[5]

(D) *(*ab+5}

Cadance Sample Question Paper

Technical
1.

In assembler relocatable code generated by ...!!??


asn: indirect addressing

2.

int v,u;
while(v != 0)

{
t = v % u;
v = u;
u = t;
}
find the time complexity of the above program.
3.

x is passed by reference, y passed by value.


x = 3, y = 2;
foo(x, y)
var integer x, y;
{
x = x + 2;
y = y + 3;
}
main()
{
x = 5;
y = 5;
foo(x, y);
print (x, y);
}
output of the above pseudo code.

4.

How many flip flops you require for modulo 19 counter.

5.

ring counter's initial state is 01000. after how many clock cylces will it return to the
initial state.

6.

some boolesn expression of the form x'y'z' + yz + .. ( something like this) find the
simplified expression

7.

given 6 bit mantissa in 2s complement form and 4 bit exponent is in excess-4 form in
a floating point representation, find the number
ans -(something) * ( 2 to the power 3)

8.

A signed no is stored in 10-bit register, what is the max and min possible value of the
number.

Aptitude

1.

log( X**3 + Y**3) where x=3/4 y=1/4


log(3) , log(7) & log(2) is given ...
ans:-0.385

2.

last question of paper ..


sum of money of A & B =Rs.10
diffrence of A + B = Rs.9
ans : 50 pesa

3.

one paper is equlely folded 50 times... what is new thikness of paper..


ans: 2**50

4.

connect nine point without take-off pen & without overlapping line segment
1234
***5
***6
0* * * 7
ans: start with 0 to 1 to 7 to 0 to 4 .

5.

A room is 30 X 12 X 12. a spider is ont the middle of the samller wall, 1 feet from the
top, and a fly is ont he middle of the opposite wall 1 feet from the bottom. what is the
min distance reqd for the spider to crawl to the fly.

6.

A man while going dowm in a escalator(which is miving down) takes 50 steps to reach
down and while going up takes 125 steps. If he goes 5 times faster upwards than
downwards. What will be the total no of steps if the escalator werent moving.

7.

2/3 of corckery(plates) are broken, 1/2 have someother thing(handle) broken , 1/4
are both broken and handle broken. Ultimately only 2 pieces of corckery were without
any defect. How many crockery were there in total.

8.

It is difficult to draw a figure but another question was in which some NAND and OR
gates were given.
ans - Z = true.

Texas Instruments
Date : 8/9/2005
1.

Can we declare a static function as virtual?

Ans: No. The virtual function mechanism is used on the specific object that determines
which virtual function to call. Since the static functions are not any way related to
objects, they cannot be declared as virtual.
2.

Can user-defined object be declared as static data member of another class?


Ans: Yes. The following code shows how to initialize a user-defined object.
#include
class test
{
int i ;
public :
test ( int ii = 0 )
{
i = ii ;
}
};
class sample
{
static test s ;
};
test sample::s ( 26 ) ;
Here we have initialized the object s by calling the one-argument constructor. We can
use the same convention to initialize the object by calling multiple-argument
constructor.

3.

What is forward referencing and when should it be used?


Ans: Consider the following program:
class test
{
public :
friend void fun ( sample, test ) ;
};
class sample
{
public :
friend void fun ( sample, test ) ;
};
void fun ( sample s, test t )
{

// code
}
void main( )
{
sample s ;
test t ;
fun ( s, t ) ;
}
This program would not compile. It gives an error that sample is undeclared identifier
in the statement friend void fun ( sample, test ) ; of the class test. This is so because
the class sample is defined below the class test and we are using it before its
definition. To overcome this error we need to give forward reference of the class
sample before the definition of class test. The following statement is the forward
reference of class sample. Forward referencing is generally required when we make a
class or a function as a friend.
4.

The istream_withassign class has been derived from the istream class and overloaded
assignment operator has been added to it. The _withassign classes are much like their
base classes except that they include overloaded assignment operators. Using these
operators the objects of the _withassign classes can be copied. The istream, ostream,
and iostream classes are made uncopyable by making their overloaded copy
constructor and assignment operators private.

5.

How do I write my own zero-argument manipulator that should work same as hex?
Ans: This is shown in following program.
#include
ostream& myhex ( ostream &o )
{
o.setf ( ios::hex) ;
return o ;
}
void main( )
{
cout << endl << myhex << 2000 ;
}

6.

We all know that a const variable needs to be initialized at the time of declaration.
Then how come the program given below runs properly even when we have not
initialized p?
#include

void main( )
{
const char *p ;
p = "A const pointer" ;
cout << p ;
}
Ans: The output of the above program is 'A const pointer'. This is because in this
program p is declared as 'const char*' which means that value stored at p will be
constant and not p and so the program works properly
7.

How do I refer to a name of class or function that is defined within a namespace?


Ans: There are two ways in which we can refer to a name of class or function that is
defined within a namespace: Using scope resolution operator through the using
keyword. This is shown in following example:
namespace name1
{
class sample1
{
// code
};
}
namespace name2
{
class sample2
{
// code
};
}
using namespace name2 ;
void main( )
{
name1::sample1 s1 ;
sample2 s2 ;
}
Here, class sample1 is referred using the scope resolution operator. On the other hand
we can directly refer to class sample2 because of the statement using namespace
name2 ; the using keyword declares all the names in the namespace to be in the
current scope. So we can use the names without any qualifiers.

8.

While overloading a binary operator can we provide default values?

Ans: No!. This is because even if we provide the default arguments to the parameters
of the overloaded operator function we would end up using the binary operator
incorrectly. This is explained in the following example:
sample operator + ( sample a, sample b = sample (2, 3.5f ) )
{
}
void main( )
{
sample s1, s2, s3 ;
s3 = s1 + ; // error
}
9.

How do I carry out conversion of one object of user-defined type to another?


Ans: To perform conversion from one user-defined type to another we need to provide
conversion function. Following program demonstrates how to provide such conversion
function.
class circle
{
private :
int radius ;
public:
circle ( int r = 0 )
{
radius = r ;
}
};
class rectangle
{
private :
int length, breadth ;
public :
rectangle( int l, int b )
{
length = l ;
breadth = b ;
}
operator circle( )
{
return circle ( length ) ;

}
};
void main( )
{
rectangle r ( 20, 10 ) ;
circle c;
c=r;
}
Here, when the statement c = r ; is executed the compiler searches for an overloaded
assignment operator in the class circle which accepts the object of type rectangle.
Since there is no such overloaded assignment operator, the conversion operator
function that converts the rectangle object to the circle object is searched in the
rectangle class. We have provided such a conversion function in the rectangle class.
This conversion operator function returns a circle object. By default conversion
operators have the name and return type same as the object type to which it converts
to. Here the type of the object is circle and hence the name of the operator function as
well as the return type is circle.
10. How do I write code that allows to create only one instance of a class?
Ans: This is shown in following code snippet.
#include
class sample
{
static sample *ptr ;
private:
sample( )
{
}
public:
static sample* create( )
{
if ( ptr == NULL )
ptr = new sample ;
return ptr ;
}
};
sample *sample::ptr = NULL ;
void main( )
{

sample *a = sample::create( ) ;
sample *b = sample::create( ) ;
}
Here, the class sample contains a static data member ptr, which is a pointer to the
object of same class. The constructor is private which avoids us from creating objects
outside the class. A static member function called create( ) is used to create an object
of the class. In this function the condition is checked whether or not ptr is NULL, if it is
then an object is created dynamically and its address collected in ptr is returned. If ptr
is not NULL, then the same address is returned. Thus, in main( ) on execution of the
first statement one object of sample gets created whereas on execution of second
statement, b holds the address of the first object. Thus, whatever number of times
you call create( ) function, only one object of sample class will be available.
11. How do I write code to add functions, which would work as get and put properties of a
class?
Ans: This is shown in following code.
#include
class sample
{
int data ;
public:
__declspec ( property ( put = fun1, get = fun2 ) )
int x ;
void fun1 ( int i )
{
if ( i < 0 )
data = 0 ;
else
data = i ;
}
int fun2( )
{
return data ;
}
};
void main( )
{
sample a ;
a.x = -99 ;

cout << a.x ;


}
Here, the function fun1( ) of class sample is used to set the given integer value into
data, whereas fun2( ) returns the current value of data. To set these functions as
properties of a class we have given the statement as shown below:
__declspec ( property ( put = fun1, get = fun2 )) int x ;
As a result, the statement a.x = -99 ; would cause fun1( ) to get called to set the
value in data. On the other hand, the last statement would cause fun2( ) to get called
to return the value of data.
12. How do I write code to make an object work like a 2-D array?
Ans: Take a look at the following program.
#include
class emp
{
public :
int a[3][3] ;
emp( )
{
int c = 1 ;
for ( int i = 0 ; i <= 2 ; i++ )
{
for ( int j = 0 ; j <= 2 ; j++ )
{
a[i][j] = c ;
c++ ;
}
}
}
int* operator[] ( int i )
{
return a[i] ;
}
};
void main( )
{
emp e ;
cout << e[0][1] ;
}

The class emp has an overloaded operator [ ] function. It takes one argument an
integer representing an array index and returns an int pointer. The statement cout <<
e[0][1] ; would get converted into a call to the overloaded [ ] function as e.operator[ ]
( 0 ). 0 would get collected in i. The function would return a[i] that represents the
base address of the zeroeth row. Next the statement would get expanded as base
address of zeroeth row[1] that can be further expanded as *( base address + 1 ). This
gives us a value in zeroth row and first column.
13. What are formatting flags in ios class?
Ans: The ios class contains formatting flags that help users to format the stream data.
Formatting flags are a set of enum definitions. There are two types of formatting flags:
On/Off flags
Flags that work in-group
The On/Off flags are turned on using the setf( ) function and are turned off using the
unsetf( ) function. To set the On/Off flags, the one argument setf( ) function is used.
The flags working in groups are set through the two-argument setf( ) function. For
example, to left justify a string we can set the flag as,
cout.setf ( ios::left ) ;
cout << "KICIT Nagpur" ;
To remove the left justification for subsequent output we can say,
cout.unsetf ( ios::left ) ;
The flags that can be set/unset include skipws, showbase, showpoint, uppercase,
showpos, unitbuf and stdio. The flags that work in a group can have only one of these
flags set at a time.
14. What is the purpose of ios::basefield in the following statement?
cout.setf ( ios::hex, ios::basefield ) ;
Ans: This is an example of formatting flags that work in a group. There is a flag for
each numbering system (base) like decimal, octal and hexadecimal. Collectively, these
flags are referred to as basefield and are specified by ios::basefield flag. We can have
only one of these flags on at a time. If we set the hex flag as setf ( ios::hex ) then we
will set the hex bit but we won't clear the dec bit resulting in undefined behavior. The
solution is to call setf( ) as setf ( ios::hex, ios::basefield ). This call first clears all the
bits and then sets the hex bit.
15. Can we get the value of ios format flags?
Ans: Yes! The ios::flags( ) member function gives the value format flags. This function
takes no arguments and returns a long ( typedefed to fmtflags) that contains the

current format flags.


16. Is there any function that can skip certain number of characters present in the input
stream?
Ans: Yes! This can be done using cin::ignore( ) function. The prototype of this function
is as shown below:
istream& ignore ( int n = 1, int d =EOF ) ;
Sometimes it happens that some extra characters are left in the input stream while
taking the input such as, the ?\n? (Enter) character. This extra character is then
passed to the next input and may pose problem.
To get rid of such extra characters the cin::ignore( ) function is used. This is
equivalent to fflush ( stdin ) used in C language. This function ignores the first n
characters (if present) in the input stream, stops if delimiter d is encountered.
17. Write a program that implements a date class containing day, month and year as data
members. Implement assignment operator and copy constructor in this class.
Ans: This is shown in following program:
#include
class date
{
private :
int day ;
int month ;
int year ;
public :
date ( int d = 0, int m = 0, int y = 0 )
{
day = d ;
month = m ;
year = y ;
}
// copy constructor
date ( date &d )
{
day = d.day ;
month = d.month ;
year = d.year ;
}
// an overloaded assignment operator
date operator = ( date d )

{
day = d.day ;
month = d.month ;
year = d.year ;
return d ;
}
void display( )
{
cout << day << "/" << month << "/" << year ;
}
};
void main( )
{
date d1 ( 25, 9, 1979 ) ;
date d2 = d1 ;
date d3 ;
d3 = d2 ;
d3.display( ) ;
}

18. When should I use unitbuf flag?


Ans: The unit buffering (unitbuf) flag should be turned on when we want to ensure
that each character is output as soon as it is inserted into an output stream. The same
can be done using unbuffered output but unit buffering provides a better performance
than the unbuffered output.
19. What are manipulators?
Ans: Manipulators are the instructions to the output stream to modify the output in
various ways. The manipulators provide a clean and easy way for formatted output in
comparison to the formatting flags of the ios class. When manipulators are used, the
formatting instructions are inserted directly into the stream. Manipulators are of two
types, those that take an argument and those that don?t.
20. What is the difference between the manipulator and setf( ) function?
Ans: The difference between the manipulator and setf( ) function are as follows:
The setf( ) function is used to set the flags of the ios but manipulators directly insert
the formatting instructions into the stream. We can create user-defined manipulators
but setf( ) function uses data members of ios class only. The flags put on through the

setf( ) function can be put off through unsetf( ) function. Such flexibility is not
available with manipulators.
21. How do I get the current position of the file pointer?
Ans: We can get the current position of the file pointer by using the tellp( ) member
function of ostream class or tellg( ) member function of istream class. These functions
return (in bytes) positions of put pointer and get pointer respectively.
22. What are put and get pointers?
Ans: These are the long integers associated with the streams. The value present in the
put pointer specifies the byte number in the file from where next write would take
place in the file. The get pointer specifies the byte number in the file from where the
next reading should take place.
23. What do the nocreate and noreplace flag ensure when they are used for opening a
file?
Ans: nocreate and noreplace are file-opening modes. A bit in the ios class defines
these modes. The flag nocreate ensures that the file must exist before opening it. On
the other hand the flag noreplace ensures that while opening a file for output it does
not get overwritten with new one unless ate or app is set. When the app flag is set
then whatever we write gets appended to the existing file. When ate flag is set we can
start reading or writing at the end of existing file.
24. What is the limitation of cin while taking input for character array?
Ans: To understand this consider following statements,
char str[5] ;
cin >> str ;
While entering the value for str if we enter more than 5 characters then there is no
provision in cin to check the array bounds. If the array overflows, it may be
dangerous. This can be avoided by using get( ) function. For example, consider
following statement,
cin.get ( str, 5 ) ;
On executing this statement if we enter more than 5 characters, then get( ) takes only
first five characters and ignores rest of the characters. Some more variations of get( )
are available, such as shown below:
get ( ch ) ? Extracts one character only
get ( str, n ) ? Extracts up to n characters into str
get ( str, DELIM ) ? Extracts characters into array str until specified delimiter (such as
'\n'). Leaves delimiting character in stream.
get ( str, n, DELIM ) ? Extracts characters into array str until n characters or DELIM

character, leaving delimiting character in stream.


25. What is the purpose of istream class?
Ans: The istream class performs activities specific to input. It is derived from the ios
class. The most commonly used member function of this class is the overloaded >>
operator which can extract values of all basic types. We can extract even a string
using this operator.
26. Would the following code work?
#include
void main( )
{
ostream o ;
o << "Dream. Then make it happen!" ;
}
Ans: No! This is because we cannot create an object of the ostream class since its
constructor and copy constructor are declared private.
27. Can we use this pointer inside static member function?
Ans: No! The this pointer cannot be used inside a static member function. This is
because a static member function is never called through an object.
28. What is strstream?
Ans: strstream is a type of input/output stream that works with the memory. It allows
using section of the memory as a stream object. These streams provide the classes
that can be used for storing the stream of bytes into memory. For example, we can
store integers, floats and strings as a stream of bytes. There are several classes that
implement this in-memory formatting. The class ostrstream derived from ostream is
used when output is to be sent to memory, the class istrstream derived from istream
is used when input is taken from memory and strstream class derived from iostream is
used for memory objects that do both input and output. Ans: When we want to
retrieve the streams of bytes from memory we can use istrestream. The following
example shows the use of istrstream class.
#include
void main( )
{
int age ;
float salary ;
char name[50] ;
char str[] = "22 12004.50 K. Vishwanatth" ;

istrstream s ( str ) ;
s >> age >> salary >> name ;
cout << age << endl << salary << endl << name ;
cout << endl << s.rdbuf( ) ;
}
Here, s is the object of the class istrstream. When we are creating the object s, the
constructor of istrstream gets called that receives a pointer to the zero terminated
character array str. The statement s >> age >> salary >> name ; extracts the age,
salary and the name from the istrstream object s. However, while extracting the
name, only the first word of name gets extracted. The balance is extracted using
rdbuf( ).
29. When the constructor of a base class calls a virtual function, why doesn't the override
function of the derived class gets called?
Ans: While building an object of a derived class first the constructor of the base class
and then the constructor of the derived class gets called. The object is said an
immature object at the stage when the constructor of base class is called. This object
will be called a matured object after the execution of the constructor of the derived
class. Thus, if we call a virtual function when an object is still immature, obviously, the
virtual function of the base class would get called. This is illustrated in the following
example.
#include
class base
{
protected :
int i ;
public :
base ( int ii = 0 )
{
i = ii ;
show( ) ;
}
virtual void show( )
{
cout << "base's show( )" << endl ;
}
};
class derived : public base
{

private :
int j ;
public :
derived ( int ii, int jj = 0 ) : base ( ii )
{
j = jj ;
show( ) ;
}
void show( )
{
cout << "derived's show( )" << endl ;
}
};
void main( )
{
derived dobj ( 20, 5 ) ;
}
The output of this program would be:
base's show( )
derived's show( )
30. Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Ans: Yes, we can have a reference as a data member of a class. A reference as a data
member of a class is initialised in the initialisation list of the constructor. This is shown
in following program.
#include
class sample
{
private :
int& i ;
public :
sample ( int& ii ) : i ( ii )
{
}
void show( )
{
cout << i << endl ;
}

};
void main( )
{
int j = 10 ;
sample s ( j ) ;
s.show( ) ;
}
Here, i refers to a variable j allocated on the stack. A point to note here is that we
cannot bind a reference to an object passed to the constructor as a value. If we do so,
then the reference i would refer to the function parameter (i.e. parameter ii in the
constructor), which would disappear as soon as the function returns, thereby creating
a situation of dangling reference.
31. Why does the following code fail?
#include
class sample
{
private :
char *str ;
public :
sample ( char *s )
{
strcpy ( str, s ) ;
}
~sample( )
{
delete str ;
}
};
void main( )
{
sample s1 ( "abc" ) ;
}
Ans: Here, through the destructor we are trying to deal locate memory, which has
been allocated statically. To remove an exception, add following statement to the
constructor.
sample ( char *s )
{
str = new char[strlen(s) + 1] ;

strcpy ( str, s ) ;
}
Here, first we have allocated memory of required size, which then would get deal
located through the destructor.
32. assert( ) macro...
We can use a macro called assert( ) to test for conditions that should not occur in a
code. This macro expands to an if statement. If test evaluates to 0, assert prints an
error message and calls abort to abort the program.
#include
#include
void main( )
{
int i ;
cout << "\nEnter an integer: " ;
cin >> i ;
assert ( i >= 0 ) ;
cout << i << endl ;
}
33. Why it is unsafe to deal locate the memory using free( ) if it has been allocated using
new?
Ans: This can be explained with the following example:
#include
class sample
{
int *p ;
public :
sample( )
{
p = new int ;
}
~sample( )
{
delete p ;
}
};
void main( )
{
sample *s1 = new sample ;

free ( s1 ) ;
sample *s2 = ( sample * ) malloc ( sizeof ( sample
));
delete s2 ;
}
The new operator allocates memory and calls the constructor. In the constructor we
have allocated memory on heap, which is pointed to by p. If we release the object
using the free( ) function the object would die but the memory allocated in the
constructor would leak. This is because free( ) being a C library function does not call
the destructor where we have deal located the memory.
As against this, if we allocate memory by calling malloc( ) the constructor would not
get called. Hence p holds a garbage address. Now if the memory is deal located using
delete, the destructor would get called where we have tried to release the memory
pointed to by p. Since p contains garbage this may result in a runtime error.
34. Can we distribute function templates and class templates in object libraries?
Ans: No! We can compile a function template or a class template into object code (.obj
file). The code that contains a call to the function template or the code that creates an
object from a class template can get compiled. This is because the compiler merely
checks whether the call matches the declaration (in case of function template) and
whether the object definition matches class declaration (in case of class template).
Since the function template and the class template definitions are not found, the
compiler leaves it to the linker to restore this. However, during linking, linker doesn't
find the matching definitions for the function call or a matching definition for object
creation. In short the expanded versions of templates are not found in
the object library. Hence the linker reports error.
35. What is the difference between an inspector and a mutator ?
Ans: An inspector is a member function that returns information about an object's
state (information stored in object's data members) without changing the object's
state. A mutator is a member function that changes the state of an object. In the class
Stack given below we have defined a mutator and an inspector.
class Stack
{
public :
int pop( ) ;
int getcount( ) ;

}
In the above example, the function pop( ) removes top element of stack thereby
changing the state of an object. So, the function pop( ) is a mutator. The function
getcount( ) is an inspector because it simply counts the number of elements in the
stack without changing the stack.
36. Namespaces:
The C++ language provides a single global namespace. This can cause problems with
global name clashes. For instance, consider these two C++ header files:
// file1.h
float f ( float, int ) ;
class sample { ... } ;
// file2.h
class sample { ... } ;
With these definitions, it is impossible to use both header files in a single program; the
sample classes will clash.A namespace is a declarative region that attaches an
additional identifier to any names declared inside it. The additional identifier thus
avoids the possibility that a name will conflict with names declared elsewhere in the
program. It is possible to use the same name in separate namespaces without conflict
even if the names appear in the same translation unit. As long as they appear in
separate namespaces, each name will be unique because of the addition of the
namespace identifier. For example:
// file1.h
namespace file1
{
float f ( float, int ) ;
class sample { ... } ;
}
// file2.h
namespace file2
{
class sample { ... } ;
}
Now the class names will not clash because they become file1::sample and
file2::sample, respectively.
37. What would be the output of the following program?
#include
class user
{

int i ;
float f ;
char c ;
public :
void displaydata( )
{
cout << endl << i << endl << f << endl << c ;
}
};
void main( )
{
cout << sizeof ( user ) ;
user u1 ;
cout << endl << sizeof ( u1 ) ;
u1.displaydata( ) ;
}
Ans: The output of this program would be,
9 or 7
9 or 7
Garbage
Garbage
Garbage
Since the user class contains three elements, int, float and char its size would be 9
bytes (int-4, float-4, char-1) under Windows and 7 bytes (int-2, float-4, char-1) under
DOS. Second output is again the same because u1 is an object of the class user.
Finally three garbage values are printed out because i, f and c are not initialized
anywhere in the program.
Note that if you run this program you may not get the answer shown here. This is
because packing is done for an object in memory to increase the access efficiency. For
example, under DOS, the object would be aligned on a 2-byte boundary. As a result,
the size of the object would be reported as 6 bytes. Unlike this, Windows being a 32bit OS the object would be aligned on a 4-byte boundary. Hence the size of the object
would be reported as 12 bytes. To force the alignment on a 1-byte boundary, write the
following statement before the class declaration.
#pragma pack ( 1 )
38. Write a program that will convert an integer pointer to an integer and vice-versa.
Ans: The following program demonstrates this.
#include

void main( )
{
int i = 65000 ;
int *iptr = reinterpret_cast ( i ) ;
cout << endl << iptr ;
iptr++ ;
cout << endl << iptr ;
i = reinterpret_cast ( iptr ) ;
cout << endl << i ;
i++ ;
cout << endl << i ;
}
39. What is a const_cast?
Ans. The const_cast is used to convert a const to a non-const. This is shown in the
following
program:
#include
void main( )
{
const int a = 0 ;
int *ptr = ( int * ) &a ; //one way
ptr = const_cast_ ( &a ) ; //better way
}
Here, the address of the const variable a is assigned to the pointer to a non-const
variable. The const_cast is also used when we want to change the data members of a
class inside the const member functions. The following code snippet shows this:
class sample
{
private:
int data;
public:
void func( ) const
{
(const_cast (this))->data = 70 ;
}
};
40. What is forward referencing and when should it be used?
Ans: Forward referencing is generally required when we make a class or a function as

a friend.
Consider following program:
class test
{
public:
friend void fun ( sample, test ) ;
};
class sample
{
public:
friend void fun ( sample, test ) ;
};
void fun ( sample s, test t )
{
// code
}
void main( )
{
sample s ;
test t ;
fun ( s, t ) ;
}
On compiling this program it gives error on the following statement of test class. It
gives an error that sample is undeclared identifier. friend void fun ( sample, test ) ;
This is so because the class sample is defined below the class test and we are using it
before its definition. To overcome this error we need to give forward reference of the
class sample before the definition of class test. The following statement is the forward
reference of class sample.
class sample ;
41. How would you give an alternate name to a namespace?
Ans: An alternate name given to namespace is called a namespace-alias. namespacealias is generally used to save the typing effort when the names of namespaces are
very long or complex. The following syntax is used to give an alias to a namespace.
namespace myname = my_old_very_long_name ;
42. Using a smart pointer can we iterate through a container?
Ans: Yes. A container is a collection of elements or objects. It helps to properly
organize and store the data. Stacks, linked lists, arrays are examples of containers.
Following program shows how to iterate through a container using a smart pointer.

#include
class smartpointer
{
private :
int *p ; // ordinary pointer
public :
smartpointer ( int n )
{
p = new int [ n ] ;
int *t = p ;
for ( int i = 0 ; i <= 9 ; i++ )
*t++ = i * i ;
}
int* operator ++ ( int )
{
return p++ ;
}
int operator * ( )
{
return *p ;
}
};
void main( )
{
smartpointer sp ( 10 ) ;
for ( int i = 0 ; i <= 9 ; i++ )
cout << *sp++ << endl ;
}
Here, sp is a smart pointer. When we say *sp, the operator * ( ) function gets called.
It returns the integer being pointed to by p. When we say sp++ the operator ++ ( )
function gets called. It increments p to point to
the next element in the array and then returns the address of this new location.
43. Can objects read and write themselves?
Ans: Yes! This can be explained with the help of following example:
#include
#include
class employee
{

private :
char name [ 20 ] ;
int age ;
float salary ;
public :
void getdata( )
{
cout << "Enter name, age and salary of employee : " ;
cin >> name >> age >> salary ;
}
void store( )
{
ofstream file ;
file.open ( "EMPLOYEE.DAT", ios::app | ios::binary ) ;
file.write ( ( char * ) this, sizeof ( *this ) ) ;
file.close( ) ;
}
void retrieve ( int n )
{
ifstream file ;
file.open ( "EMPLOYEE.DAT", ios::binary ) ;
file.seekg ( n * sizeof ( employee ) ) ;
file.read ( ( char * ) this, sizeof ( *this ) ) ;
file.close( ) ;
}
void show( )
{
cout << "Name : " << name
<< endl << "Age : " << age
<< endl << "Salary :" << salary << endl ;
}
};
void main( )
{
employee e [ 5 ] ;
for ( int i = 0 ; i <= 4 ; i++ )
{
e [ i ].getdata( ) ;
e [ i ].store( ) ;

}
for ( i = 0 ; i <= 4 ; i++ )
{
e [ i ].retrieve ( i ) ;
e [ i ].show( ) ;
}
}
Here, employee is the class whose objects can write and read themselves. The
getdata( ) function has been used to get the data of employee and store it in the data
members name, age and salary. The store( ) function is used to write an object to the
file. In this function a file has been opened in append mode and each time data of
current object has been stored after the last record (if any) in the file.Function
retrieve( ) is used to get the data of a particular employee from the file. This retrieved
data has been stored in the data members name, age and salary. Here this has been
used to store data since it contains the address of the current object. The function
show( ) has been used to display the data of employee.
44. Why is it necessary to use a reference in the argument to the copy constructor?
Ans : If we pass the copy constructor the argument by value, its copy would get
constructed using the copy constructor. This means the copy constructor would call
itself to make this copy. This process would go on and on until the compiler runs out of
memory. This can be explained with the help of following example:
class sample
{
int i ;
public :
sample ( sample p )
{
i = p.i ;
}
};
void main( )
{
sample s ;
sample s1 ( s ) ;
}
While executing the statement sample s1 ( s ), the copy constructor would get called.
As the copy construct here accepts a value, the value of s would be passed which

would get collected in p. We can think of this statement as sample p = s. Here p is


getting created and initialized. Means again the copy constructor would get called. This
would result into recursive calls. Hence we must use a reference as an argument in a
copy constructor.
45. 46. Virtual Multiple Inheritance:
A class b is defined having member variable i. Suppose two classes d1 and d2 are
derived from class b and a class multiple is derived from both d1 and d2. If variable i
is accessed from a member function of multiple then it gives error as 'member is
ambiguous'. To avoid this error derive classes d1 and d2 with modifier virtual as
shown in the following program.
#include
class b
{
public :
int i ;
public :
fun( )
{
i=0;
}
};
class d1 : virtual public b
{
public :
fun( )
{
i=1;
}
};
class d2 : virtual public b
{
public :
fun( )
{
i=2;
}
};
class multiple : public d1, public d2

{
public :
fun( )
{
i = 10 ;
}
};
void main( )
{
multiple d ;
d.fun( ) ;
cout << d.i ;
}
46. Can we use this pointer in a class specific, operator-overloading function for new
operator?
Ans: No! The this pointer is never passed to the overloaded operator new() member
function because this function gets called before the object is created. Hence there is
no question of the this pointer getting passed to operator new( ).
47. Can we allocate memory dynamically for a reference?
Ans: No! It is not possible to allocate memory dynamically for a reference. This is
because, when we create a reference, it gets tied with some variable of its type. Now,
if we try to allocate memory dynamically for a reference, it is not possible to mention
that to which variable the reference would get tied.
48. When should I overload new operator on a global basis or a class basis?
Ans: We overload operator new in our program, when we want to initialize a data item
or a class object at the same place where it has been allocated memory. The following
example shows how to overload new operator on global basis.
#include
#include
void * operator new ( size_t s )
{
void *q = malloc ( s ) ;
return q ;
}
void main( )
{
int *p = new int ;

*p = 25 ;
cout << *p ;
}
When the operator new is overloaded on global basis it becomes impossible to
initialize the data members of a class as different classes may have different types of
data members. The following example shows how to
overload new operator on class-by-class basis.
#include
#include
class sample
{
int i ;
public :
void* operator new ( size_t s, int ii )
{
sample *q = ( sample * ) malloc ( s ) ;
q -> i = ii ;
return q ;
}
};
class sample1
{
float f ;
public :
void* operator new ( size_t s, float ff )
{
sample1 *q = ( sample1 * ) malloc ( s ) ;
q -> f = ff ;
return q ;
}
};
void main( )
{
sample *s = new ( 7 ) sample ;
sample1 *s1 = new ( 5.6f ) sample1 ;
}
Overloading the operator new on class-by-class basis makes it possible to allocate
memory for an object and initialize its data members at the same place.

49. How would you define a pointer to a data member of the type pointer to pointer?
Ans: The following program demonstrates this...
#include
class sample
{
public :
sample ( int **pp )
{
p = pp ;
}
int **p ;
};
int **sample::*ptr = &sample::p ;
void main( )
{
int i = 9 ;
int *pi = &i ;
sample s ( &pi ) ;
cout << ** ( s.*ptr ) ;
}
Here, ptr is the pointer to data member p of class sample, which in turn is a pointer
pointing to an int.
50. How do I write a code to catch multiple types of exceptions in one single catch block?
Ans: The following program demonstrates the use of a single catch block to catch
multiple exceptions.
#include
class test
{
};
class sample
{
public :
void fun1( )
{
throw 99 ;
}
void fun2( )
{

throw 3.14f ;
}
void fun3( )
{
throw "error" ;
}
void fun4( )
{
throw test( ) ;
}
};
void main( )
{
try
{
sample s ;
s.fun4( ) ;
s.fun1( ) ;
s.fun2( ) ;
s.fun3( ) ;
}
catch ( ... )
{
cout << "strange" ;
}
}
Here, different types of exceptions are thrown by the member functions of the class
sample. While catching the exception instead of four different catch blocks we can as
well define one single catch block. Note the syntax for defining the catch block, where
we have used three dots (?) in the formal parameter list. This indicates that any
thrown exception should get caught in the same catch block. When the exception is
thrown from the fun4( ) control reaches the catch block, ignoring the rest of the calls.
51. Can we return an error value from the constructor of a class?
Ans: No. We cannot return any error value from the constructor, as the constructor
doesn't have any return type. However, by throwing an exception we can pass value
to catch block. This is shown in the following example:
#include
class sample

{
public :
sample ( int i )
{
if ( i == 0 )
throw "error" ;
}
};
void main( )
{
try
{
sample s ( 0 ) ;
}
catch ( char * str )
{
cout << str ;
}
}
In this program, the statement throw "error" ; would throw an exception when an
object s of the class sample would get created. The catch block would collect the string
error.
52. How do I define the member function of a template class, which has to be defined
outside the template class. The function receives an object of its own class as a
parameter and returns the value of the same type.
Ans: The following example shows how we can define such a function.
sample sample::fun ( sample s )
{
// code
}
Here, the first sample indicates the return type of the function and the next sample is
used for the scope of function.
53. How name mangling can be prevented?
Ans: To avoid name mangling the function should be declared with an extern "C"
attribute. Functions declared as extern "C" are treated as C-style functions. Hence the
compiler does not mangle them. The following code snippet shows how to declare such
a function.
#include

extern "C" void display( )


{
cout << "See the effect of C in C++ " ;
}
void main( )
{
display( ) ;
}
54. Can we allocate memory dynamically for a reference?
Ans: No, it is not possible to allocate memory dynamically for a reference. A reference
is initialized at the time of creation. Trying to allocate memory dynamically for a
reference creates a problem in initializing it. Thus, the compiler does not allow us to
dynamically allocate the memory for references.
55. What is RTTI?
Ans: RTTI stands for 'Run Time Type Information'. We use virtual function mechanism
where we can call derived class's member functions using base class's pointer.
However, many times we wish to know the exact type of the object. We can know the
type of the object using RTTI. A function that returns the type of the object is known
as RTTI functions. C++ supports two ways to obtain information about the object's
class at run time, they are typeid( ) operator and dynamic_cast operator.
56. What is Data Conversion?
Ans: Assignments between types whether they are basic or user-defined, are handled
by the compiler. If the variables are of different basic types compiler calls a special
routine to convert the value. But if we want to convert between user-defined data type
and basic types we have to write conversion routine ourselves. A conversion routine to
convert user-defined data type string to integer is shown below:
class string
{
private :
char str[20] ;
public :
string( )
{
}
string ( char *s )
{
strcpy ( str, s ) ;

}
operator int( )
{
return 123 ; // Write logic to convert string to integer
}
};
main( )
{
string s2 = "123" ;
int i1 = int ( s2 ) ;
cout << endl << i1 ;
}
57. How to obtain type information using typeid( ) operator?
Ans: typeid( ) operator takes an object, a reference or a pointer and returns its type.
Following program shows how to use the typeid( ) operator.
#include
#include
class Base
{
public :
virtual void show( )
{
}
};
class Der1 : public Base
{
};
void main( )
{
Base *b1 ;
cout << endl << typeid ( b1 ).name( ) ;
Der1 d1 ;
b1 = &d1 ;
cout << endl << typeid ( *b1 ).name( ) ;
cout << endl << typeid ( 12 ).name( ) << endl << typeid ( 12.5 ).name( ) ;
}

The output of this program will be


Base*
Der1
int
double
RTTI operators must be used for polymorphic class (class having virtual function) only.
For non-polymorphic class static type information is returned.
58. How to use RTTI with class templates?
Ans: Templates can generate different classes. We may wish to get the type of class,
which we are working in. The following program shows how to use RTTI operator
typeid( ) with class template.
#include
#include
template
class base
{
public :
base( )
{
cout << typeid ( *this ).name( ) << "Constructor" << endl ;
}
T add ( T a, T b )
{
return a + b ;
}
~base( )
{
cout << typeid ( *this ).name( ) << "Destructor" << endl ;
}
};
void main( )
{
base b1 ;
cout << b1.add ( 10, 20 ) << endl ;
base b2 ;
cout << b2.add ( 5.5, 10.5 ) << endl ;
}
59. We can use following C++ operators for typecasting.static_cast is used for castless

conversions, narrowing conversions, conversion from void* and implicit type


conversions. const_cast is used to convert a const to a non-const. reinterpret_cast is
used to assign one kind of pointer to another.
60. What will be the output of the following program?
#include
class A
{
public :
A( )
{
cout << "Reached in Constructor\n" ;
}
};
void main( )
{
A a( ) ;
Ab;
}
Output : Reached in Constructor
Constructor gets called only once when the object b is created. When the statement A
a( ) ; gets executed constructor does not get called. This is because compiler takes
this statement as a prototype declaration of function a( ) that returns an object of
class A. However, if we pass arguments like
A a ( 10 ) ;
Compiler would search for one argument constructor and if not found would flash an
error.
61. What is a container?
Ans: A container is an object that holds other objects. Various collection classes like
List, Hash Table, AbstractArray, etc. are the examples of containers. We can use the
classes to hold objects of any derived classes. The containers provide various methods
using which we can get the number of objects stored in the container and iterate
through the objects stored in it.
62. Function template overloading
One can declare several function templates with the same name and even declare a
combination of function templates and ordinary functions with the same name. When
an overloaded function is called, overload resolution is necessary to find the right

function or template function to invoke.


For example:
template < class T > T sqrt ( T ) ;
template < class T > complex < T > sqrt ( complex < T > ) ;double sqrt (
double ) ;
void f ( complex < double > z )
{
sqrt ( 2 ) ; // sqrt < int > ( int )
sqrt ( 2.0 ) ; // sqrt ( double )
sqrt ( z ) ; // sqrt < complex < double > ( complex < double > )
}
In the same way that a template function is a generalization of the notion of a
function, the rules for resolution in the presence of function templates are
generalizations of the function overload resolution rules. Basically, for each template
we find the specialization that is best for the set of function arguments. Then we apply
the usual function overload resolution rules to these specializations and all ordinary
functions.
63. Exception Handling in C++
In C++ we can handle run-time errors generated by c++ classes by using three new
keywords: throw, catch, and try. We also have to create an exception class. If during
the course of execution of a member function of
this class a run-time error occurs, then this member function informs the application
that an error has occurred. This process of informing is called 'throwing' an exception.
The following code shows how to deal with exception handling.
class sample
{
public :
class errorclass
{
};
void fun( )
{
if ( some error occurs )
throw errorclass( ) // throws exception
}
};
//application
void main( )

{
try
{
sample s ;
s.fun( ) ;
}
catch ( sample::errorclass )
{
// do something about the error
}
}
64. Consider the following code:
#include
class base
{
public :
int data ;
};
class d1 : public base
{
};
class d2 : public base
{
};
class der : public d1, public d2
{
public :
void showdata( )
{
cout << data ;
}
};
void main( )
{
der d ;
d.showdata( ) ;
}
If you run this program it is bound to give you errors. This is because of the rules of

inheritance:
1. Each base class not specified virtual will have its own sub-object representing it. In
the above program, if we create object of d1 it will have a sub-object of class base
containing a data member data. If we create an object of class der it will have subobjects of classes d1 and d2 and both the sub-objects will refer to a separate copy of
data. Hence, to access data from class der we will have to mention the class name.
For example, d1::data or d2::data.
2. If we want that only one sub-object should exist we must use the concept of virtual
base class. The single object of this will represent every base class of given name that
is specified to be virtual
class. After making d1 and d2 as virtual base class if we create an object of der only
one sub-object would exist and so accessing data would no longer give us errors.
65. How to declare a pointer to a member function?
Ans: Suppose, I wish to declare a pointer to a member function that receives an int
and returns an int. I will have to declare it as int (A::* ) ( int ). Following is an
example.
#include
class A
{
public :
int fun ( int f )
{
cout << "in fun\n" ;
return f * f ;
}
};
typedef int ( A:: *pfun ) ( int ) ;
void main( )
{
pfun p = A::fun ;
Aa;
int s = ( a.*p ) ( 6 ) ;
cout << s ;
}

66. What is the disadvantage of a template function?


Ans: A template function cannot be distributed in the obj form. This is because, with
which parameters the template function is going to be called is decided at the run time
only. Therefore an obj form of a template function cannot be made by merely
compiling it.
67. How to declare a pointer to the data members of a class?
Ans: Following program shows how to declare a pointer to non-function members of a
class.
#include
class A
{
public :
int a ;
void print( )
{
cout << a ;
}
};
void main( )
{
int A::*pa = &A::a ;
A obj ;
obj.*pa = 20 ;
obj.print( ) ;
}
Here, we have initialised the data member a using the pointer pa.
68. How to allocate memory for a multidimensional array dynamically?
Ans: Many times we need to allocate memory for a multidimensional array
dynamically. Because of complexity of pointers many find this difficult. Following
program allocates memory for a 3 x 3 array dynamically, copies contents of a 3 x 3
array in it and prints the contents using the pointer.
#include
#include
int a[ ][3] = {
1, 2, 3,
4, 5, 6,

7, 8, 9
};
void main( )
{
int **p ;
p = new int *[3] ;
for ( int i = 0 ; i < 3 ; i++ )
p[i] = new int[3] ;
for ( i = 0 ; i < 3 ; i++ )
for ( int j = 0 ; j < 3 ; j++ )
p[i][j] = a[i][j] ;
for ( i = 0 ; i < 3 ; i++ )
{
for ( j = 0 ; j < 3 ; j++ )
cout << p[i][j] ;
cout << "\n" ;
}
}
69. When should we use the :: ( scope resolution ) operator to invoke the virtual
functions?
Ans: Generally, :: operator is used to call a virtual function from constructor or
destructor. This is because, if we call a virtual function from base class constructor or
destructor the virtual function of the base class would get called even if the object
being constructed or destroyed would be the object of the derived class. Thus,
whenever we want to bypass the dynamic binding mechanism we must use the ::
operator to call a virtual function.
70. How do I use operators .* and ->* in a program?
Ans: The following code snippet demonstrates the use of .* and ->* operators.
#include
class sample
{
public :
int i ;
void fun( )
{
cout << "fun" << endl ;
}
};

void ( sample::*pf )( ) = &sample::fun ;


int sample::*pdm = &sample::i ;
void main( )
{
sample s ;
sample *p = new sample ;
( s .* pf )( ) ;
( p ->* pf )( ) ;
s .* pdm = 1 ;
p ->* pdm = 2 ;
cout << s .* pdm << endl ;
cout << p ->* pdm << endl ;
}
In the above program pf is a pointer to a function fun( ) of class sample, and pdm is a
pointer to a data member i of the same class sample. The object s of the class sample
is created statically. Next, p is a pointer to an object created dynamically. The using
the operator .* and ->* the member functions are called and also the public data
member is accessed.
71. What happens when we add an int value to a user defined type of object?
Ans: Whenever an int value is added to an object of user defined type, the object
would search for an overloaded operator int( ). This operator must be defined in such
a way that it always returns an int value. However, we need not specify the return
type as on doing so the compiler flashes an error.
#include
class sample
{
int i ;
public :
sample ( )
{
i = 10 ;
}
operator int( )
{
return this -> i ;
}
};

void main( )
{
sample s ;
int i ;
i = s + 10 ;
cout << i ;
}
In the above program on adding 10 to an object s, the value of i would become 20.
72. Can we have a reference to an array?
Ans: Yes, we can have a reference to an array.
int a[ ] = { 8, 2, 12, 9 } ;
int ( &r ) [ 4 ] = a ; // reference to an array
Here, r is a reference to an array of four elements. We can even print the elements of
array with the help of reference. This is shown in the following code segment:
for ( int i = 0 ; i < 4 ; i++ )
cout << r [i] << endl ;
73. When friend function becomes indispensable...
Ans: Consider the following program.
#include
class distance
{
private :
int feet ;
public :
distance( )
{
feet = 0 ;
}
distance ( int f )
{
feet = f ;
}
distance operator + ( distance x )
{
int f = feet + x.feet ;
return distance ( f ) ;
}

};
void main( )
{
distance d1 ( 20 ), d2, d3 ;
d2 = d1 + 10 ;
d3 = 10 + d2 ;
}
If you run this program it is bound to give errors. The error lies in the statement d3 =
10 + d2 ; We may think that since we have overloaded + operator this statement
would add 10 to d2. But this does not happen. This is because the specified statement
will get converted as d3 = 10.operator+ ( d2 ) ; This means that this statement
should call the operator+( ) function that takes an object of distance class as
parameter written in
the float class, which is not possible. The solution is to write operator+( ) as a 'friend'
function. Declare operator+ function in distance class as given below:
friend distance operator + ( distance x1, distance x2 ) ;
and define it outside the class as shown below:
distance operator + ( distance x1, distance x2 )
{
int f = x1.feet + x2.feet ;
return distance ( f ) ;
}
When compiler would see that the 'friend' operator+( ) function is available it would
convert the statement d3 = 10 + d2 as operator+ (10, d2 ). Now since 10 is passed
as a parameter not as a calling object there would be no error. Thus in such cases
'friend' function becomes indispensable.
74. How to use a memory as a stream?
Ans: Suppose, details of an employee such as name, designation, age, etc. are stored
in different types of variables. Now, if we wish to concatenate these details in a
character array we will have to use various string manipulation functions like strcpy( )
and strcat( ). Instead of using these functions we can use more easy and clean way to
gather the details in the char array in the form of streams. We can declare the
memory allocated for the array as stream and use the << operator to store variables
having different types in this memory. Following program shows how to achieve this.
#include
void main( )
{
char buff [50] ;

char str[ ] = "Sanjay" ;


char desig[ ] = "Manager" ;
char jd[ ] = "27/12/1995" ;
int age = 35 ;
ostrstream o ( buff, sizeof ( buff ) ) ;
o << str << endl << desig << endl << jd << endl << age << ends ;
cout << buff ;
}
As shown in the program we can also use the manipulators and formatting flags. The
output of this program will be:
Sanjay
Manager
27/12/1995
35
75. How would you declare and initialize reference to a data member?
Ans: Sometimes we may need to declare a data member, which is a reference to
another data member of the class as shown below:
class A
{
public :
char *p ;
char *&rp ;
};
We can't initialize a reference to a data member at the time of declaration. It should
be initialized using 'member wise initialization as shown below.
#include
class A
{
public :
char *p ;
char *&rp ;
A( ) : rp ( p )
{
p = "" ;
}
A ( char *s ) : rp ( p )
{
p=s;

}
};
void main( )
{
A a ( "abcd" ) ;
cout << a.rp ;
}
76. iostream library has made it easy to read data from various input devices and write
data to the output devices. The following program shows how to print a disk file
'data.dat' on the printer using stream classes. Every hardware device has a familiar
name given by the operating system. The printer is generally connected to the first
parallel port. So, the file name for the printer should be PRN or lpt1.
#include
void main( )
{
ifstream i ( "data.dat" ) ;
ofstream o ;
o.open ( "PRN" ) ;
char ch ;
while ( 1 )
{
i.get ( ch ) ;
if ( i.eof( ) )
break ;
o.put ( ch ) ;
}
o.put ( '\x0C' ) ;
}
77. We know that a destructor is automatically called when an object of a class goes out of
scope. There is another case where destructor is called automatically. If an object is
created in a try block and an exception is thrown after the object is created, then the
destructor is called automatically.

78. Can a function call be at the left hand side of the assignment operator?
Ans: Yes. Following program shows how it is possible.
#include

class ref
{
private :
struct data
{
int a ; char *p ;
} d1, d2 ;
public :
data &set ( )
{
return d1 ;
}
data &get ( )
{
cin >> d2.a >> d2.p ;
return d2 ;
}
};
void main( )
{
ref r ;
r.set( ) = r.get( ) ;
r.print( ) ;
}
In the above program the functions get( ) and set( ) both return a reference to the
object of the structure data. We have assigned the reference returned by get( ) to the
reference returned by set( ) function. That is, we are assigning d2 to d1. So, the
values of d2 would get assigned to d1. You can check this out by printing the values of
d1.
79. If a class contains a virtual function a pointer called VPTR is created. This VPTR
becomes a part of every object of that class. The first two bytes (in DOS) are occupied
by VPTR. We can prove this by displaying the first two bytes of memory allocated for
the objects. Following program shows how this can be achieved.
#include
class vir
{
public :
virtual void f( )

{
}
};
void main( )
{
vir v, v1 ;
int *p1 = ( int* ) &v ;
int *p2 = ( int* ) &v1 ;
cout << endl << *p1 << " " << *p2 ;
}

80. Exception Handling in C++


In C++ we can handle run-time errors generated by c++ classes by using three new
keywords: throw, catch, and try. We also have to create an exception class. If during
the course of execution of a member function of
this class a run-time error occurs, then this member function informs the application
that an error has occurred. This process of informing is called 'throwing' an exception.
The following code shows how to deal with exception handling.
class sample
{
public :
class errorclass
{
};
void fun( )
{
if ( some error occurs )
throw errorclass( ) // throws exception
}
};
//application
void main( )
{
try
{
sample s ;
s.fun( ) ;
}

catch ( sample::errorclass )
{
// do something about the error
}
}
81. Accessing a private data member from a different Object...Different objects of the
same class can access each other's members, even if these members are private. For
example:
#include < iostream.h >
class sample
{
float f ;
public :
sample ( float ff )
{
f = ff ;
}
void fun ( sample* objptr )
{
objptr -> n = 0 ;
cout << "Value of this objects f is : " << f << endl ;
cout << "Value of other objects f" << objptr -> n << endl ;
} // another object's private member!
};
void main( )
{
sample s1 ( 6.5f ) , s2 ( 2.5f ) ;
s1.f ( &s2 ) ; // s1 changes s2's n
}
Typically, this coding style should be avoided. However, you should be aware that
private members of an object can be changed by another object of the same type.
Therefore, in certain special conditions, this coding style may be useful.

82. Can you access private data members of a class from out side the class?
Ans: Yes. This program shows how.
#include
class emp

private :
int i ;
public :
emp( )
{
i = 10 ;
}
};
void main( )
emp *p = new emp ;
int *pi = (int*) p ;
cout << *pi ;
*pi = 20 ;
cout << *pi ;
}
The pointer to the class is typecasted in an integer pointer. With the help of this
pointer private data member 'i' is accessed in main( ).
83. Why creating array of references is not possible?
Ans: The array name always refers or points to the zeroeth element. If array is of
references then the array name would point to the zeroeth element which happens to
be a reference. Creating pointer to a reference is not valid. So, creating array of
references too is not possible.
84. How do I call a virtual function of a class using a pointer to a function ?
Ans :
#include
class Cvirtual
{
public :
virtual float vfun( )
{
cout << "from vfun" << endl ;
return 7.03f ;
}
};
void main( )
{
Cvirtual obj ;

int **p = ( int ** ) &obj ;


float ( *pf1 ) ( ) ;
pf1 = ( float ( * ) ( ) ) **p ;
float f = ( *pf1 ) ( ) ;
cout << "return val = " << f << endl ;
}
In the above program class Cvirtual consists of a virtual function vfun(). In variable p
we have stored the address of an object of class Cvirtual. While doing so, we have
type casted the address of obj to int **, because obj holds a hidden data member
called vptr, which in turn holds the address of virtual function vfun( ). In pf1, a pointer
to a function, we are collecting the address of the virtual function vfun( ). Thus the
value returned by vfun( ) would then get collected in f.
85. Why an overloaded new operator defined in a class is static?
Ans: An overloaded new function is by default static even if it is not declared so. This
is because non-static member functions can be called through an object only. But
when an overloaded new operator function gets called the object doesn't stand
created. Since new operator function itself is responsible for creating the object. Hence
to be able to call a function without an object, the function must be static.
86. What is a pure virtual destructor?
Ans: Like a pure virtual function we can also have a pure virtual destructor. If a base
class contains a pure virtual destructor it becomes necessary for the derived classes to
implement the destructor. An ordinary pure virtual function does not have a body but
pure virtual destructor must have a body. This is because all the destructors in the
hierarchy of inheritance are always called as a part of destruction.
87. When we are required to find offset of an element within a structure? or, how do we
call the function of an outer class from a function in the inner class? (The inner class is
nested in the outer class)
Ans:
#include
class outer
{
int i ;
float f ;
public :
class inner
{

public :
infunc( )
{
outer *pout ;
pout = (outer*) this - ( size_t ) &( ( ( outer* ) 0 ) -> in ) ;
pout -> outfunc( ) ;
}
};
inner in ;
outfunc( )
{
cout << "in outer class's function" ;
}
};
void main( )
{
outer out ;
out.in.infunc( )
}
In the above example we are calling outer::outfunc( ) from inner::infunc(). To call
outfunc( ) we need a pointer to the outer class. To get the pointer we have subtracted
offset of the inner class's object (base address of outer class's object - address of
inner class's object) from address of inner class's object.
88. void f ( float n, int i = 10 ) ;
void f ( float a ) ;
void main( )
{
f ( 12.6 ) ;
}
void f ( float n, int i )
{
}
void f ( float n )
{

}
The above program results in an error (ambiguous call) since without the default
argument the two functions have arguments that are matching in number, order and
type.
89. Some programs need to exercise precise control over the memory areas where data is
placed. For example, suppose we wish to read the contents of the boot sector into a
structure. For this the byte arrangement of the
structure elements must match the arrangement of various fields in the boot sector of
the disk.
The #pragma pack directives offer a way to fulfill this requirement. The #pragma pack
directive specifies packing alignment for structure and union members. The #pragma
takes effect at the first structure or union declaration after the #pragma is seen.
Consider the following structure:
#pragma pack (1)
struct emp
{
int a ;
float s ;
char ch ;
};
#pragma pack( )
Here, #pragma pack ( 1 ) lets each structure element to begin on a 1-byte boundary.
Hence the size of the structure will be 9. (int - 4, float - 4, char - 1). If we use
#pragma pack ( 2 ) each structure element can begin on a 2-byte boundary. Hence
the size of the structure will be 10. (int - 4, float - 4, char - 2).
90. How to restrict a friend class's access to the private data members?
Ans: If we declare a class as a friend of our class the friend class can access the
private data members of our class. However, if we want we can restrict this access to
some selective functions of the class. Following program shows how to achieve this:
#include
class X
{
public :
void print ( class Z &z ) ;
};
class Z
{
private :

int i ;
public :
Z ( int ii )
{
i = ii ;
}
friend X::print ( class Z &z ) ;
};
void X::print ( Z &z1 )
{
cout << z1.i ;
}
main( )
{
Z z ( 10 ) ;
Xx;
x.print ( 10 ) ;
}
In the above program only the X::print( ) function can access the private data
members of class Z.
91. What is name mangling?
Ans: C++ enables you to assign the same function name to more than one functions
but with different parameter types. This feature is called function overloading. But
when we give several functions the same name, how does the compiler decide which
particular function is to be called? C++ solves this problem by applying a process
called name mangling. Name mangling applies a decorated name to the function. The
mangled name includes tokens that identify the functions' return type and the types of
its arguments.
class test
{
public :
void fun ( int a, char b ) ;
void fun ( char *c, float y ) ;
};
void main( )
{
test s1 ;

s1.fun ( 65, 'A' ) ;


s1.fun ( "Anil", 5.5f ) ;
}
At the time of resolving the calls to fun( ) function the linker would not be able to find
the definition of the overloaded function fun( ) and it would report an error. If you look
at these errors you will see the mangled names like, (?fun@test@@QAEXJJ@Z) and (?
fun@test@@QAEXMM@Z). Note that different compilers may use different name
mangling schemes.
92. How would you call a C function from C++ code?
Ans: Using extern "C".
The function prototype must be preceded by extern "C". More than one C functions
can be grouped inside braces as shown below:
extern "C"
{
void f( ) ;
void f1( ) ;
}
// In cfunc.c
#include
void f( )
{
printf ( "in f( )" ) ;
}
// In func.cpp
#include
extern "C" void f( ) ;
void main( )
{
f( ) ;
}
Ensure that both .c and .cpp files are in the same project.
93. How to restrict the number of floating-point digits displayed ?
Ans: When we display floating-point values, we can use the setprecision manipulator
to specify the desired number of digits to the right of the decimal point.
For example,
cout << setprecision ( 3 ) << 12.34678 ;
This statement would give the output as 12.347.

94. What is a wild pointer ?


Ans: A wild pointer is the one that points to a garbage value. For example, an
uninitialized pointer that contains garbage value or a pointer that refers to something
that no longer exists.
95. How friend function helps to increase the versatility of overloaded operators?
Ans: Consider the following statement,
s2 = s1 * 2 ;
where, s1 and s2 are objects of sample class. This statement would work if the
overloaded operator * ( sample s ) or conversion function is provided in the class.
Internally this statement would get converted to,
s2 = s1.operator * ( 2 ) ;
The function materializes because it is called with an object s1. The this pointer of s1
would get passed implicitly. To collect 2 in s, first the compiler would call the oneargument constructor, then it would build a
nameless object, which then would get collected in s. However, if we write the above
statement as,
s2 = 2 * s1 ;
then it won't compile. This is because the call now would get treated as,
s2 = 2.operator * ( s1 ) ;
and 2 is not an object. The friend function helps to get rid of such a situation. This is
shown in the following program.
#include
class sample
{
private :
int i ;
public :
sample ( int ii = 0 )
{
i = ii ;
}
void showdata( )
{
cout << i << endl ;
}
friend sample operator * ( sample, sample ) ;
};
sample operator * ( sample s1, sample s2 )

{
sample temp ;
temp.i = s1.i * s2.i ;
return ( temp ) ;
}
void main( )
{
sample s1 ( 10 ), s2 ;
s2 = s1 * 2 ;
s2.showdata( ) ;
s1 = 2 * s2 ;
s1.showdata( ) ;
}
Here the operator *( ) function takes two parameters. This is because the operator
function is no longer a member function of the class. It is a friend of the class sample.
Thus the statement s2 = s1 * 2 ; would not take the form s2.operator * ( 2 ). This
example shows that using friend permits the overloaded operators to be more
versatile.
96. What is a const_cast?
Ans: The const_cast is used to convert a const to a non-const. This is shown in the
following program.
#include
void main( )
{
const int a = 0 ;
int *ptr = ( int * ) &a ; // one way
ptr = const_cast ( &a ) ; // better way
}
Here, the address of the const variable a is assigned to the pointer to a non-const
variable. The const_cast is also used when we want to change the data members of a
class inside the const member functions. The following code snippet shows how to do
this.
class sample
{
private :
int data ;

public :
void fun( ) const
{
( const_cast ( this ) ) -> data = 70 ;
}
};
97. Using a smart pointer we can make an object appear like a pointer.
If a class overloads the operator -> then any object of that class can appear like a
pointer when the operator -> ( ) is called. The following program illustrates this.
#include
class test
{
public :
void fun( )
{
cout << "fun of smart pointer" ;
}
};
class smartpointer
{
test t ;
public :
test* operator ->( )
{
return &t ;
}
};
void main( )
{
smartpointer sp ;
sp -> fun( ) ;
}
The beauty of overloading operator -> is that even though sp is an object we can
make it work like a pointer. The operator -> ( ) returns the address of the object of
the type test. Using this address of the test object the function fun( ) of the class test
gets called. Thus even though fun( ) is not a member of smartpointer class we can still
call it using sp.
98. Can we apply delete on this pointer inside a member function?

Ans : Yes! If the member function of a class is called using a pointer to an object,
which is allocated dynamically, the object would get deleted. But if the member
function is called using the object, which is allocated statically, then a runtime error
would occur. This is because we cannot call delete on statically allocated objects. This
is illustrated in the following example.
class sample
{
private :
int i ;
public :
void fun( )
{
delete this ;
}
};
void main( )
{
sample *s = new sample ;
s -> fun( ) ; // no error
sample s1 ;
s1.fun( ) ; // would throw a runtime error
}
99. Why can't data members of a class be initialized at the time of declaration as given in
the following code?
class emp
{
private :
int j = 10 ;
};
Ans: Memory for data members of a class is allocated only when object of that class is
created. One cannot store data in a memory location, which does not exist at all.
Therefore initialization at the time of declaration
is not possible.
100.

Why in a copy constructor an object is collected in a reference to object as

shown below?

#include
class emp
{
public :
emp( )
{
}
emp ( emp& )
{
cout << "copy" ;
}
};
void main( )
{
emp e ;
emp e1 = e ;
}
Ans: A copy constructor is called when an object is created and initialised at the same
time. It is also called when object is passed to a function. So, If we pass the object to
copy constructor copy constructor would get called recursively. Thus it will stuck up in
an infinite loop.
101.

What is Early Binding and Dynamic Binding?

Ans: The term binding refers to the connection between a function call and the actual
code executed as a result of the call. Early Binding: If which function is to be called is
known at the compile-time it is known as static or early binding. Dynamic Binding: If
which function is to be called is decided at run time it is called as late or dynamic
binding. Dynamic binding is so called because the actual function called at run-time
depends on the contents of the pointer. For example, call to virtual functions, call to
functions to be linked from dlls use late binding.
102.

When can we use the function ostrstream::freeze( )?

Ans: While outputting data to memory in the in-memory formatting we need to create
an object of the class ostrstream. The constructor of ostrstream receives the address
of the buffer but if we want that the ostrstream
object should do its own memory management then we need to create an ostrstream
object with no constructor arguments as:
ostrstream s ;
Now s will do its own memory management. We can stuff as many bytes into it as we
want. If it falls short of memory, it will allocate more memory. If it cannot, it may

even move the block of memory. When the object goes out of scope, the heap storage
is automatically released. This is a more flexible approach if we do not know how
much space we are going to need. If we want the physical address of the memory
used by s we can obtain it by calling the str( ) member function:
char* p = s.str( ) ;
Once str( ) has been called then the block of memory allocated by ostrstream cannot
be moved. This is logical. It can't move the block since we are now expecting it to be
at a particular location. In such a case we
say that ostrstream has freezed itself. Once frozen we can't add any more characters
to it. Adding characters to a frozen ostrstream results in undefined behavior. In
addition, the ostrstream is no longer responsible for cleaning up the storage. You took
over that responsibility when you asked for the char * with str( ). We can clean the
storage in two ways: Using the delete operator as shown below:
ostrstream s ;
char *p ;
p = s.str( ) ;
delete p ;
By unfreezing the ostrstream. You do this by calling freeze( ), with an argument 1.
During freezing it is called with the default argument of 0.

Enter Your Comments

1. How many butes does an array A(1:8,-2:2,1:5) require for storage if each element of the
array is 24 bits long.
200 480 600 800 none
2. begin
i:=0;
j:=0; | block d
loop:
if(i != 0)
i := i-1;
else
i := i+1;
i := i+1; | block a
j := j+1; | block b
if (j <= 25)
goto loop;
end | block c
a) What is the value of i at [c]
2?
b) How many times is the goto executed
25 ?
c) How many times is the loop executed if i is initialized to 1
in [d] 26
d) How many times is the loop entered if the block [b] is changed

to j=j+1 ?
e) What is the value of i at [c] interchanging blocks [a] and [b] ?
2?
Follow the instructions given below [ From 1 to 8 ]
1. A cause B or C but not both
2. F occurs only if B occurs
3. D occurs if B or C occurs
4. E occurs if only c occurs
5. J occurs only if E or F occurs
6. H occurs if E occurs
7. D causes G, H or Both.
8. G occurs if F occurs.
Questions
--------1. If A occurs which of the following may occur
1. F & G (ii) E & H (iii) D
Ans
(a) 1 only (b) 2 only (c) 3 only (d) 1,2,3 or 2 & 3 but not 1
(e) 1,2 & 3
2. If B occurs which must occur
Ans
(a) F & G (b) D & G (c) D (d) G & H (e) J
3. If J occurs which must occur
Ans
(a) E (b) Both E & F (c) Either B or C (d) B (e) Both B & c
4. Which may occur as a result by a cause not mentioned.
(I) D (II) A (III) F
Ans
(a) I only (b) II (c) I & II (d) II & III (e) I,II,III
5. If E occurs which cannot occur.
(a) F (b) A (c) D (d) C (e) J
1) A - G are 7 consecutive +ve integers not necessarily in the same order
1) B is the middle number
2) D is 3 less than c
3) the difference between F & A is equal in magnitude and sign to the difference between E &
C
4) Neither F nor C lie between E & G
a) What is the value of B-F
1 2 -1 -2 cannot be determined
b) which is greatest
F C A E cannot be determined
c) Given both A & B are primes what is the lowest value of E
8 6 9 12 cannot
2) Given that a,b,c,d,e each represent one of the digits between
1-9 and that the following multiplication holds
abcde
4
---------edcba
1) Find the output for the following C program
main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);

while(*p2++=*p1++);
printf("%s\n",p2);
}
Ans. An empty string
2) Find the output for the following C program
main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
Ans. 57 94
3) Find the output for the following C program
main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
Ans. 5 20 1
4) Find the output for the following C program
#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
Ans. 10 5
5) Find the output for the following C program
main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Ans. Samco Systems
6) Find the output for the following C program
#include<stdio.h>
main()
{
char s1[]="Ramco";

char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Ans. Compilation error giving it cannot be an modifiable 'lvalue'
7) Find the output for the following C program
#include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}Ans. RamcoSystems
8) Find the output for the following C program given that
[1]. The following variable is available in file1.c
static int average_float;
Ans. All the functions in the file1.c can access the variable
9) Find the output for the following C program
# define TRUE 0
some code
while(TRUE)
{
some code
}
Ans. This won't go into the loop as TRUE is defined as 0
10) Find the output for the following C program
main()
{
int x=10;
x++;
change_value(x);
x++;
Modify_value();
printf("First output: %d\n",x);
}
x++;
change_value(x);
printf("Second Output : %d\n",x);
Modify_value(x);
printf("Third Output : %d\n",x);
}
Modify_value()
{
return (x+=10);
}
change_value()
{
return(x+=1);
}
Ans. 12 1 1
Sample Test Paper

C test

1.

if(fp == fopen(\"dfas\",\"r\") = = NULL), what is the value of fp


a. NULL
b. 0
c. 1
d. 0 or 1

2.

#define sqr(x) x*x, what is value of j if j == 2 * sqr(3 + 4)

3.

#define FILENAME(extension) test_##extension, how will it print

FILENAME(back)
a. test_back
b. test_#back
c. test_##back
d. ??

4.

char *p == \"hello world\"

p[0] == \'H\', what will be printf(\"%s\", p);


a. Hello world
b. hello world
c. H
d. compile error

5.

int fun(), how do u define pointer to this function ??

6.

what is ment by int (* xyz)[13]

7.

what is true from

a. base call ferernece is compatible with child class


b. child class reference is compatible with base class
c. no reference to class

d. ??

8.

class b

{
}
class a
{
class b

friend

}
then what is ture
a. a can access all protected and public members in b
b. b can access all protected and public members in a
c. a can access all members of a
d. b can access all members of b
9.

What is the output

#include
main()
{
int n=0;
int i;
i=2;
switch(1)
{
case 0:do{
case 1:n++;
case 2:n++;
}
while(--i>0);
}
printf(\"n==%d\",n);
}

a. compile error
b. 4
c. 1
d. 0
Mathematics
10.

Two liquids A : B in ratio 7:5 and now 24 gallons drain out and b is added

the

ratio becomes 5:7 what is containr capacity ? 30, 48 , 84, none


11.

man has rope of length 660 mtr to fence a area , what is the max area he

can fence ?

12.

Son

is about to celebrate 10th birthday. after 11 years his age will be half

the average of his parents. his mother is 17 years older to him. what is the age of
the father.
13.

DI question where hotels project are given and no of rooms in each

hotels , investment , project yr . and company name


were asked to find min cost per room is for which hotel , which avg cost per room
etc.
14.

Avg of 6 no is 8 what 7 th no shud be added to make avg 10;

15.

difference of cube of a no and its square is a perfect square , what is the

no. -> 5

16.

diff of three consecutive nos square and the nos is 214; find the nos :

Interview Technical
17.

Write a minimal C++ program .

18.

(a) Talk about yourself

(b) What are your strengths.


(c) Where do you think you have to improve.
(d) Where do you see yourself after 5 years

19.

main()

{
int i==2;
int a==4;
if((i+==3)>a)
{
printf( \" TRUE \");
}
else
{
printf(\"FALSE \");
}
}
What is the output of the program ..
Ans ) TRUE , coz i+==3 becomes incremented and i becomes 5 . So i is greater than a

20.

What is an OS ?

21.

What is a Data Structure ?

22.

It is a an abstract data type where some operations can be defined and

performed on the data. It makes the task of a programmer easy coz it has all the set of
data and operations at a particular place
23.

What is OOP.

24.

What is Object Oriented Analysis and design.

25.

How do u communicate between object and class.

26.

What is the role Software in the real life in current scenario.

27.

What is object and how it is similar to real life entity

28.

What is extranet, intranet, internet

HR interview..
29.

Ok, what do your friends call u???

30.

how many friends do u have???

31.

Do u talk with girls???

32.

How many girl friends do u have???

33.

whatz the difference of a girlfriend from a girl who is a friend???

34.

what do u do on sundays???

35.

Do u like hyderabad???

36.

whatz so special about it???

37.

what places have u got to visit in hyd...???

38.

how many of them have u gone to???

Adope placement paper


The test predominantly consists of algorithm questions and a lot of questions on trees.
Some questions are:
C test:
Q1) linked list using recursion.
Q2) Find if a number is divisible my 3, without using %,/ or *. You can use atoi().
Q3) 2 integers A and B are given, find the no of bits that need to be flipped in A to get B. ( xor
a and b and count the number of bits)
Q4) Write a Rotate function for rotating elements in an array, using a reverse function.
Q5) Given 2 sorted arrays A and B with duplicate elements, get C= A -B and does not have
duplicates(use a variation of merging 2 arrays and then remove the duplicates.)
Q6) Some routines to swap int pointers.
Q7) Subtraction of 2 base 13 numbers.
Q8) Min and max nodes of a quad tree.
Q9) Prove that in a tree no of internal nodes is one less than leaves.
Q10) A couple of boolean logic proofs
Q11) Code to see if a binary tree is a BST or not.

Q12) Switch case program out put


Engineering test:
Most of it had algorithms( no code)
Q1) Given an array with some repeating numbers. Like 12,6,5,12,6
output: 12,12,6,6,5
12 shud come before 6 since it is earlier in list. So cant use a dictionary.
Q2) Implement a dictionary manually with a lil overhead.
Q3)finding nth element from end in a list
Q4)inserting an element into a sorted linked list.
In the anal part many questions were based on the rule that square root of 25 is +5/-5. Not
just 5. Similarly for 1.
Geometry the questions were a lil bit tricky, but they are few that u can ignore them.

What will be the output of the following code?


1.

void main ()
{ int i = 0 , a[3] ;
a[i] = i++;
printf (?%d",a[i]) ;
}
Ans: The output for the above code would be a garbage value. In the statement a[i] =
i++; the value of the variable i would get assigned first to a[i] i.e. a[0] and then the
value of i would get incremented by 1. Since a[i] i.e. a[1] has not been initialized, a[i]
will have a garbage value

2.

Why doesn't the following code give the desired result?


int x = 3000, y = 2000 ;
long int z = x * y ;
Ans: Here the multiplication is carried out between two ints x and y, and the result
that would overflow would be truncated before being assigned to the variable z of type
long int. However, to get the correct output, we should use an explicit cast to force
long arithmetic as shown below:
long int z = ( long int ) x * y ;
Note that ( long int )( x * y ) would not give the desired effect.

3.

Why doesn't the following statement work?


char str[ ] = "Hello" ;
strcat ( str, '!' ) ;
Ans: The string function strcat( ) concatenates strings and not a character. The basic
difference between a string and a character is that a string is a collection of
characters, represented by an array of characters whereas a character is a single
character. To make the above statement work writes the statement as shown below:
strcat ( str, "!" ) ;

4.

How do I know how many elements an array can hold?


Ans: The amount of memory an array can consume depends on the data type of an
array. In DOS environment, the amount of memory an array can consume depends on
the current memory model (i.e. Tiny, Small, Large, Huge, etc.). In general an array
cannot consume more than 64 kb. Consider following program, which shows the
maximum number of elements an array of type int, float and char can have in case of
Small memory model.
main( )
{
int i[32767] ;
float f[16383] ;
char s[65535] ;
}

5.

How do I write code that reads data at memory location specified by segment and
offset?
Ans: Use peekb( ) function. This function returns byte(s) read from specific segment
and offset locations in memory. The following program illustrates use of this function.
In this program from VDU memory we have read characters and its attributes of the
first row. The information stored in file is then further read and displayed using peek( )
function.
#include
#include
main( )
{
char far *scr = 0xB8000000 ;
FILE *fp ;
int offset ;
char ch ;
if ( ( fp = fopen ( "scr.dat", "wb" ) ) == NULL )

{
printf ( "\nUnable to open file" ) ;
exit( ) ;
}
// reads and writes to file
for ( offset = 0 ; offset < 160 ; offset++ )
fprintf ( fp, "%c", peekb ( scr, offset ) ) ;
fclose ( fp ) ;
if ( ( fp = fopen ( "scr.dat", "rb" ) ) == NULL )
{
printf ( "\nUnable to open file" ) ;
exit( ) ;
}
// reads and writes to file
for ( offset = 0 ; offset < 160 ; offset++ )
{
fscanf ( fp, "%c", &ch ) ;
printf ( "%c", ch ) ;
}
fclose ( fp ) ;
}
6.

How do I compare character data stored at two different memory locations?


Ans: Sometimes in a program we require to compare memory ranges containing
strings. In such a situation we can use functions like memcmp( ) or memicmp( ). The
basic difference between two functions is that memcmp( ) does a case-sensitive
comparison whereas memicmp( ) ignores case of characters. Following program
illustrates the use of both the functions.
#include
main( )
{
char *arr1 = "Kicit" ;
char *arr2 = "kicitNagpur" ;
int c ;
c = memcmp ( arr1, arr2, sizeof ( arr1 ) ) ;
if ( c == 0 )
printf ( "\nStrings arr1 and arr2 compared using memcmp are identical" ) ;
else
printf ( "\nStrings arr1 and arr2 compared using memcmp are not identical"

);
c = memicmp ( arr1, arr2, sizeof ( arr1 ) ) ;
if ( c == 0 )
printf ( "\nStrings arr1 and arr2 compared using memicmp are identical" )
;
else
printf ( "\nStrings arr1 and arr2 compared using memicmp are not
identical" ) ;
}
7.

Fixed-size objects are more appropriate as compared to variable size data objects.
Using variable-size data objects saves very little space. Variable size data objects
usually have some overhead. Manipulation of fixed-size data objects is usually faster
and easier. Use fixed size when maximum size is clearly bounded and close to
average. And use variable-size data objects when a few of the data items are bigger
than the average size. For example,
char *num[10] = { "One", "Two", "Three", "Four",
"Five", "Six", "Seven", "Eight", "Nine", "Ten" } ;
Instead of using the above, use
char num[10][6] = { "One", "Two", "Three", "Four",
"Five", "Six", "Seven", "Eight", "Nine", "Ten" } ;
The first form uses variable-size data objects. It allocates 10 pointers, which are
pointing to 10 string constants of variable size. Assuming each pointer is of 4 bytes, it
requires 90 bytes. On the other hand, the second form uses fixed size data objects. It
allocates 10 arrays of 6 characters each. It requires only 60 bytes of space. So, the
variable-size in this case does not offer any advantage over fixed size.

8.

The Spawnl( ) function...


DOS is a single tasking operating system, thus only one program runs at a time. The
Spawnl( ) function provides us with the capability of starting the execution of one
program from within another program. The first program is called the parent process
and the second program that gets called from within the first program is called a child
process. Once the second program starts execution, the first is put on hold until the
second program completes execution. The first program is then restarted. The
following program demonstrates use of spawnl( ) function.
/* Mult.c */
int main ( int argc, char* argv[ ] )
{
int a[3], i, ret ;
if ( argc < 3 || argc > 3 )

{
printf ( "Too many or Too few arguments..." ) ;
exit ( 0 ) ;
}
for ( i = 1 ; i < argc ; i++ )
a[i] = atoi ( argv[i] ) ;
ret = a[1] * a[2] ;
return ret ;
}
/* Spawn.c */
#include
#include
main( )
{
int val ;
val = spawnl ( P_WAIT, "C:\\Mult.exe", "3", "10",
"20", NULL ) ;
printf ( "\nReturned value is: %d", val ) ;
}
Here, there are two programs. The program 'Mult.exe' works as a child process
whereas 'Spawn.exe' works as a parent process. On execution of 'Spawn.exe' it
invokes 'Mult.exe' and passes the command-line arguments to it. 'Mult.exe' in turn on
execution, calculates the product of 10 and 20 and returns the value to val in
'Spawn.exe'. In our call to spawnl( ) function, we have passed 6 parameters, P_WAIT
as the mode of execution, path of '.exe' file to run as child process, total number of
arguments to be passed to the child process, list of command line arguments and
NULL. P_WAIT will cause our application to freeze execution until the child process has
completed its execution. This parameter needs to be passed as the default parameter
if you are working under DOS. under other operating systems that support
multitasking, this parameter can be P_NOWAIT or P_OVERLAY. P_NOWAIT will cause
the parent process to execute along with the child process, P_OVERLAY will load the
child process on top of the parent process in the memory.
9.

Are the following two statements identical?


char str[6] = "Kicit" ;
char *str = "Kicit" ;
Ans: No! Arrays are not pointers. An array is a single, pre-allocated chunk of
contiguous elements (all of the same type), fixed in size and location. A pointer on the
other hand, is a reference to any data element (of a particular type) located anywhere.

A pointer must be assigned to point to space allocated elsewhere, but it can be


reassigned any time. The array declaration char str[6] ; requests that space for 6
characters be set aside, to be known
by name str. In other words there is a location named str at which six characters are
stored. The pointer declaration char *str ; on the other hand, requests a place that
holds a pointer, to be known by the name str. This pointer can point almost anywhere
to any char, to any contiguous array of chars, or nowhere.
10. Is the following code fragment correct?
const int x = 10 ;
int arr[x] ;
Ans: No! Here, the variable x is first declared as an int so memory is reserved for it.
Then it is qualified by a const qualifier. Hence, const qualified object is not a constant
fully. It is an object with read only attribute, and in C, an object associated with
memory cannot be used in array dimensions.
11. How do I write code to retrieve current date and time from the system and display it
as a string?
Ans: Use time( ) function to get current date and time and then ctime( ) function to
display it as a string. This is shown in following code snippet.
#include
void main( )
{
time_t curtime ;
char ctm[50] ;
time ( &curtime ) ; //retrieves current time &
stores in curtime
printf ( "\nCurrent Date & Time: %s", ctime (
&curtime ) ) ;
}
12. How do I change the type of cursor and hide a cursor?
Ans: We can change the cursor type by using function _setcursortype( ). This function
can change the cursor type to solid cursor and can even hide a cursor. Following code
shows how to change the cursor type and hide cursor.
#include
main( )
{
/* Hide cursor */
_setcursortype ( _NOCURSOR ) ;

/* Change cursor to a solid cursor */


_setcursortype ( _SOLIDCURSOR ) ;
/* Change back to the normal cursor */
_setcursortype ( _NORMALCURSOR ) ;
}
13. How do I write code that would get error number and display error message if any
standard error occurs?
Ans: Following code demonstrates this.
#include
#include
#include
main( )
{
char *errmsg ;
FILE *fp ;
fp = fopen ( "C:\file.txt", "r" ) ;
if ( fp == NULL )
{
errmsg = strerror ( errno ) ;
printf ( "\n%s", errmsg ) ;
}
}
Here, we are trying to open 'file.txt' file. However, if the file does not exist, then it
would cause an error. As a result, a value (in this case 2) related to the error
generated would get set in errno. errno is an external int variable declared in 'stdlib.h'
and also in 'errno.h'. Next, we have called sterror( ) function which takes an error
number and returns a pointer to standard error message related to the given error
number.
14. How do I write code to get the current drive as well as set the current drive?
Ans: The function getdisk( ) returns the drive number of current drive. The drive
number 0 indicates 'A' as the current drive, 1 as 'B' and so on. The Setdisk( ) function
sets the current drive. This function takes one argument which is an integer indicating
the drive to be set. Following program demonstrates use of both the functions.
#include
main( )
{
int dno, maxdr ;

dno = getdisk( ) ;
printf ( "\nThe current drive is: %c\n", 65 + dno
);
maxdr = setdisk ( 3 ) ;
dno = getdisk( ) ;
printf ( "\nNow the current drive is: %c\n", 65 +
dno ) ;
}
15. The functions memcmp( ) and memicmp( )
The functions memcmp( ) and memicmp( ) compares first n bytes of given two blocks
of memory or strings. However, memcmp( ) performs comparison as unsigned chars
whereas memicmp( ) performs comparison as chars but ignores case (i.e. upper or
lower case). Both the functions return an integer value where 0 indicates that two
memory buffers compared are identical. If the value returned is greater than 0 then it
indicates that the first buffer is bigger than the second one. The value less than 0
indicate that the first buffer is less than the second buffer. The following code snippet
demonstrates use of both
#include
#include
main( )
{
char str1[] = "This string contains some
characters" ;
char str2[] = "this string contains" ;
int result ;
result = memcmp ( str1, str2, strlen ( str2 ) ) ;
printf ( "\nResult after comapring buffer using
memcmp( )" ) ;
show ( result ) ;
result = memicmp ( str1, str2, strlen ( str2 ) ) ;
printf ( "\nResult after comapring buffer using
memicmp( )" ) ;
show ( result ) ;
}
show ( int r )
{
if ( r == 0 )
printf ( "\nThe buffer str1 and str2 hold

identical data" ) ;
if ( r > 0 )
printf ( "\nThe buffer str1 is bigger than buffer
str2" ) ;
if ( r < 0 )
printf ( "\nThe buffer str1 is less than buffer
str2" ) ;
}
16. How do I write code to find an amount of free disk space available on current drive?
Ans: Use getdfree( ) function as shown in follow code.
#include
#include
#include
#include
main( )
{
int dr ; struct dfree disk ;
long freesp ;
dr = getdisk( ) ;
getdfree ( dr + 1 , &disk ) ;
if ( disk.df_sclus == 0xFFFF )
{
printf ( "\ngetdfree( ) function failed\n");
exit ( 1 ) ;
}
freesp = ( long ) disk.df_avail
* ( long ) disk.df_bsec
* ( long ) disk.df_sclus ;
printf ( "\nThe current drive %c: has %ld bytes
available as free space\n", 'A' + dr, freesp ) ;
}
17. Use of array indices...
If we wish to store a character in a char variable ch and the character to be stored
depends on the value of another variable say color (of type int), then the code would
be as shown below:
switch ( color )
{
case 0 :

ch = 'R' ;
break ;
case 1 :
ch = 'G' ;
break ;
case 2 :
ch = 'B' ;
break ;
}
In place of switch-case we can make use of the value in color as an index for a
character array. How to do this is shown in following code snippet.
char *str = "RGB' ;
char ch ;
int color ;
// code
ch = str[ color ] ;
18. Function atexit( ) recevies parameter as the address of function of the type void fun
( void ). The function whose address is passed to atexit( ) gets called before the
termination of program. If atexit( ) is called for more than one function then the
functions are called in "first in last out" order. You can verify that from the output.
#include
#include
void fun1( )
{
printf("Inside fun1\n");
}
void fun2( )
{
printf("Inside fun2\n");
}
main( )
{
atexit ( fun1 ) ;
/* some code */
atexit ( fun2 ) ;
printf ( "This is the last statement of
program?\n" );
}

19. How do I write a user-defined function, which deletes each character in a string str1,
which matches any character in string str2?
Ans: The function is as shown below:
Compress ( char str1[], char str2[] )
{
int i, j, k ;
for ( i = k = 0 ; str1[i] != ?\0? ; i++ )
{
for ( j = 0 ; str2[j] != ?\0? && str2[j] !=
str1[i] ; j++ );
if ( str2[j] == ?\0? )
str1[k++] = str1[I] ;
}
str1[k] = ?\0?
}
20. How does free( ) know how many bytes to free?
Ans: The malloc( ) / free( ) implementation remembers the size of each block
allocated and returned, so it is not necessary to remind it of the size when freein;
21. What is the use of randomize( ) and srand( ) function?
Ans: While generating random numbers in a program, sometimes we require to control
the series of numbers that random number generator creates. The process of
assigning the random number generators starting number is called seeding the
generator. The randomize( ) and srand( ) functions are used to seed the random
number generators. The randomize( ) function uses PC's clock to produce a random
seed, whereas the srand( ) function allows us to specify the random number
generator's starting value.
22. How do I determine amount of memory currently available for allocating?
Ans: We can use function coreleft( ) to get the amount of memory available for
allocation. However, this function does not give an exact amount of unused memory.
If, we are using a small memory model, coreleft( ) returns the amount of unused
memory between the top of the heap and stack. If we are using a larger model, this
function returns the amount of memory between the highest allocated memory and
the end of conventional memory. The function returns amount of memory in terms of
bytes.

23. How does a C program come to know about command line arguments?
Ans: When we execute our C program, operating system loads the program into
memory. In case of DOS, it first loads 256 bytes into memory, called program
segment prefix. This contains file table, environment segment, and command line
information. When we compile the C program the compiler inserts additional code that
parses the command, assigning it to the argv array, making the arguments easily
accessible within our C program.
24. When we open a file, how does functions like fread( )/fwrite( ), etc. get to know from
where to read or to write the data?
Ans: When we open a file for read/write operation using function like fopen( ), it
returns a pointer to the structure of type FILE. This structure stores the file pointer
called position pointer, which keeps track of current location within the file. On
opening file for read/write operation, the file pointer is set to the start of the file. Each
time we read/write a character, the position pointer advances one character. If we
read one line of text at a step from the file, then file pointer advances to the start of
the next line. If the file is opened in append mode, the file pointer is placed at the very
end of the file. Using fseek( ) function we can set the file pointer to some other place
within the file.
25. The sizeof( ) function doesn?t return the size of the block of memory pointed to by a
pointer. Why?
Ans: The sizeof( ) operator does not know that malloc( ) has been used to allocate a
pointer. sizeof( ) gives us the size of pointer itself. There is no handy way to find out
the size of a block allocated by malloc( ).
26. FP_SEG And FP_OFF?
Sometimes while working with far pointers we need to break a far address into its
segment and offset. In such situations we can use FP_SEG and FP_OFF macros.
Following program illustrates the use of these two macros.
#include
main( )
{
unsigned s, o ;
char far *ptr = "Hello!" ;
s = FP_SEG ( ptr ) ;
o = FP_OFF ( ptr ) ;
printf ( "\n%u %u", s, o ) ;
}

27. How do I write a program to convert a string containing number in a hexadecimal form
to its equivalent decimal?
Ans: The following program demonstrates this:
main( )
{
char str[] = "0AB" ;
int h, hex, i, n ;
n=0;h=1;
for ( i = 0 ; h == 1 ; i++ )
{
if ( str[i] >= '0' && str[i] <= '9' )
hex = str[i] - '0' ;
else
{
if ( str[i] >= 'a' && str[i] <= 'f' )
hex = str[i] - 'a' + 10 ;
else
if ( str[i] >= 'A' && str[i] <= 'F' )
hex = str[i] - 'A' + 10 ;
else
h=0;
}
if ( h == 1 )
n = 16 * n + hex ;
}
printf ( "\nThe decimal equivalent of %s is %d",
str, n ) ;
}
The output of this program would be the decimal equivalent of 0AB is 171.
28. How do I write code that reads the segment register settings?
Ans: We can use segread( ) function to read segment register settings. There are four
segment registers?code segment, data segment, stack segment and extra segment.
Sometimes when we use DOS and BIOS services in a program we need to know the
segment register's value. In such a situation we can use segread( ) function. The
following program illustrates the use of this function.
#include
main( )
{

struct SREGS s ;
segread ( &s ) ;
printf ( "\nCS: %X DS: %X SS: %X ES: %X",s.cs,
s.ds, s.ss, s.es ) ;
}
29. What is environment and how do I get environment for a specific entry?
Ans: While working in DOS, it stores information in a memory region called
environment. In this region we can place configuration settings such as command
path, system prompt, etc. Sometimes in a program we need to access the information
contained in environment. The function getenv( ) can be used when we want to access
environment for a specific entry. Following program demonstrates the use of this
function.
#include
#include
main( )
{
char *path = NULL ;
path = getenv ( "PATH" ) ;
if ( *path != NULL )
printf ( "\nPath: %s", path ) ;
else
printf ( "\nPath is not set" ) ;
}
30. How do I display current date in the format given below?
Saturday July 12, 2004
Ans: Following program illustrates how we can display date in above given format.
#include
#include
main( )
{
struct tm *curtime ;
time_t dtime ;
char str[30] ;
time ( &dtime ) ;
curtime = localtime ( &dtime ) ;
strftime ( str, 30, "%A %B %d, %Y", curtime ) ;
printf ( "\n%s", str ) ;

}
Here we have called time( ) function which returns current time. This time is returned
in terms of seconds, elapsed since 00:00:00 GMT, January 1, 1970. To extract the
week day, day of month, etc. from this value we need to break down the value to a tm
structure. This is done by the function localtime( ). Then we have called strftime( )
function to format the time and store it in a string str.
31. If we have declared an array as global in one file and we are using it in another file
then why doesn't the sizeof operator works on an extern array?
Ans: An extern array is of incomplete type as it does not contain the size. Hence we
cannot use sizeof operator, as it cannot get the size of the array declared in another
file. To resolve this use any of one the following two solutions:
1. In the same file declare one more variable that holds the size of array. For example,
array.c
int arr[5] ;
int arrsz = sizeof ( arr ) ;
myprog.c
extern int arr[] ;
extern int arrsz ;
2. Define a macro which can be used in an array
declaration. For example,
myheader.h
#define SZ 5
array.c
#include "myheader.h"
int arr[SZ] ;
myprog.c
#include "myheader.h"
extern int arr[SZ] ;
32. How do I write printf( ) so that the width of a field can be specified at runtime?
Ans: This is shown in following code snippet.
main( )
{
int w, no ;
printf ( "Enter number and the width for the
number field:" ) ;
scanf ( "%d%d", &no, &w ) ;
printf ( "%*d", w, no ) ;
}

Here, an '*' in the format specifier in printf( ) indicates that an int value from the
argument list should be used for the field width.
33. How to find the row and column dimension of a given 2-D array?
Ans: Whenever we initialize a 2-D array at the same place where it has been declared,
it is not necessary to mention the row dimension of an array. The row and column
dimensions of such an array can be determined programmatically as shown in
following program.
void main( )
{
int a[][3] = { 0, 1, 2,
9,-6, 8,
7, 5, 44,
23, 11,15 } ;
int c = sizeof ( a[0] ) / sizeof ( int ) ;
int r = ( sizeof ( a ) / sizeof ( int ) ) / c ;
int i, j ;
printf ( "\nRow: %d\nCol: %d\n", r, c ) ;
for ( i = 0 ; i < r ; i++ )
{
for ( j = 0 ; j < c ; j++ )
printf ( "%d ", a[i][j] ) ;
printf ( "\n" ) ;
}
}

34. The access( ) function...


The access( ) function checks for the existence of a file and also determines whether it
can be read, written to or executed. This function takes two arguments the filename
and an integer indicating the access mode. The values 6, 4, 2, and 1 checks for
read/write, read, write and execute permission of a given file, whereas value 0 checks
whether the file exists or not. Following program demonstrates how we can use
access( ) function to check if a given file exists.
#include
main( )
{
char fname[67] ;
printf ( "\nEnter name of file to open" ) ;

gets ( fname ) ;
if ( access ( fname, 0 ) != 0 )
{
printf ( "\nFile does not exist." ) ;
return ;
}
}
35. How do I convert a floating-point number to a string?
Ans: Use function gcvt( ) to convert a floating-point number to a string. Following
program demonstrates the use of this function.
#include
main( )
{
char str[25] ;
float no ;
int dg = 5 ; /* significant digits */
no = 14.3216 ;
gcvt ( no, dg, str ) ;
printf ( "String: %s\n", str ) ;
}
36. What is a stack ?
Ans: The stack is a region of memory within which our programs temporarily store
data as they execute. For example, when a program passes parameters to functions, C
places the parameters on the stack. When the function completes, C removes the
items from the stack. Similarly, when a function declares local variables, C stores the
variable's values on the stack during the function's execution. Depending on the
program's use of functions and parameters, the amount of stack space that a program
requires will differ.
37. Allocating memory for a 3-D array
#include "alloc.h"
#define MAXX 3
#define MAXY 4
#define MAXZ 5
main( )
{
int ***p, i, j, k ;
p = ( int *** ) malloc ( MAXX * sizeof ( int ** ) ) ;
for ( i = 0 ; i < MAXX ; i++ )

{
p[i] = ( int ** ) malloc ( MAXY * sizeof ( int * ) ) ;
for ( j = 0 ; j < MAXY ; j++ )
p[i][j] = ( int * ) malloc ( MAXZ * sizeof ( int ) ) ;
}
for ( k = 0 ; k < MAXZ ; k++ )
{
for ( i = 0 ; i < MAXX ; i++ )
{
for ( j = 0 ; j < MAXY ; j++ )
{
p[i][j][k] = i + j + k ;
printf ( "%d ", p[i][j][k] ) ;
}
printf ( "\n" ) ;
}
printf ( "\n\n" ) ;
}
}
Data Structures
How to distinguish between a binary tree and a tree?
Ans: A node in a tree can have any number of branches. While a binary tree is a tree
structure in which any node can have at most two branches. For binary trees we
distinguish between the subtree on the left and subtree on the right, whereas for trees
the order of the subtrees is irrelevant.
Consider the following figure...
This above figure shows two binary trees, but these binary trees are different. The first
has an empty right subtree while the second has an empty left subtree. If the above
are regarded as trees (not the binary trees), then they are same despite the fact that
they are drawn differently. Also, an empty binary tree can exist, but there is no tree
having zero nodes.
38. How do I use the function ldexp( ) in a program?
Ans: The math function ldexp( ) is used while solving the complex mathematical
equations. This function takes two arguments, a double value and an int respectively.
The order in which ldexp( ) function performs calculations is ( n * pow ( 2, exp ) )
where n is the double value and exp is the integer. The following program
demonstrates the use of this function.
#include

#include
void main( )
{
double ans ;
double n = 4 ;
ans = ldexp ( n, 2 ) ;
printf ( "\nThe ldexp value is : %lf\n", ans ) ;
}
Here, ldexp( ) function would get expanded as ( 4 * 2 * 2 ), and the output would be
the ldexp value is : 16.000000
39. Can we get the mantissa and exponent form of a given number?
Ans: The function frexp( ) splits the given number into a mantissa and exponent form.
The function takes two arguments, the number to be converted as a double value and
an int to store the exponent form. The function returns the mantissa part as a double
value. Following example demonstrates the use of this function.
#include
#include
void main( )
{
double mantissa, number ;
int exponent ;
number = 8.0 ;
mantissa = frexp ( number, &exponent ) ;
printf ( "The number %lf is ", number ) ;
printf ( "%lf times two to the ", mantissa ) ;
printf ( "power of %d\n", exponent ) ;
return 0 ;
}
40. How do I write code that executes certain function only at program termination?
Ans: Use atexit( ) function as shown in following program.
#include
main( )
{
int ch ;
void fun ( void ) ;
atexit ( fun ) ;
// code
}

void fun( void )


{
printf ( "\nTerminate program......" ) ;
getch( ) ;
}
41. What are memory models?
Ans: The compiler uses a memory model to determine how much memory is allocated
to the program. The PC divides memory into blocks called segments of size 64 KB.
Usually, program uses one segment for code and a second segment for data. A
memory model defines the number of segments the compiler can use for each. It is
important to know which memory model can be used for a program. If we use wrong
memory model, the program might not have enough memory to execute. The problem
can be solved using larger memory model. However, larger the memory model, slower
is your program execution. So we must choose the smallest memory model that
satisfies our program needs. Most of the compilers support memory models like tiny,
small, medium, compact, large and huge.
42. How does C compiler store elements in a multi-dimensional array?
Ans: The compiler maps multi-dimensional arrays in two ways?Row major order and
Column order. When the compiler places elements in columns of an array first then it
is called column-major order. When the compiler places elements in rows of an array
first then it is called row-major order. C compilers store multidimensional arrays in
row-major order. For example, if there is a multi-dimensional array a[2][3], then
according row-major order, the elements would get stored in memory following order:
a[0][0], a[0][1], a[0][2], a[1][0], a[1][1], a[1][2]
43. If the result of an _expression has to be stored to one of two variables, depending on
a condition, can we use conditional operators as shown below?
( ( i < 10 ) ? j : k ) = l * 2 + p ;
Ans: No! The above statement is invalid. We cannot use the conditional operators in
this fashion. The conditional operators like most operators, yields a value, and we
cannot assign the value of an _expression to a value. However, we can use conditional
operators as shown in following code snippet.
main( )
{
int i, j, k, l ;
i = 5 ; j = 10 ; k = 12, l = 1 ;
* ( ( i < 10 ) ? &j : &k ) = l * 2 + 14 ;
printf ( "i = %d j = %d k = %d l = %d", i, j, k, l ) ;

}
The output of the above program would be as given below:
i = 5 j = 16 k = 12 l = 1
44. How can I find the day of the week of a given date?
Ans: The following code snippet shows how to get the day of week from the given
date.
dayofweek ( int yy, int mm, int dd )
{
/*Monday = 1 and Sunday = 0 */
/* month number >= 1 and <= 12, yy > 1752 or so */
static int arr[ ] = { 0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4 } ;
yy = yy - mm < 3 ;
return ( yy + yy / 4 - yy / 100 + yy / 400 + arr[ mm - 1] + dd ) % 7 ;
}
void main( )
{
printf ( "\n\n\nDay of week : %d ", dayofweek ( 2002, 5, 18 ) ) ;
}
45. What's the difference between these two declarations?
struct str1 { ... } ;
typedef struct { ... } str2 ;
Ans : The first form declares a structure tag whereas the second declares a typedef.
The main difference is that the second declaration is of a slightly more abstract type -its users don't necessarily know that it is a structure, and the keyword struct is not
used when declaring instances of it.
46. How do I print the contents of environment variables?
Ans:. The following program shows how to achieve this:
main( int argc, char *argv[ ], char *env[ ] )
{
int i = 0 ;
clrscr( ) ;
while ( env[ i ] )
printf ( "\n%s", env[ i++ ] ) ;
}
main( ) has the third command line argument env, which is an array of pointers to the
strings. Each pointer points to an environment variable from the list of environment
variables.

47. div( )...


The function div( ) divides two integers and returns the quotient and remainder. This
function takes two integer values as arguments; divides first integer with the second
one and returns the answer of division of type div_t. The data type div_t is a structure
that contains two long ints, namely quot and rem, which store quotient and remainder
of division respectively. The following example shows the use of div( ) function.
#include
void main( )
{
div_t res ;
res = div ( 32, 5 ) ;
printf ( "\nThe quotient = %d and remainder = %d ", res.quot, res.rem ) ;
}
48. What would the second and the third printf( ) output the following program?
main( )
{
char *str[ ] = {
"Good Morning"
"Good Evening"
"Good Afternoon"
};
printf ( "\nFirst string = %s", str[0] ) ;
printf ( "\nSecond string = %s", str[1] ) ;
printf ( "\nThird string = %s", str[2] ) ;
}
Ans: For the above given program, we expect the output as Good Evening and Good
Afternoon, for the second and third printf( ). However, the output would be as shown
below.
First string = Good MorningGood EveningGood Afternoon
Second string = ( null )
Third string =
What is missing in the above given code snippet is a comma separator which should
separate the strings Good Morning, Good Evening and Good Afternoon. On adding
comma, we would get the output as shown below.
First string = Good Morning
Second string = Good Evening
Third string = Good Afternoon

49. How do I use scanf( ) to read the date in the form 'dd-mm-yy' ?
Ans: There are two ways to read the date in the form of 'dd-mm-yy' one possible way
is...
int dd, mm, yy ;
char ch ; /* for char '-' */
printf ( "\nEnter the date in the form of dd-mm-yy : " ) ;
scanf( "%d%c%d%c%d", &dd, &ch, &mm, &ch, &yy ) ;
And another best way is to use suppression character * as...
int dd, mm, yy ;
scanf( "%d%*c%d%*c%d", &dd, &mm, &yy ) ;
The suppression character * suppresses the input read from the standard input buffer
for the assigned control character.
50. How do I print a floating-point number with higher precision say 23.34568734 with
only precision up to two decimal places?
Ans: This can be achieved through the use of suppression char '*' in the format string
of printf( ) as shown in the following program.
main( )
{
int i = 2 ;
float f = 23.34568734 ;
printf ( "%.*f", i, f ) ;
}
The output of the above program would be 23.35.
51. Are the expressions *ptr++ and ++*ptr same?
Ans: No. *ptr++ increments the pointer and not the value pointed by it, whereas +
+*ptr increments the value being pointed to by ptr.
52. strpbrk( )
The function strpbrk( ) takes two strings as parameters. It scans the first string, to
find, the first occurrence of any character appearing in the second string. The function
returns a pointer to the first occurrence of the character it found in the first string. The
following program demonstrates the use of string function strpbrk( ).
#include
main( )
{
char *str1 = "Hello!" ;
char *str2 = "Better" ;
char *p ;

p = strpbrk ( str1, str2 ) ;


if ( p )
printf ( "The first character found in str1 is %c", *p ) ;
else
printf ( "The character not found" ) ;
}
The output of the above program would be the first character found in str1 is e
53. Can we convert an unsigned long integer value to a string?
Ans: The function ultoa( ) can be used to convert an unsigned long integer value to a
string. This function takes three arguments, first the value that is to be converted,
second the base address of the buffer in which the converted number has to be stored
(with a string terminating null character '\0') and the last argument specifies the base
to be used in converting the value. Following example demonstrates the use of this
function.
#include
void main( )
{
unsigned long ul = 3234567231L ;
char str[25] ;
ultoa ( ul, str, 10 ) ;
printf ( "str = %s unsigned long = %lu\n", str, ul ) ;
}
54. ceil( ) and floor( )
The math function ceil( ) takes a double value as an argument. This function finds the
smallest possible integer to which the given number can be rounded up. Similarly,
floor( ) being a math function, takes a double value as an argument and returns the
largest possible integer to which the given double value can be rounded down. The
following program demonstrates the use of both the functions.
#include
void main( )
{
double no = 1437.23167 ;
double down, up ;
down = floor ( no ) ;
up = ceil ( no ) ;
printf ( "The original number %7.5lf\n", no ) ;
printf ( "The number rounded down %7.5lf\n", down ) ;

printf ( "The number rounded up %7.5lf\n", up ) ;


}
The output of this program would be,
The original number 1437.23167
The number rounded down 1437.00000
The number rounded up 1438.00000
55. How do I use function ecvt( ) in a program?
Ans: The function ecvt( ) converts a floating-point value to a null terminated string.
This function takes four arguments, such as, the value to be converted to string, the
number of digits to be converted to string, and two integer pointers. The two-integer
pointer stores the position of the decimal point (relative to the string) and the sign of
the number, respectively. If the value in a variable, used to store sign is 0, then the
number is positive and, if it is non-zero, then the number is negative. The function
returns a pointer to the string containing digits. Following program demonstrates the
use of this function.
#include
main( )
{
char *str ;
double val ;
int dec, sign ;
int ndig = 4 ;
val = 22 ;
str = ecvt ( val, ndig, &dec, &sign ) ;
printf ( "string = %s dec = %d sign = %d\n", str, dec, sign ) ;
val = -345.67 ;
ndig = 8 ;
str = ecvt ( val, ndig, &dec, &sign ) ;
printf ( "string = %s dec = %d sign = %d\n", str, dec, sign ) ;
// number with a scientific notation
val = 3.546712e5 ;
ndig = 5 ;
str = ecvt ( val, ndig, &dec, &sign ) ;
printf ( "string = %s dec = %d sign = %d\n", str, dec, sign ) ;
}
The output of this program would be
string = 2200 dec = 2 sign = 0

string = 34567000 dec = 3 sign = 1


string = 35467 dec = 6 sign = 0
56. How to run DIR command programmatically?
Ans: We can use the system( ) function to execute the DIR command along with its
options. Following program shows how this can be achieved:
// mydir.c
main ( int argc, char *argv[ ] )
{
char str[30] ;
if ( argc < 2 )
exit ( 0 ) ;
sprintf ( str, "dir %s %s", argv[1], argv[2] ) ;
system ( str ) ;
}
If we run the executable file of this program at command prompt passing the
command line arguments as follows:
> mydir abc.c /s
This will search the file 'abc.c' in the current directory.
57. Suppose I have a structure having fields name, age, salary and have passed address
of age to a function fun( ). How I can access the other member of the structure using
the address of age?
Ans:
struct emp
{
char name[20] ;
int age ;
float salary ;
};
main( )
{
struct emp e ;
printf ( "\nEnter name: " ) ;
scanf ( "%s", e.name ) ;
printf ( "\nEnter age: " ) ;
scanf ( "%d", &e.age ) ;
printf ( "\nEnter salary: " ) ;
scanf ( "%f", &e.salary ) ;
fun ( &e.age ) ;

}
fun ( int *p )
{
struct emp *q ;
int offset ;
offset = ( char * ) ( & ( ( struct emp * ) 0 ) -> age ) - ( char * ) ( (
struct emp* ) 0 ) ;
q = ( struct emp * ) ( ( char * ) p - offset ) ;
printf ( "\nname: %s", q -> name ) ;
printf ( "\nage: %d", q -> age ) ;
printf ( "\nsalary: %f", q -> salary ) ;
}
58. How to restrict the program's output to a specific screen region?
Ans: A C function window( ) can be used to restrict the screen output to a specific
region. The window( ) function defines a text-mode window. The parameters passed to
this function defines the upper-left and lower-right corner of the region within which
you want the output. In the following program, the string 'Hello!' gets printed within
the specified region. To print the string we must use cprintf( ) function which prints
directly on the text-mode window.
#include
main( )
{
int i, j ;
window ( 20, 8, 60, 17 ) ;
for ( i = 0 ; i < 8 ; i++ )
for ( j = 0 ; j < 10 ; j++ )
cprintf ( "Hello!" ) ;
}
59. Sometimes you need to prompt the user for a password. When the user types in the
password, the characters the user enters should not appear on the screen. A standard
library function getpass( ) can be used to perform such function. Maximum number of
characters that can be entered as password is 8.
main( )
{
char *pwd ;
pwd = getpass ( "Enter Password" ) ;
if ( strcmp ( pwd, "orgcity" ) )
printf ( "\nPassword %s is incorrect", pwd ) ;

else
printf ( "\nCorrect Password" ) ;
}
60. How to obtain the current drive through C ?
Ans: We can use the function _getdrive( ) to obtain the current drive. The _getdrive( )
function uses DOS function 0X19 to get the current drive number
#include
main( )
{
int disk ;
disk = _getdrive( ) + 'A' - 1 ;
printf ( "The current drive is: %c\n", disk ) ;
}
61. How come the output for both the programs is different when the logic is same?
main( )
{
int i, j ;
for ( i = 1, j = 1 ; i <= 5, j <= 100 ; i++, j++ )
{
gotoxy ( 1, 1, ) ;
printf ( "%d %d", i, j ) ;
}
}
main( )
{
int i, j ;
for ( i =1, j = 1; j <= 100, i <= 5; i++, j++ )
{
gotoxy ( 1, 1 ) ;
printf ( "%d %d", i, j ) ;
}
}
Output -> 5 5
Even if logic of both the programs is same the output of the first program comes out
to be 100, 100, but of the second program it is 5, 5. The comma operator plays a vital
role inside the for loop. It always considers the value of the latest variable. So, at the

time of testing the condition in for loop, the value of j will be considered in the first
program and value of i in the second.
62. Can we get the x and y coordinate of the current cursor position ?
Ans : The function wherex( ) and wherey( ) returns the x-coordinate and y-coordinate
of the current cursor position respectively. Both the functions return an integer value.
The value returned by wherex( ) is the horizontal position of cursor and the value
returned by wherey( ) is the vertical position of the cursor. Following program shows
how to use the wherex( ) and wherey( ) functions.
#include
main( )
{
printf ( "Just\n To\n Test\n Where\n the cursor\n goes" ) ;
printf ( "Current location is X: %d Y: %d\n", wherex( ), wherey( ) ) ;
}
63. How do I programmatically delete lines in the text window?
Ans: While writing programs that perform screen-based I/O, you may want to-delete
the current line's contents, moving one line up, all of the output that follows. In such
cases a function called delline( ) can be used. Following code snippet illustrates the
use of function delline( ).
#include
main( )
{
int i ;
clrscr( ) ;
for ( i = 0; i <= 23; i++ )
printf ( "Line %d\r\n", i ) ;
printf ( "Press a key to continue : " ) ;
getch( ) ;
gotoxy ( 2, 6 ) ;
for ( i = 6; i <= 12; i++ )
delline( ) ;
getch( ) ;
}
64. How do I get the time elapsed between two function calls ?
Ans: The function difftime( ) finds the difference between two times. It calculates the
elapsed time in seconds and returns the difference between two times as a double

value.
#include
#include
#include
main( )
{
int a[] = { 2, -34, 56, 78, 112, 33, -7, 11, 45, 29, 6 } ;
int s ;
time_t t1, t2 ; // time_t defines the value used for time function
s = sizeof ( a ) / 2 ;
t1 = time ( NULL ) ;
sel_sort ( a, s ) ; // sort array by selection sort
bub_sort ( a, s ) ; // sort array by bubble sort method
t2 = time ( NULL ) ;
printf ( "\nThe difference between two function calls is %f", difftime (
t2, t1 ) ) ;
}
In the above program we have called difftime( ) function that returns the time elapsed
from t1 to t2.
65. How do I use swab( ) in my program ?
Ans: The function swab( ) swaps the adjacent bytes of memory. It copies the bytes
from source string to the target string, provided that the number of characters in the
source string is even. While copying, it swaps the bytes which are then assigned to the
target string.
#include
#include
#include
main ( )
{
char *str1 = "hS eesll snsiasl not eh es as oher " ;
char *str2 ;
clrscr( ) ;
swab ( str1, str2, strlen ( str1 ) ) ;
printf ( "The target string is : %s\n", str2 ) ; // output -- She sells
snails on the sea shore
getch( ) ;
}

66. Turbo C provides various command line compiler options which we can use through
TCC. The compiler options include : displaying specific warning messages, generating
8087 hardware instructions, using a filename for generating assembly code, etc.
Instead of compiler options being executed at command line we can use these
compiler options in our program. This can be achieved using #pragma options. We can
use various flags with #pragma options to use the compiler options. All these flags are
available in turbo C's online help.
67. I have an array declared in file 'F1.C' as,
int a[ ] = { 1, 2, 3, 4, 5, 6 } ;
and used in the file 'F2.C' as,
extern int a[ ] ;
In the file F2.C, why sizeof doesn't work on the array a[ ]?
Ans: An extern array of unspecified size is an incomplete type. You cannot apply sizeof
to it, because sizeof operates during compile time and it is unable to learn the size of
an array that is defined in another file. You have three ways to resolve this problem:
1. In file 'F1.C' define as,
int a[ ] = { 1, 2, 3, 4, 5, 6 } ;
int size_a = sizeof ( a ) ;
and in file F2.C declare as,
extern int a[ ] ;
extern int size_a ;
2. In file 'F1.H' define,
#define ARR_SIZ 6
In file F1.C declare as,
#include "F1.H"
int a[ ARR_SIZ ] ;
and in file F2.C declare as,
#include "F1.H"
extern int a[ ARR_SIZ ] ;
3. In file 'F1.C' define as,
int a[ ] = { 1, 2, 3, 4, 5, 6, -1 } ;
and in file 'F2.C' declare as,
extern int a[ ] ;
Here the element -1 is used as a sentinel value, so the code can
understand the end without any explicit size.
68. How to delete a line from text displayed on the screen?
Ans: Sometimes, specially when we are creating a text editor like program we may
wish to allow user to delete a line. We can do so by using two functions namely

clreol( ) and delline( ). The clreol( ) function deletes the line from the current cursor
position to the end of line. The delline() function deletes the entire line at the current
cursor position and
moves up the following line. Following program shows how to use these functions.
#include
main( )
{
int i ;
for ( i = 1 ; i <= 20 ; i++ )
printf ( "This is Line %d\n", i ) ;
getch( ) ;
gotoxy ( 1, 7 ) ;
clreol( ) ;
getch( ) ;
gotoxy ( 1, 12 ) ;
delline( ) ;
getch( ) ;
}
69. How do I programmatically insert lines in the text window?
Ans: We can insert a blank line in the text window using the insline( ) function. This
function inserts line at current cursor position. While doing so, it shifts down the lines
that are below the newly inserted line.
#include
void main( )
{
printf ( "The little snail was slowly moving up. She wanted\r\n" ) ;
printf ( "to reach the top of the tree. It was chilly\r\n" ) ;
printf ( "winter season. Most of the animals were resting in\r\n" ) ;
printf ( "their nests as there was a heavy snow fall.\r\n" ) ;
printf ( "\r\nPress any key to continue:" ) ;
gotoxy ( 10, 2 ) ;
getch( ) ;
insline( ) ;
getch( ) ;
}
70. What will be the output of the following program?
main( )
{

unsigned int num ;


int i ;
printf ( "\nEnter any number" ) ;
scanf ( "%u", &num ) ;
for ( i = 0 ; i < 16 ; i++ )
printf ( "%d", ( num << i & 1 << 15 ) ? 1 : 0 ) ;
}
Ans: The output of this program is the binary equivalent of the given number. We
have used bitwise operators to get the binary number.
71. Graphics
Building Mouse Cursors...
In text mode the mouse cursor appears as a block, whereas in graphics mode it
appears as an arrow. If we wish we can change the graphics cursor to any other shape
the way Windows does. The mouse cursor in graphics mode occupies a 16 by 16 pixel
box. By highlighting or dehighlighting some of the pixels in this box we can get the
desired shape. For example, the following bit-pattern can be used to generate the
cursor which looks like an hour-glass.
1111111111111111 0000000000000000
1000000000000001 0000000000000000
1111111111111111 0000000000000000
1000000000000001 0000000000000000
0100000000000010 1000000000000001
0010000000000100 1100000000000011
0000100000010000 1111000000001111
0000001001000000 1111110000111111
0000001001000000 1111110000111111
0000100000010000 1111000000001111
0010000000000100 1100000000000011
0100000000000010 1000000000000001
1000000000000001 0000000000000000
1111111111111111 0000000000000000
1000000000000001 0000000000000000
1111111111111111 0000000000000000
Mouse pointer bitmap Screen Mask the one's in the mouse pointer bitmap indicate that
the pixel would be drawn whereas the zeros indicate that the pixel would stand
erased. It is important to note that the mouse pointer bit pattern is 32 bytes long.
However, while actually writing a program to change the pointer shape we need a 64
byte bit-map. This provision is made to ensure that when the cursor reaches a position

on the screen where something is already written or drawn only that portion should
get overwritten which is to be occupied by the mouse cursor. Of the 64 bytes the first
32 bytes contain a bit mask which is first ANDed with the screen image, and then the
second 32 bytes bit mask is XORed with the screen image.
The following program changes the mouse cursor in graphics mode to resemble an
hour glass.
# include "graphics.h"
# include "dos.h"
union REGS i, o ;
struct SREGS s ;
int cursor[32] =
{
/* Hour-glass screen mask */
0x0000, 0x0000, 0x0000, 0x0000,
0x8001, 0xc003, 0xf00f, 0xfc3f,
0xfc3f, 0xf00f, 0xc003, 0x8001,
0x0000, 0x0000, 0x0000, 0x0000,
/* The mouse pointer bitmap */
0xffff, 0x8001, 0xffff, 0x8001,
0x4002, 0x2004, 0x1008, 0x0240,
0x0240, 0x0810, 0x2004, 0x4002,
0x8001, 0xffff, 0x8001, 0xffff,
};
main( )
{
int gd = DETECT, gm ;
initgraph ( &gd, &gm, "c:\\tc\\bgi" ) ;
if ( initmouse( ) == -1 )
{
closegraph( ) ;
printf ( "\n Mouse not installed!" ) ;
exit( ) ;
}
gotoxy ( 10, 1 ) ; printf ( "Press any key to exit..." ) ;
changecursor ( cursor ) ; showmouseptr( ) ;
getch( ) ;
}
initmouse( )
{

i.x.ax = 0 ; int86 ( 0x33, &i, &o ) ;


return ( o.x.ax == 0 ? -1 : 0 ) ;
}
showmouseptr( )
{
i.x.ax = 1 ; int86 ( 0x33, &i, &o ) ;
}
changecursor ( int *shape )
{
i.x.ax = 9 ; /* service number */
i.x.bx = 0 ; /* actual cursor position from left */
i.x.cx = 0 ; /* actual cursor position from top */
i.x.dx = ( unsigned ) shape ; /* offset address of pointer image*/
segread ( &s ) ;
s.es = s.ds ; /* segment address of pointer */
int86x ( 0x33, &i, &i, &s ) ;
}
72. Towers Of Hanoi
Suppose there are three pegs labeled A, B and C. Four disks are placed on peg A. The
bottom-most disk is largest, and disks go on decreasing in size with the topmost disk
being smallest. The objective of the game is to move the disks from peg A to peg C,
using peg B as an auxiliary peg. The rules of the game are as follows:
Only one disk may be moved at a time, and it must be the top disk on one of the
pegs. A larger disk should never be placed on the top of a smaller disk. Suppose we
are to write a program to print out the sequence in which the disks should be moved
such that all disks on peg A are finally transferred to peg C. Here it is...
main( )
{
int n = 4 ;
move ( n, 'A', 'B', 'C' ) ;
}
move ( n, sp, ap, ep )
int n ;
char sp, ap, ep ;
{
if ( n == 1 )
printf ( "\n Move from %c to %c ", sp, ep ) ;
else

{
move ( n - 1, sp, ep, ap ) ;
move ( 1, sp, ' ', ep ) ;
move ( n - 1, ap, sp, ep ) ;
}
}
And here is the output...
Move from A to B
Move from A to C
Move from B to C
Move from A to B
Move from C to A
Move from C to B
Move from A to B
Move from A to C
Move from B to C
Move from B to A
Move from C to A
Move from B to C
Move from A to B
Move from A to C
Move from B to C
This problem is the famous Towers of Hanoi problem, wherein three pegs are to be
employed for transferring the disks with the given criteria. Here's how we go about it.
We have three pegs: the starting peg, sp, the auxiliary peg ap, and the ending peg,
ep, where the disks must finally be. First, using the ending peg as an auxiliary or
supporting peg, we transfer all but the last disk to ap. Next the last disk is moved
from sp to ep. Now, using sp as the supporting peg, all the disks are moved from ap to
ep. ?A?, B and C denote the three pegs. The recursive function move( ) is called with
different combinations of these pegs as starting, auxiliary and ending pegs.
73. What would be the output of following program?
struct syntax
{
int i ;
float g ;
char c ;
}
main( )

{
printf ( "I won't give you any error" ) ;
}
Ans: The above program would get compiled successfully and on execution it would
print the message given in printf(). What strikes in the above code snippet is the
structure syntax which is declared but not terminated with the statement terminator,
the semicolon. The compiler would not give any error message for it, as it assumes
that main( ) function have a return type of struct syntax and hence would successfully
compile and execute the program.
74. How to get the memory size ?
Ans: Consider the following program
#include
#include
main( )
{
int memsize;
memsize = biosmemory( ) ;
printf ( "RAM size = %dK\n",memsize ) ;
return 0 ;
}
The function biosmemory uses BIOS interrupt 0x12 to return the size of memory.
75. Float Format
How does C compiler stores float values ?
Ans: In C, the float values are stored in a mantissa and exponent form. While writing a
number we specify the exponent part in the form of base 10. But, in case of C
compiler, the exponent for floats is stored in the form of base 2. Obviously, because,
computer stores the numbers in binary form. The C compiler follows an IEEE standard
to store a float. The IEEE format expresses a floating-point number in a binary form
known as `normalized' form. Normalization involves adjusting the exponent so that
the "binary point" (the binary analog of the decimal point) in the mantissa always lies
to the right of most significant nonzero digit. In binary representation, this means that
the most significant digit of the mantissa is always a 1. This property of the
normalized representation is exploited by the IEEE format when storing the mantissa.
Let us consider an example of generating the normalized form of a floating point
number. Suppose we want to represent the decimal number 5.375. Its binary
equivalent can be obtained as shown below:
2|5
.375 x 2 = 0.750 0

|-----.750 x 2 = 1.500 1
2|21
.500 x 2 = 1.000 1
|-----2|10
|-----|01
Writing remainders in reverse writing whole parts in the same order we get 101 order
in which they are obtained we get 011 thus the binary equivalent of 5.375 would be
101.011. The normalized form of this binary number is obtained by adjusting the
exponent until the decimal point is to the right of most significant 1. In this case the
result is 1.01011 x 22. The IEEE format for floating point storage uses a sign bit, a
mantissa and an exponent for representing the power of 2. The sign bit denotes the
sign of the number: a 0 represents a positive value and a 1 denotes a negative value.
The mantissa is represented in binary. Converting the floating-point number to its
normalized form results in a mantissa whose most significant digit is always 1. The
IEEE format takes advantage of this by not storing this bit at all. The exponent is an
integer stored in unsigned binary format after adding a positive integer bias. This
ensures that the stored exponent is always positive. The value of the bias is 127 for
floats and 1023 for doubles. Thus, 1.01011 x 22 is represented as shown below:
--- --------------- ---------------------------------------------| 0 | 100 0000 1 | 010 1100 0000 0000 0000 0000 |
--- ---------------- --------------------------------------------sign bit exponent- mantissa stored in normalized form obtained after adding a bias
127 to exponent 2
Data Structures
Which is the best sorting method?
Ans: There is no sorting method that is universally superior to all others. The
programmer must carefully examine the problem and the desired results before
deciding the particular sorting method. Some of the sorting methods are given below:
Bubble sort : When a file containing records is to be sorted then Bubble sort is the
best sorting method when sorting by address is used.
Bsort : It can be recommended if the input to the file is known to be nearly sorted.
Meansort : It can be recommended only for input known to be very nearly sorted.
Quick Sort : In the virtual memory environment, where pages of data are constantly
being swapped back and forth between external and internal storage. In practical
situations, quick sort is often the fastest available because of its low overhead and its
average behavior.

Heap sort : Generally used for sorting of complete binary tree. Simple insertion sort
and straight selection sort : Both are more efficient than bubble sort. Selection sort is
recommended for small files when records are large and for reverse situation insertion
sort is recommended. The heap sort and quick sort are both more efficient than
insertion or selection for large number of data.
Shell sort : It is recommended for moderately sized files of several hundred elements.
Radix sort : It is reasonably efficient if the number of digits in the keys is not too
large.
76. Calculating Wasted Bytes On Disk
When a file gets stored on the disk, at a time DOS allocates one cluster for it. A cluster
is nothing but a group of sectors. However, since all file sizes cannot be expected to
be a multiple of 512 bytes, when a file gets stored often part of the cluster remains
unoccupied. This space goes waste unless the file size grows to occupy these wasted
bytes. The
following program finds out how much space is wasted for all files in all the directories
of the current drive.
#include
#include
#include
#include
#include
unsigned bytes_per_cluster ;
unsigned long wasted_bytes ;
unsigned long num_files = 0 ;
main( )
{
int ptr = 0, flag = 0, first = 0 ;
struct ffblk f[50] ;
struct dfree free ;
/* get cluster information and calculate bytes per cluster */
getdfree ( 0, &free ) ;
bytes_per_cluster = free.df_bsec * free.df_sclus ;
chdir ( "\\" ) ;
/* check out files in root directory first */
cal_waste( ) ;
/* loop until all directories scanned */
while ( ptr != -1 )
{

/* should I do a findfirst or a findnext? */


if ( first == 0 )
flag = findfirst ( "*.*", &f[ptr], FA_DIREC ) ;
else
flag = findnext ( &f[ptr] ) ;
while ( flag == 0 )
{
/* make sure its a directory and skip over . & .. entries */
if ( f[ptr].ff_attrib == FA_DIREC && f[ptr].ff_name[0] != '.' )
{
flag = chdir ( f[ptr].ff_name ) ; /* try changing directories */
if ( flag == 0 ) /* did change dir work? */
{
cal_waste( ) ;
first = 0 ; /* set for findfirst on next pass */
break ;
}
}
flag = findnext ( &f[ptr] ) ; /* search for more dirs */
}
if ( flag != 0 || ptr == 49 ) /* didn't find any more dirs */
{
ptr-- ;
chdir ( ".." ) ; /* go back one level */
first = 1 ; /* set to findnext on next pass */
}
else
ptr++ ;
}
printf ( "There are %lu bytes wasted in %lu files.\n", wasted_bytes,
num_files ) ;
}
cal_waste( )
{
int flag = 0 ;
long full_cluster ;
struct ffblk ff ;
/* look for all file types */
flag = findfirst ( "*.*", &ff, FA_RDONLY | FA_HIDDEN | FA_SYSTEM | FA_ARCH

);
while ( flag == 0 )
{
num_files++ ;
full_cluster = ff.ff_fsize / bytes_per_cluster * bytes_per_cluster ;
wasted_bytes += bytes_per_cluster - ( ff.ff_fsize - full_cluster ) ;
flag = findnext ( &ff ) ;
}
}
Data Structures
Polish Notation
The method of writing all operators either before their operation, or after them, is
called Polish notation, in honor of its discoverer, the Polish mathematician Jan
Lukasiewicz. When the operators are written before their operands, it is called the
prefix form. When the operators come after their operands. It is called the postfix
form, or, sometimes reverse Polish form or suffix form. In this context, it is customary
to use the coined phrase infix form to denote the usual custom of writing binary
operators between their operands. For example, the expression A + B becomes +AB in
prefix form and AB+ in postfix form. In the expression A + B x C, the multiplication is
done first, so we convert it first, obtaining first A + ( BCx ) and then ABCx+ in postfix
form. The prefix form of this expression is +A x BC. The prefix and postfix forms are
not related by taking mirror images or other such simple transformation. Also all
parentheses have been omitted in the Polish forms.
77. The Longjmp And Setjmp
The C programming language does not let you nest functions. You cannot write a
function definition inside another function definition, as in:
int fun1( )
{
int fun2() /* such nesting of functions is not allowed */
{
.....
}
}
Because of this restriction it is not possible to hide function names inside a hierarchy.
As a result all the functions that you declare within a program are visible to each
other. This of course is not a major drawback since one can limit visibility by grouping
functions within separate C source files that belong to different logical units of the
program. C does, however, suffer in another way because of this design decision. It

provides no easy way to transfer control out of a function except by returning to the
expression that called the function. For the vast majority of function calls, that is a
desirable limitation. You want the discipline of nested function calls and returns to help
you understand flow of control through a program. Nevertheless, on some occasions
that discipline is too restrictive. The program is sometimes easier to write, and to
understand, if you can jump out of one or more function invocations at a single stroke.
You want to bypass the normal function returns and transfer control to somewhere in
an earlier function invocation.
For example, you may want to return to execute some code for error recovery no
matter where an error is detected in your application. The setjmp and the longjmp
functions provide the tools to accomplish this. The setjmp function saves the "state" or
the "context" of the process and the longjmp uses the saved context to revert to a
previous point in the program. What is the context of the process? In general, the
context of a process refers to information that enables you to reconstruct exactly the
way the process is at a particular point in its flow of execution. In C program the
relevant information includes quantities such as values of SP, SS, FLAGS, CS, IP, BP,
DI, ES, SI and DS registers.
To save this information Turbo C uses the following structure, which is defined, in the
header file 'setjmp.h'.
typedef struct
{
unsigned j_sp ;
unsigned j_ss ;
unsigned j_flag ;
unsigned j_cs ;
unsigned j_ip ;
unsigned j_bp ;
unsigned j_di ;
unsigned j_es ;
unsigned j_si ;
unsigned j_ds ;
} jmp_buf[1] ;
This is a system-dependent data type because different systems might require
different amounts of information to capture the context of a process. In Turbo C,
jmp_buf is simply an array of ten 2-byte integers. To understand the mechanics of
setjmp and longjmp, look at the following code
fragment.
#include "setjmp.h"
jmp_buf buf ;

main( )
{
if ( setjmp ( buf ) == 0 )
process( ) ;
else
handle_error( ) ; /* executed when longjmp is called */
}
process( )
{
int flag = 0 ;
/* some processing is done here */
/* if an error occurs during processing flag is set up */
if ( flag )
longjmp ( buf, 1 ) ;
}
Upon entry to setjmp the stack contains the address of the buffer buf and the address
of the if statement in the main function, to which setjmp will return. The setjmp
function copies this return address as well as the current values of registers, SP, SS,
FLAGS, BP, DI, ES, SI and DS, into the buffer buf. Then setjmp returns with a zero. In
this case, the if statement is satisfied and the process( ) function is called. If
something goes wrong in process( ) (indicated by the flag variable), we call longjmp
with two arguments: the first is the buffer that contains the context to which we will
return. When the stack reverts back to this saved state, and the return statement in
longjmp is executed, it will be as if we were returning from the call to setjmp, which
originally saved the buffer buf. The second argument to longjmp specifies the return
value to be used during this return. It should be other than zero so that in the if
statement we can tell whether the return is induced by a longjmp.
The setjmp/longjmp combination enables you to jump unconditionally from one C
function to another without using the conventional return statements. Essentially,
setjmp marks the destination of the jump and longjmp is a non-local goto that
executes the jump.
Data Structures
Comparison Trees...
The comparison trees also called decision tree or search tree of an algorithm, is
obtained by tracing through the actions of the algorithm, representing each
comparison of keys by a vertex of the tree (which we draw as a circle). Inside the
circle we put the index of the key against which we are comparing the target key.
Branches (lines) drawn down from the circle represent the possible outcomes of the

comparison and are labeled accordingly. When the algorithm terminates, we put either
F (for failure) or the location where the target is found at the end of the appropriate
branch, which we call a leaf, and draw as a square. Leaves are also sometimes called
end vertices or external vertices of the tree. The remaining vertices are called the
internal vertices of the tree. The comparison tree for sequential search is especially
simple.
78. Suppose we have a floating-point number with higher precision say 12.126487687 and
we wish it to be printed with only precision up to two decimal places. How can I do
this?
Ans. This can achieved through the use of suppression char '*' in the format string of
printf( ) which is shown in the following program.
main( )
{
int p = 2 ;
float n = 12.126487687 ;
printf ( "%.*f",p, n ) ;
}
79. Spawning All programs that we execute from DOS prompt can be thought of as
children of COMMAND.COM. Thus, the program that we execute is a child process,
whereas COMMAND.COM running in memory is its parent. The process of a parent
process giving birth to a child process is known as 'spawning'. If the spawned program
so desires, it may in turn spawn children of its own, which then execute and return
control to their parent. Who is the parent of COMMAND.COM? COMMAND.COM itself.
We can trace the ancestors of our program using the field Parent Process ID (PID)
present at offset 0x16 in the Program Segment Prefix (PSP). To trace this ancestry our
program should first locate its PSP, extract the parent process ID from it and then use
this to find PSP of the parent. This process can be repeated till we reach
COMMAND.COM (process ID of COMMAND.COM is its own PSP), the father of all
processes. Here is a program which achieves this...
/* SPAWN.C */
#include "dos.h"
unsigned oldpsp, newpsp, far *eb_seg, i ;
char far *eb_ptr ;
main( )
{
oldpsp = _psp ;
while ( 1 )
{

printf ( "\n" ) ;
printname ( oldpsp ) ;
printf ( " spawned by " ) ;
newpsp = * ( ( unsigned far * ) MK_FP ( oldpsp, 0x16 ) ) ;
if ( * ( ( unsigned * ) MK_FP ( newpsp, 0x16 ) ) == newpsp )
break ;
else
oldpsp = newpsp ;
printname ( newpsp ) ;
}
printf ( "%-20s (%04X)", "COMMAND.COM", newpsp ) ;
}
printname ( unsigned lpsp )
{
char drive[5], dir[68], name[13], ext[5] ;
eb_seg = ( unsigned far * ) MK_FP ( lpsp, 0x2C ) ;
eb_ptr = MK_FP ( *eb_seg, 0 ) ;
i=0;
while ( 1 )
{
if ( eb_ptr[i] == 0 )
{
if ( eb_ptr[i + 1] == 0 && eb_ptr[i + 2] == 1 )
{
i += 4 ;
break ;
}
}
i++ ;
}
fnsplit ( eb_ptr + i, drive, dir, name, ext ) ;
strcat ( name, ext ) ;
printf ( "%-20s (%04X)", name, oldpsp ) ;
}
On running the program from within TC the output obtained is shown below.
SPWAN.EXE (58A9) spawned by TC.EXE (0672) TC.EXE (0672) spawned by
COMMAND.COM (05B8). The program simply copies its own process ID in the variable
oldpsp and then uses it to extract its own filename from its environment block. This is
done by the function printname( ). The value in oldpsp is then used to retrieve the

parent's PID in newpsp. From there the program loops reporting the values of oldpsp,
newpsp and the corresponding file names until the program reaches COMMAND.COM.
The printname( ) function first locates the environment block of the program and then
extracts the file name from the environment block. The fnsplit( ) function has been
used to eliminate the path present prior to the file name. Do not run the program from
command line since it would give you only one level of ancestry.
Data Structures
Choosing the data structures to be used for information retrieval. For problems of
information retrieval, consider the size, number, and location of the records along with
the type and structure of the keys while choosing the data structures to be used. For
small records, high-speed internal memory will be used, and binary search trees will
likely prove adequate. For information retrieval from disk files, methods employing
multiway branching, such as trees, B-trees , and hash tables, will usually be superior.
Tries are particularly suited to applications where the keys are structured as a
sequence of symbols and where the set of keys is relatively dense in the set of all
possible keys. For other applications, methods that treat the key as a single unit will
often prove superior. B-trees, together with various generalization and extensions, can
be usefully applied to many problems concerned with external information retrieval.
80. Variably Dimensioned Arrays
While dealing with Scientific or Engineering problems one is often required to make
use of multi-dimensioned array. However, when it comes to passing multidimensional
arrays to a function C is found wanting. This is because the C compiler wants to know
the size of all but the first dimension of any array passed to a function. For instance,
we can define a function compute ( int n, float x[] ), but not compute ( int n, x[][]).
Thus, C can deal with variably dimensioned 1-D arrays, but when an array has more
than one dimension, the C compiler has to know the size of the last dimensions
expressed as a constant. This problem has long been recognized, and some of the
solutions that are often used are:
Declare the arrays in the functions to be big enough to tackle all possible situations.
This can lead to a wastage of lot of precious memory in most cases. Another solution
is to construct multiple-dimension array as an array of pointers. For example, a matrix
(2-D array) of floats can be declared as a 1-D array of float pointers, with each
element pointing to an array of floats. The problem with this method is that the calling
function has to define all arrays in this fashion. This means that any other
computations done on the arrays must take this special structure into account.
Another easy solution, though seldom used, exists. This is based on the following
method:
Pass the array to the function as though it is a pointer to an array of floats (or the

appropriate data type), no matter how many dimensions the array actually has, along
with the dimensions of the array. Reference individual array elements as offsets from
this pointer.Write your algorithm so that array elements are accessed in storage order.
The following program for multiplying two matrices illustrates this
procedure.
# define M 3
# define N 2
# define P 4
float a[M][N], b[N][P], c[M][P] ;
void mulmat ( int, int, int, float*, float*, float* ) ;
main( )
{
int i, j ;
for ( i = 0 ; i < M ; i++ )
for ( j = 0 ; j < N ; j++ )
a[i][j] = i + j ;
for ( i = 0 ; i < N ; i++ )
for ( j = 0 ; j < P ; j++ )
b[i][j] = i + j ;
mulmat ( M, N, P, a, b, c ) ;
for ( i = 0 ; i < M ; i++ )
{
printf ( "\n" ) ;
for ( j = 0 ; j < P ; j++ )
printf ( "%f\t", c[i][j] ) ;
}
}
void mulmat ( int m, int n, int p, float *a, float *b, float *c )
{
float *ptrtob, *ptrtoc ;
int i, j, k, nc ;
/* set all elements of matrix c to 0 */
for ( i = 0 ; i < m * p ; i++ )
*( c + i ) = 0 ;
for ( i = 0 ; i < m ; i++ )
{
ptrtob = b ;

for ( k = 0 ; k < n ; k++ )


{
ptrtoc = c ;
for ( j = 0 ; j < p ; j++ )
*ptrtoc++ += *a * *ptrtob++ ;
a++ ;
}
c += p ;
}
}
We know that C stores array elements in a row-major order. Hence to ensure that the
elements are accessed in the storage order the above program uses a variation of the
normal matrix-multiplication procedure. The pseudo code for this is given below:
for i = 1 to m
for j = 1 to p
c[i][j] = 0
end
for k = 1 to n
for j = 1 to p
c[i][j] = c[i][j] + a[i][k] * b[k][j]
end
end
end
81. Why is it not possible to scan strings from keyboard in case of array of pointers to
string?
Ans: When an array is declared, dimension of array should be specified so that
compiler can allocate memory for the array. When array of pointers to strings is
declared its elements would contain garbage addresses. These addresses would be
passed to scanf( ). So strings can be received but they would get stored at unkown
locations. This is unsafe.
82. Bit Arrays
If in a program a variable is to take only two values 1 and 0, we really need only a
single bit to store it. Similarly, if a variable is to take values from 0 to 3, then two bits
are sufficient to store these values. And if a variable is to take values from 0 through
7, then three bits will be enough, and so on. Why waste an entire integer when one or
two or three bits will do? Because there aren't any one bit or two bit or three bit data
types available in C. However, when there are several variables whose maximum
values are small enough to pack into a single memory location, we can use `bit fields'

to store several values in a single integer. Bit fields are discussed in most standard C
texts. They are usually used when we want to store assorted information which can be
accommodated in 1, 2, 3 bits etc.
For example, the following data about an employee can be easily stored using bit
fields.
male or female
single, married, divorced or widowed
have one of the eight different hobbies
can choose from any of the fifteen different schemes proposed by the company to
pursue his/her hobby.
This means we need one bit to store gender, two to store marital status, three for
hobby, and four for scheme (with one value used for those who are not desirous of
availing any of the schemes). We need ten bits altogether, which means we can pack
all this information into a single integer, since an integer is 16 bits long.
At times we may need to store several True or False statuses. In such cases instead of
using bit fields using an array of bits would be more sensible. On this array we may be
required to perform the following operations:
Set a bit (make it 1).
Clear a bit (make it 0).
Test the status of a bit in the array.
Reach the appropriate bit slot in the array.
Generate a bit mask for setting and clearing a bit.
We can implement these operations using macros given below:
#define CHARSIZE 8
#define MASK ( y ) ( 1 << y % CHARSIZE )
#define BITSLOT ( y ) ( y / CHARSIZE )
#define SET ( x, y ) ( x[BITSLOT( y )] |= MASK( y ) )
#define CLEAR ( x, y ) ( x[BITSLOT( y )] &= ~MASK( y ) )
#define TEST ( x, y ) ( x[BITSLOT( y )] & MASK( y ) )
#define NUMSLOTS ( n ) ( ( n + CHARSIZE - 1) / CHARSIZE )
Using these macros we can declare an array of 50 bits be saying,
char arr[NUMSLOTS(50)] ;
To set the 20th bit we can say,
SET(arr, 20 ) ;
And if we are to test the status of 40th bit we may say,
if ( TEST ( arr, 40 ) )
Using bit arrays often results into saving a lot of precious memory. For example, the
following program which implements the Sieve of Eratosthenes for generating prime
numbers smaller than 100 requires only 13 bytes. Had we implemented the same logic

using an array of integers we would have required an array of 100 integers, that is
200 bytes.
#include
#include
#define MAX 100
main( )
{
char arr[NUMSLOTS( MAX )] ;
int i, j ;
memset ( arr, 0, NUMSLOTS( MAX ) ) ;
for ( i = 2 ; i < MAX ; i++ )
{
if ( !TEST ( arr, i ) )
{
printf ( "\n%d", i ) ;
for ( j = i + i ; j < MAX ; j += i )
SET ( arr, j ) ;
}
}
}
83. Information Hiding in C
Though C language doesn't fully support encapsulation as C++ does, there is a simple
technique through which we can implement encapsulation in C. The technique that
achieves this is modular programming in C. Modular programming requires a little
extra work from the programmer, but pays for itself during maintenance. To
understand this technique let us take the example of the popular stack data structure.
There are many methods of implementing a stack (array, linked list, etc.). Information
hiding teaches that users should be able to push and pop the stack's elements without
knowing about the stack's implementation. A benefit of this sort of information hiding
is that users don't have to change their code even if the implementation details
change.
Consider the following scenario:
To be able to appreciate the benefits of modular programming and thereby information
hiding, would first show a traditional implementation of the stack data structure using
pointers and a linked list of structures. The main( ) function calls the push( ) and
pop( ) functions.
#include
typedef int element ;

void initialize_stack ( struct node ** ) ;


void push ( struct node **, element ) ;
element pop ( struct node * ) ;
int isempty ( struct node * ) ;
struct node
{
element data ;
struct node *next ;
};
void main( )
{
struct node *top ;
element num ;
initialize_stack ( &top ) ;
push ( &top, 10 ) ;
push ( &top, 20 ) ;
push ( &top, 30 ) ;
if ( isempty ( top ) )
printf ( "\nStack is empty" ) ;
else
{
num = pop ( top ) ;
printf ( "\n Popped %d", num ) ;
}
}
void initialize_stack ( struct node **p )
{
*p = NULL ;
}
void push ( struct node **p, element n )
{
struct node *r ;
r = ( struct node *) malloc ( sizeof ( struct node ) ) ;
r -> data = n ;
if ( *p == NULL )
r -> next = NULL ;
else
r -> next = *p ;
*p = r ;

}
element pop ( struct node *p )
{
element n ;
struct node *r ;
n = p -> data ;
r=p;
p = p -> next ;
free ( r ) ;
return ( n ) ;
}
int isempty ( struct node *p )
{
if ( p == NULL )
return ( -1 ) ;
else
return ( 0 ) ;
}
Notice how the specific implementation of the data structure is strewn throughout
main( ). main( ) must see the definition of the structure node to use the push( ),
pop( ), and other stack functions. Thus the implementation is not hidden, but is mixed
with the abstract operations.
Data Structures
Radix Sort
This sorting technique is based on the values of the actual digits in the positional
representations of the numbers being sorted. Using the decimal base, for example,
where the radix is 10, the numbers can be partitioned into ten groups on the sorter.
For example, to sort a collection of numbers where each number is a four-digit
number, then, All the numbers are first sorted according to the the digit at unit's
place.
In the second pass, the numbers are sorted according to the digit at tenth place. In
the third pass, the numbers are sorted according to the digit at hundredth place. In
the forth and last pass, the numbers are sorted according to the digit at thousandth
place.
During each pass, each number is taken in the order in which it appears in partitions
from unit's place onwards. When these actions have been performed for each digit,
starting with the least significant and ending with most significant, the numbers are
sorted. This sorting method is called the radix sort.

Let us take another example. Suppose we have a list of names. To sort these names
using radix sort method we will have to classify them into 26 groups The list is first
sorted on the first letter of each name, i.e. the names are arranged in 26 classes,
where the first class consists of those names that begin with alphabet 'A', the second
class consists of those names that begin with alphabet 'B' and so on. During the
second pass each class is alphabetized according to the second letter of the name, and
so on.
84. Exception Handling in C
Consider the following program:
#include
void main( )
{
float i ;
i = pow ( -2, 3 ) ;
printf ( "%f", i ) ;
}
int matherr ( struct exception *a )
{
if ( a -> type == DOMAIN )
{
if ( !strcmp ( a -> name, "pow" ) )
{
a -> retval = pow ( - ( a -> arg1 ), a -> arg2 ) ;
return 1 ;
}
}
return 0 ;
}
If we pass a negative value in pow( ) function a run time error occurs. If we wish to
get the proper output even after passing a negative value in the pow( ) function we
must handle the run time error. For this, we can define a function matherr( ) which is
declared in the 'math.h' file. In this function we can detect the run-time error and
write our code to correct the error. The elements of the exception structure receives
the function name and arguments of the function causing the exception.
Data Structures
AVL Trees
For ideal searching in a binary search tree, the heights of the left and right sub-trees
of any node should be equal. But, due to random insertions and deletions performed

on a binary search tree, it often turns out to be far from ideal. A close approximation
to an ideal binary search tree is achievable if it can be ensured that the difference
between the heights of the left and the right sub trees of any node in the tree is at
most one. A binary search tree in which the difference of heights of the right and left
sub-trees of any node is less than or equal to one is known as an AVL tree. AVL tree is
also called as Balanced Tree. The name "AVL Tree" is derived from the names of its
inventors who are Adelson-Veilskii and Landi. A node in an AVL tree have a new field
to store the "balance factor" of a node which denotes the difference of height between
the left and the right sub-trees of the tree rooted at that node. And it can assume one
of the
three possible values {-1,0,1}.
85. Unique combinations for a given number
How do I write a program which can generate all possible combinations of numbers
from 1 to one less than the given number ?
main( )
{
long steps, fval, bstp, cnt1 ;
int num, unit, box[2][13], cnt2, cnt3, cnt4 ;
printf ( "Enter Number " ) ;
scanf ( "%d", &num ) ;
num = num < 1 ? 1 : num > 12 ? 12 : num ;
for ( steps = 1, cnt1 = 2 ; cnt1 <= num ; steps *= cnt1++ ) ;
for ( cnt1 = 1 ; cnt1 <= steps ; cnt1++ )
{
for ( cnt2 = 1 ; cnt2 <= num ; cnt2++ )
box[0][cnt2] = cnt2 ;
for ( fval = steps, bstp = cnt1, cnt2 = 1 ; cnt2 <= num ; cnt2++ )
{
if ( bstp == 0 )
{
cnt4=num ;
while ( box[0][cnt4] == 0 )
cnt4-- ;
}
else
{
fval /= num - cnt2 + 1 ;
unit = ( bstp + fval - 1 ) / fval ;

bstp %= fval ;
for ( cnt4 = 0, cnt3 = 1 ; cnt3 <= unit ; cnt3++ )
while ( box[0][++cnt4] == 0 ) ;
}
box[1][cnt2] = box[0][cnt4] ;
box[0][cnt4] = 0 ;
}
printf ( "\nSeq.No.%ld:", cnt1 ) ;
for ( cnt2 = 1 ; cnt2 <= num ; cnt2++ )
printf ( " %d", box[1][cnt2] ) ;
}
}
This program computes the total number of steps. But instead of entering into the loop
of the first and last combination to be generated it uses a loop of 1 to number of
combinations. For example, in case of input being 5 the number of possible
combinations would be factorial 5, i.e. 120. The program suffers from the limitation
that it cannot generate combinations for input beyond 12 since a long int cannot
handle the resulting combinations.
Data Structures
Hashing...
Hashing or hash addressing is a searching technique. Usually, search of an element is
carried out via a sequence of comparisons. Hashing differs from this as it is
independent of the number of elements n in the collection of data. Here, the address
or location of an element is obtained by computing some arithmetic function. Hashing
is usually used in file management. The general idea is of using the key to determine
the address of a record. For this, a function fun( ) is applied to each key, called the
hash function. Some of the popular hash functions are: 'Division' method, 'Midsquare'
method, and 'Folding' method. Two records cannot occupy the same position. Such a
situation is called a hash collision or a hash clash. There are two basic methods of
dealing with a hash clash. The first technique, called rehashing, involves using
secondary hash function on the hash key of the item. The rehash function is applied
successively until an empty position is found where the item can be inserted. If the
hash position of the item is found to be occupied during a search, the rehash function
is again used to locate the item. The second technique, called chaining, builds a linked
list of all items whose keys hash to the same values. During search, this short linked
list is traversed sequentially for the desired key. This technique involves adding an
extra link field to each table position.

86. The following program demonstrates how to get input from the user in graphics mode,
echoed in the current colors and font size and font style.
#define ON 1
#define OFF 0
#include
main( )
{
char nameString[80], ageString[80] ;
int age, gd = DETECT, gm ;
initgraph ( &gd, &gm, "c:\\tc\\bgi" ) ;
setbkcolor ( BLUE ) ;
setcolor ( YELLOW ) ;
settextstyle ( GOTHIC_FONT, HORIZ_DIR, 0 ) ;
moveto ( 0, 0 ) ;
outtext ( "Enter your name: " ) ;
getGrString ( nameString ) ;
moveto ( 0, gety( ) + textheight ( "A" ) ) ;
outtext ( "Name: " ) ;
outtext ( nameString ) ;
moveto ( 0, gety( ) + textheight ( "A" ) ) ;
outtext ( "Press key to exit! " ) ;
getch( ) ;
closegraph( ) ;
restorecrtmode( ) ;
}
getGrString ( char *inputString )
{
int stringIndex = 0, oldColor ;
char ch, outString[2] ;
/* xVal will store the screen position for each char */
int xVal[255] ;
outString[1] = 0 ;
xVal[0] = getx( ) ;
do
{
cursor ( ON ) ;
ch = getch( ) ;
cursor ( OFF ) ;
if ( ch == 0 ) /* avoid dealing with all special keys */

getch( ) ;
else
{
if ( ch == 8 ) /* backspace */
{
oldColor = getcolor( ) ;
--stringIndex ;
if ( stringIndex < 0 )
stringIndex = 0 ;
/* move to ( old horz position, current vert position ) */
moveto ( xVal[stringIndex], gety( ) ) ;
setcolor ( getbkcolor( ) ) ;
outString[0] = inputString[stringIndex] ;
outtext ( outString ) ;
moveto ( xVal [stringIndex], gety( ) ) ;
setcolor ( oldColor ) ;
}
else
{
inputString[stringIndex] = ch ;
outString[0] = ch ;
outtext ( outString ) ;
++stringIndex ;
xVal[stringIndex] = getx( ) ;
}
}
} while ( ch != 13 && ch != 10 ) ;
inputString[stringIndex] = 0 ;
}
cursor ( int on )
{
int curX, oldColor ;
/* we'll use an underscore as a cursor */
char uBarStr[2] = { '_', 0 } ;
if ( !on )
{
oldColor = getcolor( ) ;
setcolor ( getbkcolor( ) ) ;
}

/* save horizontal position before drawing cursor */


curX = getx( ) ;
outtext ( uBarStr ) ;
moveto ( curX, gety( ) ) ;
/* if we changed the color to erase cursor, change it back */
if ( !on )
setcolor ( oldColor ) ;
}
The function getGrString( ) echoes graphically the user input and stores it in a buffer,
and the function cursor( ) handles the cursor position.
System Utility
What is garbage collection?
Ans: Suppose some memory space becomes reusable because a node is released from
a linked list. Hence, we want the space to be available for future use. One way to bring
this about is to immediately reinsert the space into the free-storage list. However, this
method may be too time-consuming for the operating system. The operating system
may periodically collect all the deleted space onto the free-storage list. The technique
that does this collection is called Garbage Collection. Garbage Collection usually takes
place in two steps: First the Garbage Collector runs through all lists, tagging whose
cells are currently in use, and then it runs through the memory, collecting all untagged
space onto the free-storage list. The Garbage Collection may take place when there is
only some minimum amount of space or no space at all left in the free-storage list, or
when the CPU is idle and has time to do the collection. Generally speaking, the
Garbage Collection is invisible to the programmer.
87. How do I get the time elapsed between two function calls ?
Ans: The function difftime( ) finds the difference between two times. It calculates the
elapsed time in seconds and returns the difference between two times as a double
value.
#include
#include
#include
main( )
{
int a[] = { 2, -34, 56, 78, 112, 33, -7, 11, 45, 29, 6 } ;
int s ;
time_t t1, t2 ; // time_t defines the value used for time function
s = sizeof ( a ) / 2 ;

t1 = time ( NULL ) ;
sel_sort ( a, s ) ; // sort array by selection sort
bub_sort ( a, s ) ; // sort array by bubble sort method
t2 = time ( NULL ) ;
printf ( "\nThe difference between two function calls is %f", difftime (
t2, t1 ) ) ;
}
In the above program we have called difftime( ) function that returns the time elapsed
from t1 to t2.
88. General
main( )
{
char *s ;
s = fun ( 128, 2 ) ;
printf ( "\n%s", s ) ;
}
fun ( unsigned int num, int base )
{
static char buff[33] ;
char *ptr ;
ptr = &buff [ sizeof ( buff ) - 1 ] ;
*ptr = '\0' ;
do
{
*--ptr = "0123456789abcdef"[ num % base ] ;
num /= base ;
} while ( num != 0 ) ;
return ptr ;
}
The above program would convert the number 128 to the base 2. You can convert a
number to a hexadecimal or octal form by passing the number and the base, to the
function fun( ).
Data Structures
What is a priority queue?
Ans: As we know in a stack, the latest element is deleted and in a queue the oldest
element is deleted. It may be required to delete an element with the highest priority in
the given set of values and not only the oldest or the newest one. A data structure
that supports efficient insertions of a new element and deletions of elements with the

highest priority is known as priority queue. There are two types of priority queues: an
ascending priority queue is a collection of items into which items can be inserted
arbitrarily and from which only the smallest item can be removed. A descending order
priority queue is similar but allows only the largest item to be deleted.
89. What is the difference between const char *p, char const *p, and char* const p ?
'const char *p' and 'char const *p' are the same, i.e. p points to a constant character.
On the other hand, 'char* const p' means p is a constant pointer pointing to a
character which means we cannot change the pointer p but we can change the
character which p is pointing to.
90. What's the difference between a null pointer, a NULL macro, the ASCII NUL character
and a null string?
Ans: A null pointer is a pointer which doesn't point anywhere. A NULL macro is used to
represent the null pointer in source code. It has a value 0 associated with it. The
ASCII NUL character has all its bits as 0 but doesn't have any relationship with the null
pointer. The null string is just another name for an empty string "".
System Utility
Sparse Matrix...
A sparse matrix is one where most of its elements are zero. There is no precise
definition as to know whether a matrix is sparsed or not, but it is a concept which we
all can recognize intuitively. The natural method of representing matrices in memory
as two-dimensional arrays may not be suitable for sparse matrices. That is one may
save space by storing only those entries which may be nonzero. If this is done, then
the matrix may be thought of as an ordered list of non-zero elements only.
Information about a non-zero element has three parts:
an integer representing its row,
an integer representing its column and
the data associated with this element.
That is, each element of a matrix is uniquely characterized by its row and column
position, say i, j. We might store that matrix as a list of 3-tuples of the form (i, j,
data), as shown below,
Although the non-zero elements may be stored in the array in any order, keeping
them ordered in some fashion may be advantageous for further processing. Note that
above array is arranged in increasing order of the row number of non-zero elements.
Moreover, for elements in the same row number, the array is arranged in order of
increasing column number.
91. Pointers
What does the error "Null Pointer Assignment" mean and what causes this error?

Ans: The Null Pointer Assignment error is generated only in small and medium
memory models. This error occurs in programs which attempt to change the bottom of
the data segment. In Borland's C or C++ compilers, Borland places four zero bytes at
the bottom of the data segment, followed by the Borland copyright notice "Borland C+
+ - Copyright 1991 Borland Intl.". In the small and medium memory models, a null
pointer points to DS:0000. Thus assigning a value to the memory referenced by this
pointer will overwrite the first zero byte in the data segment. At program termination,
the four zeros and the copyright banner are checked. If either has been modified, then
the Null Pointer Assignment error is generated. Note that the pointer may not truly be
null, but may be a wild pointer that references these key areas in the data segment.
Data Structures
How to build an expression trees ?
Ans: An expression tree is a binary tree which is built from simple operands and
operators of an (arithmetic or logical ) expression by placing simple operands as the
leaves of a binary tree and the operators as the interior nodes. If an operator is binary
, then it has two nonempty subtrees, that are its left and right operands (either simple
operands or sub expressions). If an operator is unary, then only one of its subtrees is
nonempty, the one on the left or right according as the operator is written on the right
or left of its operand. We traditionally write some unary operators to the left of their
operands, such as "-" ( unary negation) or the standard functions like log( ), sin( ) etc.
Others are written on the right, such as the factorial function ()!. If the operator is
written on the left, then in the expression tree we take its left subtree as empty. If it
appears on the right, then its right subtree will be empty. An example of an expression
tree is shown below for the expression ( -a < b ) or ( c + d ) .
92. Can we get the remainder of a floating point division ?
Ans : Yes. Although the % operator fails to work on float numbers we can still get the
remainder of floating point division by using a function fmod( ). The fmod( ) function
divides the two float numbers passed to it as parameters and returns the remainder as
a floating-point value. Following program shows fmod( ) function at work.
#include
main( )
{
printf ( "%f", fmod ( 5.15, 3.0 ) ) ;
}
The above code snippet would give the output as 2.150000.
93. How to extract the integer part and a fractional part of a floating point number?
Ans: C function modf( ) can be used to get the integer and fractional part of a floating
point.

#include "math.h"
main( )
{
double val, i, f ;
val = 5.15 ;
f = modf ( val, &i ) ;
printf ( "\nFor the value %f integer part = %f and fractional part = %f",
val, i, f ) ;
}
The output of the above program will be:
For the value 5.150000 integer part = 5.000000 and fractional part =
0.150000
94. How do I define a pointer to a function which returns a char pointer?
Ans:
char * ( *p )( ) ;
or
typedef char * ( * ptrtofun )( ) ;
ptrtofun p ;
Here is a sample program which uses this definition.
main( )
{
typedef char * ( * ptrtofun ) ( ) ;
char * fun( ) ;
ptrtofun fptr ;
char *cptr ;
fptr = fun ;
cptr = (*fptr) ( ) ;
printf ( "\nReturned string is \"%s\"", cptr ) ;
}
char * fun( )
{
static char s[ ] = "Hello!" ;
printf ( "\n%s", s ) ;
return s ;
}
95. What's wrong with the following declaration: char* ptr1, ptr2 ; get errors when I try to
use ptr2 as a pointer.

Ans: char * applies only to ptr1 and not to ptr2. Hence ptr1 is getting declared as a
char pointer, whereas, ptr2 is being declared merely as a char. This can be rectified in
two ways :
char *ptr1, *ptr2 ;
typedef char* CHARPTR ; CHARPTR ptr1, ptr2 ;
96. How to use scanf( ) to read the date in the form of dd-mm-yy?
Ans: To read the date in the form of dd-mm-yy one possible way is,
int dd, mm, yy ;
char ch ; /* for char '-' */
printf ( "\nEnter the date in the form of dd-mm-yy : " ) ;
scanf( "%d%c%d%c%d", &dd, &ch, &mm, &ch, &yy ) ;
Another way is to use suppression character * is as follows:
int dd, mm, yy ;
scanf( "%d%*c%d%*c%d", &dd, &mm, &yy ) ;
The suppression character '*' suppresses the input read from the standard input buffer
for the assigned control character.
97. Why the output of sizeof ( 'a' ) is 2 and not 1 ?
Ans: Character constants in C are of type int, hence sizeof ( 'a' ) is equivalent to sizeof
( int ), i.e. 2. Hence the output comes out to be 2 bytes.
98. Can we use scanf( ) function to scan a multiple words string through keyboard?
Ans: Yes. Although we usually use scanf( ) function to receive a single word string and
gets( ) to receive a multi-word string from keyboard we can also use scanf( ) function
for scanning a multi-word string from keyboard. Following program shows how to
achieve this.
main( )
{
char buff[15] ;
scanf ( "%[^\n]s", buff ) ;
puts ( buff ) ;
}
In the scanf( ) function we can specify the delimiter in brackets after the ^ character.
We have specified '\n' as the delimiter. Hence scanf( ) terminates only when the user
hits Enter key.
99. How to set the system date through a C program ?
Ans: We can set the system date using the setdate( ) function as shown in the
following program. The function assigns the current time to a

structure date.
#include "stdio.h"
#include "dos.h"
main( )
{
struct date new_date ;
new_date.da_mon = 10 ;
new_date.da_day = 14 ;
new_date.da_year = 1993 ;
setdate ( &new_date ) ;}
100.

How can I write a general-purpose swap without using templates?

Ans: Given below is the program which uses the stringizing preprocessor directive ##
for building a general purpose swap macro which can swap two integers, two floats,
two chars, etc.
#define swap( a, b, t ) ( g ## t = ( a ), ( a ) = ( b ), ( b ) = g ## t )
int gint;
char gchar;
float gfloat ;
main( )
{
int a = 10, b = 20 ;
char ch1 = 'a' , ch2 = 'b' ;
float f1 = 1.12, f2 = 3.14 ;
swap ( a, b, int ) ;
printf ( "\na = %d b = %d", a, b ) ;
swap ( ch1, ch2, char ) ;
printf ( "\nch1 = %c ch2 = %c", ch1, ch2 ) ;
swap ( f1, f2, float ) ;
printf ( "\nf1 = %4.2f f2 = %4.2f", f1, f2 ) ;
}
swap ( a, b, int ) would expand to,
( gint = ( a ), ( a ) = ( b ), ( b ) = gint )
101.

What is a heap ?

Ans : Heap is a chunk of memory. When in a program memory is allocated


dynamically, the C run-time library gets the memory from a collection of unused
memory called the heap. The heap resides in a program's data segment. Therefore,

the amount of heap space available to the program is fixed, and can vary from one
program to another.
102.

How to obtain a path of the given file?

Ans: The function searchpath( ) searches for the specified file in the subdirectories of
the current path. Following program shows how to make use of the searchpath( )
function.
#include "dir.h"
void main ( int argc, char *argv[] )
{
char *path ;
if ( path = searchpath ( argv[ 1 ] ) )
printf ( "Pathname : %s\n", path ) ;
else
printf ( "File not found\n" ) ;
}
103.

Can we get the process identification number of the current program?

Ans: Yes! The macro getpid( ) gives us the process identification number of the
program currently running. The process id. uniquely identifies a program. Under DOS,
the getpid( ) returns the Program Segment Prefix as the process id. Following program
illustrates the use of this macro.
#include
#include
void main( )
{
printf ( "The process identification number of this program is %X\n",
getpid( ) ) ;
}
104.

How do I write a function that takes variable number of arguments?

Ans: The following program demonstrates this.


#include
#include
void main( )
{
int i = 10 ;
float f = 2.5 ;
char *str = "Hello!" ;
vfpf ( "%d %f %s\n", i, f, str ) ;

vfpf ( "%s %s", str, "Hi!" ) ;


}
void vfpf ( char *fmt, ... )
{
va_list argptr ;
va_start ( argptr, fmt ) ;
vfprintf ( stdout, fmt, argptr ) ;
va_end ( argptr ) ;
}
Here, the function vfpf( ) has called vfprintf( ) that take variable argument lists.
va_list is an array that holds information required for the macros va_start and va_end.
The macros va_start and va_end provide a portable way to access the variable
argument lists. va_start would set up a pointer argptr to point to the first of the
variable arguments being passed to the function. The macro va_end helps the called
function to perform a normal return.
105.

Can we change the system date to some other date?

Ans: Yes, We can! The function stime( ) sets the system date to the specified date. It
also sets the system time. The time and date is measured in seconds from the
00:00:00 GMT, January 1, 1970. The following program shows how to use this
function.
#include
#include
void main( )
{
time_t tm ;
int d ;
tm = time ( NULL ) ;
printf ( "The System Date : %s", ctime ( &tm ) ) ;
printf ( "\nHow many days ahead you want to set the date : " ) ;
scanf ( "%d", &d ) ;
tm += ( 24L * d ) * 60L * 60L ;
stime ( &tm ) ;
printf ( "\nNow the new date is : %s", ctime ( &tm ) ) ;
}
In this program we have used function ctime( ) in addition to function stime( ). The
ctime( ) function converts time value to a 26-character long string that contains date
and time.

106.

How to use function strdup( ) in a program?

Ans : The string function strdup( ) copies the given string to a new location. The
function uses malloc( ) function to allocate space required for the duplicated string. It
takes one argument a pointer to the string to be duplicated. The total number of
characters present in the given string plus one bytes get allocated for the new string.
As this function uses malloc( ) to allocate memory, it is the programmer?s
responsibility to deallocate the memory using free( ).
#include
#include
#include
void main( )
{
char *str1, *str2 = "double";
str1 = strdup ( str2 ) ;
printf ( "%s\n", str1 ) ;
free ( str1 ) ;
}
107.

On including a file twice I get errors reporting redefinition of function.

How can I avoid duplicate inclusion?


Ans: Redefinition errors can be avoided by using the following macro definition.
Include this definition in the header file.
#if !defined filename_h
#define filename_h
/* function definitions */
#endif
Replace filename_h with the actual header file name. For example, if name of file to be
included is 'goto.h' then replace filename_h with 'goto_h'.
108.

How to write a swap( ) function which swaps the values of the variables using

bitwise operators.
Ans: Here is the swap( ) function.
swap ( int *x, int *y )
{
*x ^= *y ;
*y ^= *x ;
*x ^= *y ;
}
The swap( ) function uses the bitwise XOR operator and does not require any
temporary variable for swapping.

Texas Instruments
Date : 8/9/2005
1.

given an expression tree and asked us to write the in fix of that expression
four choices : 2

2.

global variables in different files are


a:at compiletime
b) loading time
c) linking time
d)execution time

3.

size of(int)
a) always 2 bytes
b) depends on compiler that is being used
c) always 32 bits
d) can't tell

4.

which one will over flow given two programs


2 prog 1: prog2:
main() main()
{{
int fact; int fact=0
long int x; for(i=1;i<=n;i++)
fact=factoral(x); fact=fact*i;
}}
int factorial(long int x)
{
if(x>1) return(x*factorial(x-1);
}
a) program 1;
b) program 2;
c) both 1 &2
d) none
}

5.

variables of fuction call are allocated in


a) registers and stack
b) registers and heap

c) stack and heap


d)
6.

avg and worst case time of sorted binary tree

7.

data structure used for proority queue


a) linked list b) double linkedd list c)array d) tree

8.

main(){
char str[5]="hello";
if(str==NULL) printf("string null");
else printf("string not null");
}
what is out put of the program?
a) string is null b) string is not null c) error in program d) it executes but print nothing

9.

There are 0ne 5 pipe line and another 12 pipe line sates are there and flushed time
taken to execute five instructions a) 10,17
b) 9,16
c)25,144
d)

10. for hashing which is best on terms of buckets


a)100 b)50 c)21 d)32 ans 32
11. void f(int value){
for (i=0;i<16;i++){
if(value &0x8000>>1) printf("1")
else printf("0");
}
}
what is printed?
a) bineray value of argument b)bcd value c) hex value d) octal value
12. void f(int *p){
static val=100;
val=&p;
}
main(){
int a=10;

printf("%d ",a);
f(&a);
printf("%d ",a);
}
what will be out put?
a)10,10
13. struck a{
int x;
float y;
char c[10];
}
union b{
int x;
float y;
char c[10];
}
which is true?
a) size of(a)!=sizeof(b);
b)
c)
d)
14. # define f(a,b) a+b
#defiune g(c,d) c*d
find valueof f(4,g(5,6))
a)26 b)51 c) d)
15. find avg access time of cache
a)tc*h+(1-h)*tm b)tcH+tmH
c) d) tc is time to access cache tm is time to access when miss occure
16. main()
{
char a[10]="hello";
strcpy(a,'\0');
printf("%s",a);
}
out put of the program?
a) string is null b) string is not null c) program error d)

17. simplyfy k map


1xx0
1x01
18. int f(int a)
{
a=+b;
//some stuff
}
main()
{
x=fn(a);
y=&fn;
what are x & y types
a) x is int y is pointer to afunction which takes integer value
19. char a[5][15];
int b[5][15];
address of a 0x1000 and b is 0x2000 find address of a[3][4] and b[3][4]
assume char is 8 bits and int is 32 bits
a) b) c) d)
there are 20 questions all in techinical paper and 36 questions in appititude test in
appititude thay have given all diagrams and asked to find what comes next thay are
quite easy and i hope if u practice r.s aggraval u can do it easily for tecnical thay have
given 1 hr for 20 questions and for not technical thay have given only 40 min and 36
questions
this is the paper i have right now for TI aptitude test consist of all pictorial questions.
ie in each question he will give 8 diagrams and ask to find th 9'th diagram in that
sequence.You go through RS Agarwal. These aptitude questins are
very easy. Just pratice them. In RS Agarwal gothrough SERIES chapter. It is suffient.
There are 35 aptitude
questions. First 25 are very easy. Do these questions in just 15 or 20 minutes.
Because last questions are
very touch.
TECHNICAL TEST:
1.

3 flipflops are connected so that after 0 to 5 count occured next number is zero. So
what is the counter?
Ans: mod 6 counter

2.

simplication of some boolean expression which is simple. Boolean Expression is A+A'B.


Ans:A+B

3.

Given inorder sequence and preorder sequence and asked to find out postorder
sequence.

4.

Some question on value of a static variable.

5.

Given an interger in binary form,find the number of ones in that number without
counting each bit.(This questin is not multiple choice question. This question carries
more marks. So please take care for this question.)

6.

1-way set associative memory is called----a)direct b)something c)1-way set associative 4)something
Ans: c

7.

Fastest IPC mechanism is


a)shared memory b)pipes c)named pipes d)semaphores
Ans:c

8.

Some page references are given. You are asked to implement it with Least Frequently
Used algorithm.

9.

Some diagram is given. Iam describinmg the diagram. A 2*1 MUX is given. The inputs
are A,B. Output is C. C and A are tied together. What is the diagram.?
Ans:Latch.
This paper is for Electrical & Electronics students. There is separate test for computer
Science Students. There are 20 questions.

1.

2.

1)Some circuit is given. Iam describing the circuit.A resistor R & a capacitor C are
connected in parallel.
To this circuit another circuit which is having a capacitorof capacity 2C & an impedence
Z, is connected in series.
You are asked to find out the value of Z? Note that 2C & Zare connected in series.
a)Z=2C
b)Z=2L
c)Z=L/2
d)Z=2R
Some circuit which consist of only resistors R is given. This is a repetative circuit. U
have to find the effctive
resistance of the entire circuit.
A)Rin=R
B)Rin=(5+sqrt(3))/7

C)Rin=(19+sqrt(3))/8
D)None.
3.

Two wave forms are given. You are asked to write the cirsuit to get B(second wave
form) from A(first wave form).

4.

#define SUM(a,b) a+b


main()
{
a=2;
b=3;
x=SUM(a,b)*2;
printf("x=%d\n",x);
}
Ans:8.

5.

number(int i)
{
number++;
printf("%d\n",number);
}
main()
{
static int i=0;
number(i);
}
Ans: I don't know.

6.

Some circuit is given. I can't describe the circuit. There are


3 resistors,3 capacitors & one inverter.. The question is
What is the value of the frequency such that the circuit oscillates.
A)f=RC
B)f=sqrt(3)/(Pi*R*C)
C)f=1/(Pi*R*C)
D)something
Ans:I don't know the answer.

7.

7)Question on flipflop. So gothrough all flipflops.

8.

8)There are 5 questions on Nmos & Pmos circuits.

This Paper is for Computer Science Students. THis paper is very easy. You can
definitely do it in one hour.
1.

The fastest memory is


(i) DRAM, (ii) ROM, (iii) SRAM, (iv) Main memory
Ans : SRAM

2.

Programing exceptions are


(i) Asynchronous, (ii) Synchronous, (iii) None
Ans : Asynchronous

3.

DSP which architecture is used


(i) MIMD, (ii) SIMD, (iii) Nueman, (iv) Harvard Architecture
Ans : Harvard Architecture

4.

C prog. for searching for an element in linked list

5.

main()
{
unsigned char i;
int sum;
for(i=0; i<300; i++)
sum+ = i;
printf("\nSum = %d\n", sum);
}
Ans : infinite loop

6.

void fn(int *p)


{
static int val = 100;
p = &val;
}
main()
{
int i=10;
printf("i=%d\n", i);
fn(&i);
printf("i=%d\n", i);
}
Ans : i=10 i=10

7.

int a[10[15];
char b[10[15];
(a) location g a[3][4], if base location g a[0][0] is ox1000
(b) location g b[3][4], if base location g b[0][0] is ox2000
int taken 32 bits and char taken 8 bits.
Ans : (a) ox10C4 (b) ox2031

8.

Implement OR gate function with 2*1 MUX


Ans : A ___________
--------|2*1 MUX |
B | |--------o/p
--------| |
| ----------|_______|C
B=C

9.

Implement 4*1 MUX with 2*1 MUXES

10. Swapping without using a temporary variables. (2 methods)


(i) x = x+y;
y = x-y;
x = x-y;
(ii) x = x^y;
y = x^y;
x = x^y;
11. Count no of 1's in a word without using bit by bit. (This question carries more marks.
It is not a multiple choice
question.
12. Code 1 :
for(i=0; i<1000; i++)
for(j=0; j<100; j++)
x = y;
Code 2 :
for(i=0; i<100; i++)
for(j=0; j<1000; j++)
x = y;
Which code will execute faster
(i) Code 1 and Code 2 are of same speed,

(ii) Code 1,
(iii) Code 2,
(iv) None.
Ans : Code 2
13. main()
{
int a[10] = {1, 2, 3, ...., 10}, i, x=10, temp;
for(i=0; i
temp = a[i];
a[i] = a[x-i-1];
a[x-i-1] = temp;
}
(i) All contents of array a are reversed
(ii) Only some portions are altered
(iii) Remains same
(iv) None
Ans : (iii)
14. An array is stored in row major order. The memory capacity is 30 MB. And in unix
system demand paging is used. Which one will give more page faults?
#define V_L_I 10000
int i, j, array[V_L_I][V_L_I];
Code 1 :
array[i][j] = 1;
Code 1 :
for(j=0; j
for(i=0; i
array[i][j] = 1;
Ans : Code 2
15. In C which parameter passing technique is used?
(i) call by value,
(ii) call by reference,
(iii) both
Ans : call by value
16. A circuit is given with 2 exclusive OR gates whose boolean expression will be y = '(AB)
+ AB (' indicates bar)

17. (17) main()


{
int i = 1;
fork();
fork();
printf("\ni = %d\n", i+1);
}
Ans : 4 printfs will occur and i = 2
18. Compute the complexity of Binary search.
Ans : O(lg n) ( Answer in detail. This is not a multiple choice question. It carries more
marks.)
19. Write expression for the tree graph :
Ans : ((a-b) + c*d)/x
20. # define MAX(a, b) a>b ? a:b
main()
{
int m, n;
m = 3 + MAX(2, 3);
n = 2 * MAX(3, 2);
printf("m = %d, n = %d\n", m, n)
}
Ans : m=2, n=3

Hi.. I have attended Honeywell interview on 13th ofSeptember 2008 at HTS, Bannergatta,,
Bangalore.
It has total of Four Rounds,
1. Written Test (Completetly technical) 30 mins
2. Technical Interview around 45 mins
3. Technical Interview around 45 mins
4. Technical Interview around 15 mins
5. HR interview around 15 mins
Written TEst questions were from Entirely C.
I got Question Paper 2
It had questions on File operations, Basic functions,
Pointer to functions, pointer declarations, functioncall in a for loop...
I have recalled what ever i could and provided here....

Written test had total of 31 questions and no negative marks....


1. how to allocate memory for 10 integers and make the contents zeo?
ans : ptr= calloc(10, int value);
2. what will be the output?
void increment()
{
return x++;
}
for(x=0;x<10;increment())
{
some operation;
}
Ans : I have not tried... may be error
3. HOw to free the allocated memory?
Ans : free();
4. HOw to initialize constant pointer?
5. what is the ouput?
int modifycalue()
{
x=x+10;
}
int changevalue(x)
{
x=x+1;
}

void main()
{
int x=10;
changevalue(x);
x++;
printf("%d", x);

x++;
printf("%d", x);
modifyvalue();
printf("%d", x);
}
Ans : 11, 12, 12
The above question is 90% repruduced here
6.a question on hoe to free the node in linked list in a for loop....
we have say whether it is correct or not....
8. x=0;
while(x<10)
{
stmt;
x++;
}
Represent in for loop. options given
Nothing much i remember about the written test....
In technical interview they asked only the basics, and about the project and what i have
mentioned in the resume and about the embedded protocols.
In HR, they asked....
1. Tell me about ur self

2. what do you consider as your strength and give an example?


3. Have you ever faced a situation so that you are required to convince your boss and ghow
you did it?
4. HAve you ever had a situation, that you could not complete your task in time and how you
managed that?
5. Have you ever interacted with the customer directly?
6. What are your achievements?
7. What is your role in your project?
8. DId you ever faced a situation that you have to argue on the other side and how you
convinced?
9. what made you to choose honeywell?
and some more questions....

I have went till HR and result on Hold... Good luck to all.....


Novell Recruitment test conducted on (20/9/04). There is four section in test.
1.

Aptitude 20 questions 20 minutes

2.

System comcept 20 questions 15 minutes

3.

C programming 15 questions 20 minutes

4.

Passage on java/internet 10 min

Aptitude
1.

A problem on time and work ,A and b takes 15 days to completer the work,A

takes 30 days so how many days B take?


2.

A question on compound interest with 5 sub questions,simple if u know the

concept.
3.

A question on finding the speed of boat given the speed of upstream and

downstream.
System Concept ( mainly questions from OS,data structures,networks)
4.

Berkeley sockets-ans :connection oreiented.

5.

A question on bankers algorithm

6.

Complexity of hastable

7.

What is Cpu timeslice?

8.

Aquestion on DMA

C programming

9.

One pointer diff is given like this:

int *(*p[10])(char *)
Explain the variable assignment
10.

For the following C program

void fn(int *a, int *b)


{
int *t;
t=a;
a=b;
b=t;
}
main()
{
int a=2;
int b=3;
fn(&a,&b);
printf("%d,%d", a,b);
}
What is the output?
a) Error at runtime
b) Compilation error
c) 2 3
d) 3 2
11.

main()

{
printf("hello"):
main();
}
what is the output?
ans :stack overflow
Novell Sample Test paper
Paper consist of
OS : 10 Q
C : 10 Q
C++:10 Q
Java : 10 Q
OS is compulsory and you can choose any one of these three language
C++ Questions

1.

If there is one class template which has one static member variable that static

variable will belong to


a) Every instance of class template will share the same copy of static variable
b) Every instance of class template will have its own copy of static variable.
c) Compilation error
d) Don't remember.
2.

What is template specialization ???

a) define a new template class for a specific data type.


b)c)d)
3.

How we will overload operator *+= such that

obj1 *+= obj2;


implies that
obj1=obj1*(obj1+obj2);
four choice were there last option was d) it is not possible I checked that option.
4.

In C++ what does the operator overloading means.

a) Giving new meaning to existing C++ operators


b) defining functionality of existing C++ operator for user define objects.
c) defining new operators.
d) don't remember.
5.

what is '>>' in C++

a) right shift operator and insertion operator depend upon the use
b) right shift operator and extraction operator depend upon the context use
c) right shift operator and insertion/extraction operator depend upon the use
6.

class A

{
int a ,b;
A() : a(0)
{
b=0;}
};
if you create obj of this class as A obj;
a) b will be initialized before a
b) a will be initialized before b
c) both will be initialized together
d) none of these.
OS Question (All OS questions were based on basics of UNIX all small -2 commands.)
1.

How image of one process can be replaced by other process

a) exec

2.

How image of one process can be copied to new born process

a) fork
3.

How can you list all the files used by a particular process

4.

How do u create a link of file

C Questions
1.

int main()

{
char *a= "Novell";
char *b;
b=malloc(10*sizeof(char));
memset(b,0,10);
while(*b++=*a++);
printf("%s",b);
return 0;
}
2.

int main()

{
printf("Hello");
fork();
printf("World");
}

Nautix C,C++ & Unix paper:


C++ paper:
1.

cin is an

a.function
b.object
c.class.
2.

I con't remember the ques but the ans is Virtual base class

3.

what is the use of scope resolution operator?

4.

Advantage of inline function?

5.

copy constructor is
ans:call by value.

6.

ques on vertual destructor?

7.

template one ques?

8.

one q' on container class?

C paper
1.

How will u terminate the statement?


ans: ;

2.

select the wrong one


a. a+=1;
b. a*=2;
c. a**=1;(ans)
d. a>>=1;

3.

main()
{
int n,i=1;
switch(n)
{
case 1:
some stuff;
case 2:
some stuff;
default:
i=10;
}
printf("i=%d",i);
}
what will be value of i;
ans:non of the above

4.

pick ut the wrong one


#typedef some stuff
{

--};
5.

one q's on do loop?

6.

pick the odd one


a.

malloc

b.

calloc

c.

new(ans)

7.

char *ptr;
p=malloc(20);
How will u de allocate the memory?
a. delete.
b. free.
There r about 20 q's in this section rest i am un able to remember?

UNIX paper:
1.

How will u do version maintaince?

sccs(source code control system)


2.

awk $2

3.

A program in shell

script?
find the o/p.
4.

Which signal u can't catch?


ans:sigkill

5.

Core dump is due to ?


ans:segmentation fault.

6.

Echo "todays date is 'date'";


o/p = ?

7.

process synchronisation is done by ?


ans:s'phore

Test Paper :9
Paper Type
Posted By

: Technical - C & C++


: admin

Texa - Placement sample question papers

1. if a 5-stage pipe-line is flushed and then we have to execute 5 and 12


instructions respectively then no. of cycles will be
a. 5 and 12
b. 6 and 13
c. 9 and 16
d.none

2. k-map
ab
---------c1x00
1x0x
solve it
a. A.B
B. ~A
C. ~B
D. A+B
3.CHAR A[10][15] AND INT B[10][15] IS DEFINED WHAT'S THE ADDRESS OF A[3][4] AND
B[3][4] IF ADDRESS OD A IS OX1000 AND B IS 0X2000
A. 0X1030 AND 0X20C3
B. OX1031 AND OX20C4
AND SOME OTHERS..
4. int f(int *a)
{
int b=5;
a=&b;
}

main()
{
int i;
printf("\n %d",i);
f(&i);
printf("\n %d",i);
}
what's the output .
1.10,5
2,10,10
c.5,5
d. none
5. main()
{
int i;
fork();
fork();
fork();
printf("----");
}
how many times the printf will be executed .
a.3
b. 6
c.5
d. 8
6.
void f(int i)
{
int j;
for (j=0;j<16;j++)
{
if (i & (0x8000>>j))
printf("1");
else
printf("0");
}
}

what's the purpose of the program


a. its output is hex representation of i
b. bcd
c. binary
d. decimal
7.#define f(a,b) a+b
#define g(a,b) a*b
main()
{
int m;
m=2*f(3,g(4,5));
printf("\n m is %d",m);
}
what's the value of m
a.70
b.50
c.26
d. 69
8.main()
{
char a[10];
strcpy(a,"\0");
if (a==NULL)
printf("\a is null");
else
printf("\n a is not null");}
what happens with it .
a. compile time error.
b. run-time error.
c. a is null
d. a is not null.
9. char a[5]="hello"
a. in array we can't do the operation .
b. size of a is too large

c. size of a is too small


d. nothing wrong with it .
10. local variables can be store by compiler
a. in register or heap
b. in register or stack
c .in stack or heap .
d. global memory.
11. average and worst time complexity in a sorted binary tree is
12. a tree is given and ask to find its meaning (parse-tree)
(expression tree)
ans. ((a+b)-(c*d)) ( not confirmed)
13. convert 40.xxxx into binary .
14. global variable conflicts due to multiple file occurrence is resolved during
a. compile-time
b. run-time
c. link-time
d. load-time

15.Two program is given of factorial. one with recursion and one without recursion . question
was which program won't run for very big no. input because
of stack overfow .
a. i only (ans.)
b. ii only
c. i& ii both .
c. none

16.
struct a
{
int a;
char b;
int c;

}
union b
{
char a;
int b;
int c;
};
which is correct .
a. size of a is always diff. form size of b.(ans.)
b. size of a is always same form size of b.
c. we can't say anything because of not-homogeneous (not in ordered)
d. size of a can be same if

Zenith Placement Pattern


There were 3 sections
1st Round Aptitude Contains 5 Sections which were quiet easy to answer.
Technical Questions
Questions were based on C, C++, DBMS and Oracle (SQL*plus and PL/SQL).
2nd Round - Technical Interview Questions from C, C++, Datastructures, DBMS and Oracle
(SQL*plus and PL/SQL) Questions on projects done earlier were asked.
3rd Round - HR Interview Go through common HR Interview Questions and be prepared.
Preference may be given to .NET or J2EE professionals Getting through Tech Interview is
crucial, afterwards it will be easy to get placed in Zenith. Good Luck...

Sample Questions
1.What is the meaning memory allocation and why we use it ?
2.What is the meaning of physical memory and virtual memory ?
2.What are the 3Ms of production ?
4.What does 6 Sigma represent ?
5.What is a register ?
6.llocating memory at runtime is also call as _____ ?
7.What is static and dynamic memory allocation ?

8.What is virtual memory ?


YAHOO PLACEMENT SAMPLE PAPER
Few Questions: (45 min)
1. In a village in each family they give birth to children till they
get a boy. IF girl child they try again. What is the ratio of boys to
girls.

2. 2n+1 numbers in a list except for 1 num all had duplicates, how to
find duplicate in O(n)
3. In 1000 wine bottles stack 10 are poisoned given 10 rats what is
the minimum number of tries to find the poisoned one. Rat dies once it
licks the poisoned wine.
4. Write 1,3,6,4 using +,-,*,/ to get 24 (no repeat of numbers)
5. Which is the DS used in dictionary mode in mobile (t9)
6. Which is DS used for chess program...to predict move each and every
time..
7. There are $1070 dollars how to split them into bags such that asked
for any denomination from $1 to $1070 , u must b able to give without
opening bag...
If any one has idea do mail me qrio.qrio at gmail.com (qrio dot qrio
at gmail dot com).. Eagerly waiting...
Another paper:
1. First fit issues...
2. Algorithm to partition set of numbers into two s.t. diff bw their
sum is min and they hav equal num of elements
3. Prog: given Numerator & Denominator.... print 0.3333333333 as .(3)
0.123123 as .(123)

YAHOO PAPER ON 12th MARCH,2004


Hi friends,I made it thru YAHOO thanx to all you people out there. I gave the online test
on 12th March, 2004.Sorry for being so late.
Few hints for those u r waiting for the test
1. Verbal section :
apothesis , balmy, inurate , mundane , maze - these are the words i remember. for this
part i.e. syn and antonyms go thru barron . mug up all the words that came in previous
papers and at least the high frequency words of barron.For Reading comprehension and
fill in the blanks if you don't get enough time to finish at least answer all - there is no -ve
marking. don't leave anything.
2. Quantitative section :

The questions are same as in prev papers. practice those .


3. Critical Section:
Now this is the toughest part of the paper . Pick up either 11th, 12th or 13 th edition of
Barron ( not the later editions ) . practice thoroughly the critical and analytical part of the
model papers and the exercise of analytical section and if they don't change the database
u will get common. Remember it is a tough task to solve a unseen logical problem unless
it is easy sitting before the comp. Do practice them thoroughly.
For Technical interview they are not getting into depth just the basics of the important
subjects.
For HR interview just be confident . They asked questions like name 10 it companies
and their ceo's ? what is nasscom ? what post does S.
Ramadorai have in nasscom ? Even if u can't answer these questions people r making it
thru - they are checking the attitude.
YAHOO PAPER ON 21ST JUNE.2004
hello friends,I finally got into YAHOO.(thru on-campus).i hav no words to express my joy.First
of all,i wud like to express my hearty thanks This group has helped me a lot in getting the
latest YAHOO papers .May be without that,i wouldn't hav cleared the aptitude.
Pattern
It was a online exam.the pattern is same . Most of the Questions were same as the anna univ.
campus paper 21 jun2004 held last month.
verbal- 30 Q
-------------- 20 min(mostly from GRE Barrons antonyms-exercises Q)
quantz -34 Q
--------------- 40 min(solve the latest papers)
critical reasoning -12 Q
------------------30 min(need practice,Quite diificult,iwas able to solve only two)
if u clear the aptitude,automatically phycometric Q will appear on ur screen.or else
disqualified.
Psychometric test 150 Q -30 min(the same 150 Q as in the previous papers).Many Qs will look alike ,keep in
memory wat ans hav u given for a Q with similar meaning before. as such there were no
filteration. if u clear phyco they will give u a form to fill up.write only the subjects u know very
well.
Technical interview:
Do prepare very well for ur interview Be thorough with at least 2 subjects.they will ask u ur
fav.subject. the interview was about 40 min.
Asked many Questions from OOPS(basic concepts)Operating sys,(deadlocking,types of os
etc.),Data structures. DBMS(locking etc)
Only write the prg. languages u r familiar with ,in the form. they asked to write a prg on
fibonacci series. some general Ques like
Why YAHOO?
why should we recruit u.?
Don't forget to see the YAHOO website before u attend the interview. one imp. thing NEVER
give a negative answer for a Ques like
Are u willing to go Abroad?say yes. they will try to change ur mind.don't give up.
I was asked a ques like

Are r u ready to go turkey or ukraine?


There was a lot of filteration in this round.
HR interview
Only for some 15 min. very easy questions like
Tell about urself.
some basic tech questions about microprocessor 85,86 multitasking and mutithreading. diff in
Windows and unix os(no give ans like GUI)
features of Unix OS
Do ask some ques if the interviewer ask u to do so like wat r the skills req to be successful in
this industry, the working environment etc...
all the best.if u hav any query about the exam or interview ,feel free to write to me.
bye.......... i hav a Query regarding the Indian Oil Corporation Ltd. exam. My friend is in
urgent need of the IOCL pattern or papers. if any of u hav attended the exam kindly send the
papers (computer science strem) I will be very grateful .

YAHOO PAPER ON 23rd JULY AT ANNA UNIVERSITY

Selection Procedure was


* Written test.
* technical interview 1
* technical interview 2
* programming
* HR interview
Written Test::
C
C++
SQL
Regular Expression
Unix commands
Data structures(trees,graphs)
Interview:
The main things u want to be sure to get into yahoo are:
Unix commands - they ask basic commands in unix..
aftter that they give importance to C , C++
If u know perl then its an added advantage..
be sure with hashing too..
some algo questions which was fired at me where
* strcat()
* how to count the no of bits set in an no.. he asked me give a soln in O(1).
* how to delete the node in the linked list give the pointer to that node?
* given two integers a, b how to divde a/b without using /,% operator... (repeted
subtraction is not the solution).

in tthe programming round


asked me to implement the dictionary datastucture with features
* autocorrect
* autocomplete
* spellcheck
Yahoo Telephonic Round:
Design classes for the following problem. (C++)
A Customer Can have multiple bank accounts A Bank account can be owned by multiple
customers When customer logs in he sees list of account, on clicking on an account he sees
list of transactions.
Yahoo Interview Round 1:

1.
2.
3.
4.
5.

How to call a C++ function which is compiled with C++ compiler in C code?
When you deliver your C++ headers and C++ library of a class (what all can you
change in the class so that application using your class does not need to recompile the
code)
How do you initialize a static member of a class with return value of some function?
How can one application use same API provided by different vendors at the same
time?
If you are given the name of the function at run time how will you invoke the function?

Yahoo Interview Round 2:


1.
2.
3.

4.
5.
6.

When will you use shell script/Perl ahead of C/C++?


How does yahoo handles billions of requests, does it create a thread per request or a
process?
How does HTTP works?
How to count number of unique music titles downloaded from a log file which contains
an entry of all music title downloaded?
What is the difference between COM and CORBA?
What is web service?

YAHOO PAPER ON 29th JULY AT RVCE,BANGLORE


Hello,I'am a 3rd year student of Engineering(Information Science branch) from RVCE
Bangalore.
Campus placements have started for us and Infosys was the first company to come, but I
did not write the test. YAHOO came here on 29th of july '04 and recruited 50 students
out of the 350 who took the online test. 101 students cleared the psychometry test, out
which 50 were chosen after the interview and GD.
6 students from my branch including me made it through. I became a member of this
group 6 months back, and its been very helpful. I think this group was very instrumental
in helping me get through the test.
By the information posted by freshers who had recently taken up the YAHOO test, I had

a fairly good idea about the pattern and the kind of preparation I needed to do. the pattern
is as follows..
VERBAL( 20 min):
5 synonyms, 10 antonyms( all from BARRON'S GRE book. Please work on the exercises
given in it). And in addition to this there was a paragraph given with blanks in it. Each
blank had a number in brackets( this refers to the question no). to fill these blanks 5
sentences were given. We had to choose the appropriate sentence which would fit in to
the blank so that there was continuity between the sentences preceding and following the
blank. This was very difficult.
QUANTITATIVE (40 min):
This was the easiest section. Solve all the old questions from the previous papers of
YAHOO and your sure to attempt 90% of the questions. There were some data
interpretation questions also (10 in number). Totally 50 questions, so managing the time
is very important.
CRITICAL REASONING (30 min):
This section had 3 questions with 4 sub questions each. One question was very simple
having a 5 delegates speaking different languages and questions based on them. Another
question was on seating arrangement and the third question was on time table for a
student to take up various classes. I was told that similar can be found in the Barron's
GRE book from 12th edition. Please practise solving such questions as the time given is
very less.
After I submitted my answers, I got the psychometry test on the screen. 150 questions
with yes no can't say as the answers. A lot of students were eliminated from this also so
be frank while answering the questions and don't try to change the answers once u have
marked them.
The next day interviews were held. Around 20 people had come. My interview went well.
Basically it was Technical, but he also asked HR questions. There were 2 people. One
guy would look straight at me as I was answering, observing keenly and the other guy
was looking in to the form that we were asked to fill up and asking me questions. Some
of the questions were :
Tell us about yourself.
What was your DBMS
project all about. What s/w you used for it?
Are comfortable using MS Visual Basic?
What is ODBC?
What is a binary tree?
What do you call a binary tree in which the value of the nodes to left of the root is less than
that of those on the right of the root?
Do you know C?
What about pointers?
Write a structure for a node in a doubly linked list.( he asked me explain the structure)

What are the different types of file structures(we had file structure project in 6th semester)
What do you mean by Indexing? What are the different types of indexing?
What is your career objective?
What are the leadership qualities that you think you have? ( he asked me this because I said
in would like to be a project leader in 3 years time)
Did you write infosys test yesterday? (I said no)
He asked me why? (I told him about the world-class training provided by YAHOO etc)
The interview panel was very cool and friendly. They did not intimidate us. There were many
light moments during the interview when they were cracking jokes.( the member of the panel
offered me coffee before he started asking questions!!) I was totally at ease. Just maintain the
eye contact and look at every member of the panel. A couple of times they even helped me
get to the answer.
After this we were grouped together in to batches of 10 and GD was conducted. The topics
were :
America's invasion of Iraq: is it justified or not?
Todays IT scenario is a total eye-wash.
Is it necessary to have an IT background to work in It industry.
As I heard from the previous batches, GD was utter chaos with everyone literally screaming.
So I made an attempt to start the GD, and succeeded. After that I got only one chance to
speak. Rest of the time I was listening to others and agreeing or disagreeing with them. I tried
to make people who were silent to speak. Basically if you make yourselves heard a couple of
times its enough. Try to be a good listener, that's very important. Don't pound on the table
and don't try to overpower others.
Finally after two days of grueling tests, I finally made through. Though it was mentally and
physically very taxing, I think it was ultimately worth it. Though this was the first placement
test ever, I have seen my friends not making it through, and I know how hard it is, but please
don't loose hopes. I thank this group, its members and the moderators from the bottom of
my heart.
PLEASE REMEBER I AM A FINAL YEAR STUDENT AND NOT AN EMPLOYEE OF YAHOO SO
PLEASE DON'T ASK FOR EMPLOYEE REFFERALS.
I would be more than glad to help you.
Thank you once again and all the best to everybody.

WIPRO PAPER ON 16th AUGUST AT HYDERABAD


Hi, I am Mohammed Asrar Ahmed, MCA Final year student of Muffakham Jah College
of Engineering and Technology, Hyderabad . WIPRO recently visited our campus for
RECRUITMENT on 16-aug-2007 , Thursday.
I am very much glad to inform you all that I have been recruited by WIPRO after being
rejected by INFOSYS in the final round. After the rejection from INFOSYS I was really
very much dejected. But my PARENTS, my brothers and last but not the least my
FACULTIES have helped me a lot to come out of that shock, and to keep faith in myself.
And the FRESHERS SITE has also helped me a lot to make it into WIPRO. I thank my
EVER MERCYFUL ALLAH for giving me strength to overcome from that dejection and
work hard for WIPRO. Finally I would like to advise you all that if you are not selected
in one then do not suppose that ALLAH closed the door for you but believe that HE
would open HUNDRED DOORS for your SUCCESS.

Test
Statistics:
Total
Appeared:
400
+
After
written
test
short
listed
After
Technical
Interview
short
listed
FINALLY SLECTED IN WIPRO: 63

(approximately)
candidates:
155
candidates:
70

TEST PATTERN:
Written Test (60 Minutes)
1. Analytical (15 Questions)
2. English (15 Questions)
3. Technical (20 Questions)
Technical Interview
HR Interview
Written Test:
Analytical:
1) Time and distance (1 Question)
2) Time and Work (1 question)
3) Some series type question i.e. 1 12 1211 11211 1122311231 so on find last number
( something like that)
4) two numbers are in the ratio 5:7 and their product is 5680 find the difference between
two numbers.
5) In a family there are six members, P, Q, R, S, T, U. they are doctor, teacher, lawyer,
engineer, nurse, and mechanic. Some relations were given and we have to find out
occupation of P.
6) One question on the volume of the cube after increasing its height( somewhat like that)
7) One passage of around 5-6 lines and question is to infer the theme of the passage.
8) one person sends of his income on transportation and of remaining on food etc
and he is left with 12000. Find his expenditure on transportation.
9) Question on Simple and Compound interests difference and find actual amount.
Sorry I cant remember all the question and they were simple enough. You can crack them
with a good hold on basics of quantitative ability.
English Section: (15 Questions)
The easiest section of all the three sections. You can finish this section with in 5 minutes.
1. Rearrange the statements.
2. Rearrange the statements
3. Rearrange the statements
4, 5, 6) In a statement one word was highlighted and you are supposed to replace that
word by choosing a word from options opposite in that context of the statement.
8) Conversion from ACTIVE to PASSIVE
9, 10, 11) Choose the word which is spelt wrongly. (quiet easy)
12, 13) Fill in the blanks with appropriate words from choices.
14, 15) Some simple questions, sorry I cannot remember.

Technical Section: (20 Questions)


1) Convert 1234.56 into binary
2) main()
{
int a=20,b=10,c=7,x;
x=a<(b
printf(%d,x);
}
3) About CSMA/CD.
4) One question about networks
5, 6, 7) Three questions on UNIX shell commands
8, 9, 10) two C programs with functions and their calls and find the result
11) Who invented Input device MOUSE.
12) Some other questions related to Computer science only, and no questions were from
non Computer background.
NOTE:
1) The Test will have SECTIONAL CUT OFF
2) The CUT OFF for NON CSE students for TECHNICAL section would be around 5-6.
It depends on the number of questions on C, C++, and etc.
Test started at 10:25 am and was over by 11:25 . Results were declared around 11:50 am .
And my name was also announced. In those 400 + students 25 students were from MCA.
Total 155 cleared that round. And 11 out of 25 cleared the test from MCA.
Technical Interview:
My turn came around 6:00 pm. He was a gentleman, very simple and friendly person.
Me: may I come in sir
He: Yes
Me: Good evening
He: Replied
Me: May I have a seat
He: Yes please.
He: Give me your resume
Me: Gave. He didnt ask me to introduce myself (surprisingly).
He: Scanned the resume for more than 3 minutes.
He: Tell me about this WIPROs WORKSHOP that you have mentioned here and why
were you selected for that ? Justify your selection for that
Workshop.
Me: Our Coordinator for MCA selected me on the basis of excellent performance in
Operating systems LAB.
He: What is this INFOSYS FOUNDATION program and why have you not been
recruited by INFOSYS.
Me: Explained about FOUNDATION program. And said that I could not solve one of the
puzzle being asked by interviewer of INFOSYS.
He: Write a C program such that after execution it will delete itself. And you cannot find
the file in the directory listings.

Me: Tried for a while and said that this could be done by using KILL command in unix.
But this was wrong. I said I cannot do this.
He: List the Concepts of OOP.
Me: Listed
He: How many types of inheritance exist?
Me: Listed, and explained with the help of diagrams.
He: Differences between C and C++.
Me: Virtual functions and OOPs Support found in C++ but not in C.
He: Demonstrate IF ELSE and NESTED IF ELSE with help of an example.
Me: Demonstrated
He: Demonstrate SWITCH statement.
Me: Done
He: Differentiate between CALL BY VALUE and CALL BY REFERENCE
Me: explained
He: Do you know COBOL?
Me: yes. He asked me because I mentioned it in the TECHNICAL EXPERTISE. But was
not prepare for it at all.
He: Write a simple program to add two numbers in COBOL. And said Take your own
time and write it.
Me: First recalled the DIVISIONs of COBOL program. And then wrote an exactly
correct program and then explained him about the program
syntaxes, rules followed in writing a COBOL program, the LEVEL numbers, sections
and sub sections in each of the four DIVISIONS.
While I was explaining he was very much suprised and impressed with my explanation.
He: when did you study this (COBOL)subject?
Me: in First year second semester.
He: Now you are in third year first semester.
Me: yes
He: Its really extremely surprising that you remember the subject so well that you learnt
so long back.
Then came the moment for which I was fighting. though they donot tell you openly that
you are selected in the company just in the second phase itself, but he told me after I
wrote the COBOL program that,
I have SELECTED YOU. YOU ARE IN WIPRO. JUST GO AND FILL THIS FORM
AND SIT FOR A SMALL HR INTERVIEW.
He: Then asked me some questions about my seminar on NETWORK SECURITYAUTHENTICATION PROTOCOLS.
Finally I was given an HR FORM. And greeted me and I came out. Filled the form and
Appeared for HR Interview.
NOTE: If you are given a form after TECHNICAL INTERVIEW, it means your selection
in the company is 95% certain.

HR INTERVIEW:
After filling the form I appeared for the HR interview. He was a gentleman who
delivered the Pre Placement Talk.
He: Introduce Yourself
Me: done
He: Tell me about your FAMILY members.
Me: told
He: do you discuss with your family members about WIPRO.
Me: Answered
He: Prove yourself as Innovative.
Me: gave two to three examples and he was impressed
He: Why should I hire you
Me: Because Wipro respects INNOVATION a lot and it was honored many a times by
BUSINESS WEEK and NASSCOM for its innovation
and I feel that I am Innovative. And gave some other reasons that I mentioned in my HR
form.
He: why wipro?
Me: Explained comprehensively.
He: Your EXPECTATIONs from WIPRO.
Me: SATISFACTION in the work I do at WIPRO.
He: DONT YOU WANT SALARY? !!!!!!!!!!!!!
Me:No.You will be giving me salary around 3 lakhs per annum, as told by you in PPT
He: Laughed and greeted me and asked to wait for result.
Results came around 9:15 in the night on the same day. And a total of 63 from 70 made it
into WIPRO. Among those 63, FOUR students are from MCA I hope this experience of
mine would help you a lot and may facilitate you in your campus placements. And I
PRAY TO THE GOD FOR THE SELECTION OF YOU ALL DESERVING
STUDENTS.
ALL THE VERY BEST.
WIPRO PAPER ON 7th JULY
Hi this is A.Venkateswarlu. I appear for the reassessment exam of WIPRO. I want to
share my experience with u all.
Totally 800 candedates are appear for the exam from MIC college, GEC college, SRKR
college, RVR & JC college , SSIT college, SVH college.
After written test almost 400 students are selected for other interviews. Some students
have first HR interview test and other have technical interview. For MIC college first HR
interview and then Technical interview. At the time of last interview what ever it may be
the wish the selected students as u are selected I will see u at WIPRO.
The total procedure is as follows.
1.Written test
2.Technical Interview

3.HR interview.
1.written test.
It consist of three parts.
1.English port (15 questions)
2.Arethamic and reasoning part (15 questions)
3.Technical part (20 questions)
I will give u the almost total question paper
1.English part:
1.find the miss spelt word among the 4 choices.
2.passege is given which is very easy and it consist the 5 questions.
3.active voice to passive voice conversion like I was reading the book for 2 hours
ans: the book was being read by me for 2 hours
4.give a sentence and find the improper meaning from the choices (2 questions)
5.One question fro Matching
6.OICPT word is given and some series is given and ask for the correct sequence
ans:51423 TOPIC
7.The sequences of statements are given which are said by the author and ask find the
idea of the author.
Before u working as a novalist u must not be a writer like this
Almost I cover 12 questions from 15) in this part
2.Arethamatic & reasoning
1.series like 5,20,____ ,6.2,8,12 and the options are 10,14,24,12
2.there are some players in a volley ball team. after end of the game the each girl drinks 4
liters of water and each boy drinks 7 liters of water and the coach drinks 9 liters of water.
After end of the game 42liters of water is drank by the all. The find the no of boys and
girls in the volley ball team.
Ans : Among the options 2 boys + 5 girls is correct.. note that we must be include the
Coach also.
3.a problem of trains
120m long train crosses the pole after 2 sec. Find how much time it takes to cross the
140m long plotform.
4.Two problems on probability
2blue ,3 red, 4 green balls are there we have to arienge ge them like no 2 red are come
together and no 2 blue balls are come together like this.
5.8 persons are there devide in to two parts 4 to each are placed in two different rooms,
and some conditions are given and ask to find the sequences of them. Like this.
6. Six persons are given find the person who done the crime. Among 4 persons 1 person
said the false answer and the statements of the all persons given and ask for the person
who did the crime.
7. 300m paper is given and ask for to rolled it and at last ask for caliculation of that
problem. Like this.
8.a problem on seating arrangements and find the left end person.
9.a question on the Blood Relations the problem is

showing a photograph Asha said he is the brother of only daughter of my mother and
asked how is she related to him.
10.total amount of some cats and the cheans is 360 in a shop.but at night the shop keeper
forget to close the door. the next day he found the 2 cats and kg cheane is lost and the
present cost is 340 and asked to fine the no of cats and the total cheane.
11.a problem is given like 160 of 168 is used and give some conditions and ask some
question.
3.Technical part
1.who invited the Mouse : Dugles angle bart.
2.The use of swapping over paging : it improves the Multi programming
3.main()
{
printf(%d,150/50/5);
}
output: o
4.main()
{
printf(%d,150/50%5);
}
output: 3
5.The command which gives the device of our system : WHO
6.The command which gives the all list of files without graphic symbols the choices are
as follows
ls-a
ls-b
ls-l
7.a question on system calls
fork()
renice
nice
8.int a[3][5]={ {1,2,3,4,5],{2,3,4,5,6},{10,11,12,13,14}};
int *p=&a;
printf(%d,*(*(x+1)+3));
9.int a=0xdeabc;
char x=a;
printf(%x,x);
find the output of this endiane machine.
a)de b)ab c)0
d)cannot be predictable
10.A question on Computer Networks giving 3 lines o theorey on CSMA/CD
CSMA/CA.
11.sizeof() is an operator .
12.main()
{
pfrintf(%d,f1(10,10);
}

the function declaration of f1(int,int) is given in some other program find how the
function declaration is
extern int f1(int,int)
13.What is use of the Wait for Graph
14.main()
{
a=5;
if(a=1)
{
printf(d,a);
}
always if prints the value of a is 1
15.a bit on convewrtion of binary number to Octal .10111000 first convert it into the
decimal and convert it into the Octal by deviding 8.
16. A bit on OS
a theorey question
this is the written test Please more consantrate on Technical I think they give mager
priority on Technical thats why they give the technical column in written test and also in
the Technical interview. So please take more consontrate on technical.
For MIC college students first HR interview and then Technical interview
HR Interview :
The round was started at 2:10 pm but I waited for 6 hour after 9 Oclock they ask
me to attend for Hr Interview.
HR: tell me your favourate topic (subjects)
I : I replaid as c++ (OOPS)
HR: So tell me about OOPS
I : I replaid the main features of Encapsulation ,Inheritence, Polymaophisms and
Genricity and I Stopped.
HR; u have to say at least 5 Minits
I: Then I show my real face in OOPS non stoply. About detail explanation on function
overloading ,object, class ,and also templates in detail at lest 6 minit and I stopped.
HR;U must be identify the situation of the other person he is ready to understand the data
or not so u have to give some time in between the communication with others that wha u
have to imrove.
I: I replaid ok sir
HR; He asked me to tell about Team work.
I: I explained it with my own idea.
HR: He asked me is there any nead of team work.
I: must and should sir otherwise there may be a problem while doing the projects.
HR: He replaid ok. And
Are u class first in Degree
I: Yes sir and also in MCA.
HR: Are u played which games in your school .( I mentioned the details in resume thats
why he asked me that question)

I: I relaid I participated School level ,mandal level and also District level Games & Sports
meet sir. And I was played CHO-CHO ,SOFT BALL and FOOT BALL and I was got
first rank in Running in Spors.
HR; ok
I will give u a form u fill it an d then appear for Technical interview. Then I replaid
Thanks sir.
And I asked I want to drink some water sir ok take it my boy and take some food in the
canteen and ready for Technical Interview. When I am drinkin water he said continue ur
Sports ok . I replaied thenk u sir.
Technical Interview :
I gave him the form whichis given by the HR inter viewer and my resume he identified
my name and asked the spelling of my Surname which I didnt write clearly and he
replaid u must be write clearly ok. Ok u are MCA student. What is the group in your
Degree I replaid BSC Computer Science. When I am giving the details he write some It
consists of 3 rounds.
1. written test
2. Technical interview
3. HR interview.
Written test: It consists of 50Q and the duration is 1 hr.
15Q from verbal (topics: active voice & passive voice, reported speech, phrases,
antonym, synonym, jumbled word,analogies)
15Q from aptitude (topics: Blood relations, conclusion from the paragraph, time& work,
theme of the paragraph, probability, avg, areas, si and ci, ratios and proportion )
20Q from technical (topics: C , DS, java, c++, general, OS, Unix, networks)
Verbal section:
1. convert the following sentence into indirect speech
The teacher told the students"Dont make noise".
2. convert the following sentence into passive voice
Will the postman post the letters?
Ans: Will the letters be posted by the postman.
3. what is the meaning of the phrase " deep water"
a) secret b) serious trouble c) ocean d)
4. In the following options what is the best phrase which replaces the underlined phrase
in the given sentence.

Children must have to be take care while crossing the roads


A) should have to be B) must be C) have to be D)should be
5. Life history of a person written by other person
a) autobiography b) biography c) bibliography d)
6. A jumbled word known as G I T B H R If the word is arranged in correct
1 2 34 5 6
order then what will be the order of number
Ans: BRIGHT (462153)
7. A jumbled word known as C E T A R If the word is arranged in correct
1 2 34 5
order then what will be the order of number
Ans: TRACE (35412)
8. Antonym of the word PERSPICUITY
Ans: vagueness
9. DERANGE = insane (synonym)
Correct the underlined part in the following sentence
10. When I returned my home from office I saw the flower pots are broken infront of my
home.
a) flower pots were broken b) flower pots had broken c) flower pots has been broken
11. The walls are now wet because yesterday it has been raining.
a) was raining b) had rained c) has rained (I expect these are the options )
12. One question is like match the following i.e, one side a word is given and other side
appropriate sentence is given
I
II
A. Employer
E. The painting is done by an expert hand
B. Superior
F. Students love their teachers
C. Painter
G. The dog is trained by his male owner
D. Teacher
H. Slaves has fear about their master
(The II side of the matching options are not exact ,I guess these )
The answers will be in this form
a) A-H, B-G, C-E, D-F b) A-F, B-G, C-E, D-H the options are like that
13. what is the meaning of the phrase " face the music"
a) face serious troubles etc
Two ANALOGIES are there I cant remember those
14.
: awareness :: ____________ (left side there is some word given I forgot )
15.
: moribund :: ____________

Aptitude Section:
1. The sharp decline in the mortality since 1941 shows that who argue that the
introduction of new chemicals has caused serve health problems are mistaken from
1940-1979, the average life expectancy for the entire United States population increased
from 63.6 to 73.6 years, and the total age adjusted death rate declined by forty five
percent, including decline in every age, sex and racial group. There were also the years in
which there was a dramatic increase in the
use of new chemicals in this country. Clearly, then those modern aids to industry have no
adverse effects on the general health of society. Which of the following is an assumption
underlying the conclusion of the passage above?
A) The increase in life expectancy in the United States was paralleled by corresponding
increases in other countries.
B) The growth in the average life expectancy in the United States cannot be attributed to
any single factor, but is a general phenomenon.
C) The increase in life expectancy would not have been greater if there had not been an
increase in the use of chemicals.
D) Growth in the use of chemicals was a crucial factor in the development of industry
from 1940-1979.
2. There is a family of six persons P,Q,R,S,T and U.They are Lawyer, Doctor, Teacher,
Salesman,Engineer and Accountant. There are two married couples in the family. S, the
salesman is married to the Lady Teacher. The Doctor is married to the Lawyer U, The
Accountant is the son of Q and brother of T. R, the Lawyer is the daughter-in-law of P. T
is the unmarried Engineer. P is the Grandmother of U. Which is the profession of P?
a)Lawyer
b)Teacher
c)Doctor
d)Accountant
Ans: b
3. There are 6 volumes of books on a rack kept in order(i.e vol.1, vol.2 and so on). Give
the position after the following changes were noticed.
All books have been changed.
vol.5 was directly to the right of vol.2.
vol.4 has vol.6 to its left and both weren't at vol.3's place.
vol.1 has vol.3 on right and vol.5 on left.
An even numbered volume is at vol.5's place.
Find the order in which the books are kept now.
a)2,5,1,3,6,4
b)4,1,3,6,5,2
c)5,4,6,3,1,2
d)3,5,4,2,6,1
4.Examine carefully the following sequence of numbers:
1
11
21
1211
111221
312211
13112221
1113213211

31131211131221
13211311123113112211
hint: ( in first row one 1, in 2nd row two 1s, in 3rd row one 1,........
Although the sequence appear to behave totally at random, In fact , after the first
sequence, each sequence is constructed in a precise and methodical way based on the
previous one. What is the next sequence?
a)11322212311233113232211211
c)11131221133112221132122211
Ans : c (not confirm)

b)11131221133112132113212221
d)11131221133312112211321222

5. I) C is father of N but N is not son of C.


II) M is daughter of B and sister of P.
III) P is brother of N.
Which of the following is can not be inferred from the information given?
a) N is brother of P
b) B has three children c) N is younger to P d)B has
Ans: c
6. If the class marks in frequency distribution weights of students be
128,137,146,155,164,173&182kgs then,the first class boundary is
A)121.5
B)122.5
C)123.5
D)124.5

7. 9 laboures can complete the construction of a wall in 18 days.How many less days
will 12 laboures take to complete the same wall?
A)2 1/2
B)4 1/2
C)13 1/2
D)1/2
Ans: B

8. The rectangle box with square base is open at the top.The maximum volume of the box
made from 1200 m2 tin,in m3 is:
A)2000
B)2500
C)3000
D)4000

9. A person was fined for exceeding the speed limit by 10 km/hr.Another person was also
fined for exceeding the same speed limit by twice the same.If the second person was
traveling at a speed of 35km/hr,find the speed limit.
A)19km/hr
B)27 km/hr
c)30 km/hr
D)15 km/hr

10. The difference between the compound and simple interest on a certain sum for 2
years at the rate of 8% per annum is Rs.80,What is the sum?
A)11,880
B)12,500
C)13,250
D)14,270

11. The ratio between two numbers is 5:7 and their product is 560.What is the difference
between these two numbers?
A)8
B)12
C)6
D)21
Ans: A

12. In a family Reshma is elder sister of Ragini.Soni is Reshma's daughter and Saloni is
Soni's cousin.Ragini's mother is Rajani.Ramani is the sister-in-law of Reshma.Who is
Soni's grandmother?
A)Reshma
B)Ragini
C)Rajani
D)Ramani
Ans: C

13. The mean and the variance of a binomial distribution are 4 and 2 respectively.Then
the probability of 2 successes is:
A)37/256
B)219/256
C)128/256
D)28/256
Ans: D

14. Take any positive whole number not greater than 50.If the number is even, divide it
by 2.If the number is odd,multiply it by 3,and add 1 to the result.Apply the same method
to the resulting numbers until you finally arrive at the number 1.shown below is the chain
of numbers that results from this method if you begin with 15.
15->46->23->70->35->106->53->160->80->40->20->10->5->16->8->4->2->1
As you can see, the number 15 requires 17 steps to end up at 1.Of the numbers not greater
than 50,which takes the longest to reach the number 1 ?
A)26
B)27
C)28
D)17
Ans: B

15. After spending 2/3 of his salary on rent and food items and 1/4th of the remaining on
transportation,Rajesh has 6000 with him.How much did he pay on transportation?
A)Rs.2000
B)Rs.4000
C)Rs.6000
D)Rs.1000
Ans: A

Technical Section:
1. what is the o/p of the program
main()
{
incr(); incr(); incr();
}
incr()
{
static int i;
printf(%d,++i);
}
a) prints 123

b) prints 111 c) prints garbage value d) error

Ans: a

2. what is the o/p


main()
{
char a[3][4]={ abcd, efgh, ijkl };
putchar(**a);
}

a) syntax error b) prints some letter in those given c) prints garbage value d)
( The above program may not be the exact one but the same with small changes in the
letters given above)

3. what is the o/p (I cant exactly remember this program and options)
main()
{
int i=123;
printf(\06%d,i);
}
a) 123 b) 0123 c) 00123 d) error

4. After compiling a c program in UNIX using gcc compiler the executable file will be
a) a.out b) a.exe c) a.bat d)
Ans: a

5. In UNIX the commands like date, cat ,ls etc., are present in
a) /dev

b) /bin and /usr/bin c) /etc d) /tmp

Ans: b

6. which of the following is not a data structure


a) stack b) queue
Ans: d

c) tree d) none

7. If we declare a variable with which of the following keyword so that its value will be
automatically initialized to 0.
a) auto b) static c) extern d) register
Ans: b
8. The language in which we can represent class and all its members with some
graphical symbols
a) Unified graphical language b) Unified Modelling language c)
d)
Ans: b
9. Thrashing means
a) excessive page i/o b) no paging c)
Ans: a

d)

10. The principal author of c++ is


a) Dennis Ritchie b) James Goslings c) Bjarne Stroustrup d) Grady Booch
Ans: c
11. main()
{
int i=2;
if(0==fork())
{
i+=2;
}
else
{
wait(0);
printf(%d,i);
}
}
a) i+=2 is executed only by child b) i+=2 is executed only by parent c) d)
Ans: b (not confirm)
12. The EIDE is connected to which part in a computer
a) sound card b) video card c) hard disk d)none
13. In batch file which of the following is used to display messages to the user (just like
comments) those are not commands i.e., they will not execute
a) # b) ;
c) REM
d) HIDE
Ans: c
14. If an exception is uncaught by exception handler then ( some choices are given like)
a) it will call exit b) it will call abort c) it will return to main d)

15.In UNIX scheduling is for


a) to give priority for the processes which are waiting for a long time for I/O
b) for n
c)
d)
16. The use of typed operator is
17. The rotating disks which are used in older systems are replaced with
a) ROM b) Flash memory c) holographical memory d)
(The last two choices I didt remember)
18. one question related to computer networks i.e., given some data transfer rate like 1.3
Mbps to 9Mbps
a) down load rate b) transmitting rate c)
d)
19. In an array there are some elements stored in ascending order if we
need to
search an element then we will search the fourth element if that is bigger than search
element then we will search the three previous elements otherwise we will search three
elements which are present next to that fourth element (and something is given) and
asked that to get a minimum number of searches where the element should be
a) at the end of the three numbers b) at the beginning of the three numbers c) d)
Total no of students attended for the interview were about 1000 and the no of students
cleared the written are about 250;
Technical Interview:
I got call from the interviewer at around 7:30 P.M. . The technical interviewer was very
cool and friendly and he made me to feel free. But you must express your views
confidently and you must have a smily face.
The questions asked for me were
1.
Tell me about yourself
2.
About my mini project and he asked some questions on it. We need to explain in
such a way that he should get impressed.
3.
What are the various searching techniques and explain with examples.
4.
what is paging and segmentation
5.
how many tree traversals are there?
I told 3.
He asked why we need three. I told something.
He was very cool and said that u need to put a question why for every concept or topic so
that u can get good knowledge and good grip on subject.
6.
And asked some general questions like if I had a company and I
will give u job but without any salary for 5 months, what will do.
And if wont pay salary for another 1 year what will u do.
Thats it the T.I for me and finally he told that OK sarath I was impressed with ur
performance . Thank u.
After completion of TI he will give u application form and told u to go to the HR.

The number of students cleared T.I are 91.


HR Interview:
It was very easy and cool. Don't feel tense and nervous before HR. H.R interviewer was
a lady . she asked about my achievements ,hobbies and family background.
Be confident in H.R interview always with a smily face.and eye to eye contact is very
important. That's it friends. Finally 51 students are selected, I was one among those.
All the best
WIPRO PAPER ON 20th MARCH
Verbal
1. choose the lettered pair that expresses a relationship most similar to relationship
expressed in the capitalized pair. LINEAGE :PERSON.
(A)foliage:tree (B) derivation: word (C) adolescene : child (D) title:book
2. select the word among the given choices that is most nearly opposite in meaning to the
word NEGATION
(A) Hypothecation (B) postulation (C) affirmation (D) Anticipation
3. select the word or pharse among the given choices that is most nearly similar in
meaning to the word ACM
(A)The highest point (B) sharpness (C) bottomless (d) harmony
4. given below are words three of which belong to same category . find the word which
does not belong to that category.
( A) Nimble (B) Sluggish (C) inert (D) torpid.
5. from the following sets of words ,choose the word correctly spelt.
(A)fasination (B)facination (C) fascination (D) fastenation.
6. each of the following sentences is either in active or in passive voice and is followed
by four alternatives as answers. choose the correct alternative . women like to be flattered
by men.
(a). women like to flatter man (b). men like to flatter flatter women.
(c). women like men to flatter them. (d). none of these.
7. each sentence is in direct or indirect speech and is followed by four alternatives
of the opposite form of narration to that of the sentence , choose the correct
alternative . the teacher forbade the boys to make a noise and advised them to do their
work quietly.
(a). the teacher said,boys,do not make a noise.do your work quietly.
(b). the teacher said, boys,do not make a noise to your work quietly
(c). the teacher forbade the boys. Do not make a noise to do your quietly.

(d).none of these.
8. For each f the words given below a contextual usage is provided. Pick the work from
the alternatives given that is most INAPPROPRIATE in the given context . A
comprehensive approach to headache management combined with the rise of new drugs ,
appear to provide a reprieve to the numerous sufferers.
(a).doubt
(b). acquittal (c) assurance (d) belief
9. Select among the given choices the correct phrase to replace the underlined phrase in
the following sentence.
One person was killed and several others are injured in police firing and stone throwing,
yesterday.
(a) one person is killed and severals others are injured
(b)
one
person
was
killed
and
several
others
were
injured.
(c). one person has been killed and several others are injured
(d). one person was being killed and several others are being injured.
(10). Given below are words three of which belong to the same category. Find the word
which does not belong to the that category.
(a). respect (b) believe (c) revere (d) worship
(11). Choose one of the words given in four alternatives which has wrong suffix.
(a) beginning (b) begineng (c) begininng (d) beginning
(12). Select the word among the given choices that is most nearly opposite meaning to
the word NOTORIOUS.
(A)Fashionable (B) invincible (C)intrepid (D)renowned
13.select the word or pharse among the given choices that is most nearly similar in
meaning to the word BASHFUL.
(A)Vigilant (B)confident (C)shy (D)complicated.
14.for each of the words given below a contextual usage is provided .pick the work from
the alternatives given that is most INAPPROPRIATE in the given context .she is hot she
is tasty, a delectable morsel on cool. Britain s multicultural gravy train.
(A) Palatable (B) bland (C)unsavory (D) offensive
15.select the option that can be substituted for the given sentence. A person with
prejudiced views against religion.
(A) bigot (b) fanatic (c) orthodox (d) profane.
ANALYTICAL
16. Two cards players, peter and parul,have Rs 100 in the pot . They have agreed that the
first player to win 5 games shall win the pot. Each player has an equal chance of
winning each play.after peter has won 4 times and parul has won 3 times ,the game is

interrupted and they have to stop playing and share money . Whats the most fair amount
of money that peter should get?
(A)50
(B)75
(C)66.75
(D) 80
17.The fraction EVE/DID=0.7986798679867986.. is a normal fraction that can also
be written as a recurring decimal. What is the vlue of I.
(A)0
(B)1
(C)3
(D)4.
18. Substitute digits for the letters to the following divison true
HIL
--------------IL |PHIL
|IL
-------------TI
LS
--------------HIL
HIL
-----------000
note that the leftmost letter can,t be zero in any word.Also , there must be a one-one
mapping between digits and letters . E.g if you substitute 9 for the letter H, no other
letter can be 9 and all other H in the puzzle must be 9. what is the value of P.
(A) 2 (B)3 (C) 5 (D) 1
19. A solar powered car is being test driven. The vechile is driven at 30mph under
solar power and 40 mph under regular power .The trip to the nearest town takes 45
min using both solar and regular power ,wheras the return trip takes 50 min using only
solar power . on the trip to the town ,find the distance driven using regular power?
(A)10 miles (B) 15 miles (C) 40 miles (D) 25 miles
20. A team of 36 members is divided into groups of equal size to make a trip. Since
the groups were too large to fit in a car , 3 members were taken from each group
and these members then formed into two additional groups . after this , all groups
had the same number of members . how many members of the team were in a group
before the three members were taken out from each group ?
(A) 4
(B) 6
(C) 9
(D) 3
21. seven members of a town boards F,G,H;J,K,L and M Vote on a series of
resolutions. On each resolution ,every member votes either aye or nay according to the
following patterns.
H always votes the same way as G. If F votes aye ,then K votes aye. Either M or H
votes the opposite way from J. H and M never both votes aye. L never votes the same
way as K. If G and K vote aye which of the following must be true.

(A) F votes aye and M votes aye (b) H votes aye and F votes nay. (c) J votes may and
F votes nay . (D) L votes nay and M votes nay.
22. which of the following will appear in the series ? 243,5, 81, 15, 27, 45, 9, ?.
(A) 27
(B) 15 (C) 5 (D) 135
23. how many times do the hands of the clock point towards each other in a day?
(A) 12
(B)18
(C) 22
(D) 24
24. a boy was asked to calculate the roots of quadratic equation Ax2+Bx+C=0. HE
CALCULATED one of the roots wrong and other one right . with his calculation the
sum and product of the roots were found to be 7 and 12 respectively. The product
exceeded the product of the correct roots by 6. which of the following could nave been
the original quadratic equation?
(A)x2+7x+12=0 (B) x2-5x+6=0 (C) x2-7x-12=0 (D) x2-8x+12=0
25.The speed of the boat is 36 kmph higher than that of the stream in which it
travels . if it can travel 828 km downstream in 18 hours and the same in upstream in 23
hours , its average speed is __________.
(A) 36 kmph (B) 41 kmph (C) 46 kmph (D) 31 kmph.
26. A man travels by bus for 20 hours and they by train for 05 hours . if the average
speed of the bus was 20 kmph and that of the entire journey was 24 kmph. What was the
average speed of the train?
(A) 44kmph (B) 30 kmph (C) 36 kmph (D) 40 kmph
27. 1) B is mother of D but D is not daughter of B. 2) A is son of M and brother of
G.
3) G is sister of D
which of the following cannot be referred from the given information .?
(A)B has 3 children (B)M has two sons (c) G is younger to B. (D) A is younger to D.
28. 50% of the subscriber to newspaper A are corporate managers and those 30% are in
finance. If 40% of the subscriber who are corporate managers in finance are money
managers, how many of the newspapers 25,000 subscriber are corporate money
managers in the financial field.
(A) 1500
(B)1600 (C) 1800 (D) 1900
29.there are six children A.B,C,D,E and F are playing a game of football . they are related
with each other as follows:

A-E are brothers.

B is A uncles son,

C and D are daughters of Bs fathers brother.

C-D are daughters of Bs fathers brother

C-D are cousins of B.


How many male members are there?
(A)2
(B)3
(C)4
(D)5.

TECHNICAL
31. Consider the following program
#include
main()
{char x[10],*ptr=x;
scanf(%s,x);change(&x[4]);}
change(char a[])
{puts(a);}
if abcdefg is input, the output will be
(A) abcd (B)abc (C) efg (D) garbage.
32.what will be the output ?
main()
{
struct xyz
{int i:
}
struct xyz *p;
struct xyz a;
p=&a;
p->i=50;
printf(%d,*p,i);
}
(A) compile time error (B) 0 (C)50 (D) garbage value.
33. a two dimensional array A is declared as int A[4][2]={0}. What values would be
printed after execution the following statement?
Printf(%d,sizeof(A));
(A)4 (B)8
(C) 32 (D) none of these.
34. the output of the code fragment is
int x=4,*y;
y=&x;(*y)++;
printf(%d,%d\n,*y);
(A)5 (B) 4 (C) 0 (D) syntax error.
35. In the link list implementation of the queue class,where does the insert method place
the new entry on the linked list.?
(A)at the head
(B) at the tail
(C) after the other entries that are greater than the other entry.
(D)after all other entry that are smaller than the new entry.
36.what is the drawback in the threaded binary tree?

(A)null links are replaced with thread links (B)doesnt contain null links. (C)extra
memory is required. (D)no extra memory is required.
38. which of the following option of the ls command prints non-graph character in octal.
(A) ls-a (B) ls-b (C) ls-I (D) ls-r
39.which of the following are essential operating system services that are general purpose
,multipurpose ,multi user computer operating system should support
(A) interface support for computer operators
(B) performance analysis software for tuning the file system,process scheduling ,memory
management and device driver characteristics
(C)facilities for making an inventory if installed software and hardware on the platform
(D)none of these.
40.when pack command is used the original file size is reduced by__________.
(A)25-40% (B) 50-70% (C) 80% (D) none of these.
41 The __________ command extracts the fixed string and displace it.
(A) egrep (B) fgrep (C)grep (D) sgrep
42.here is a small piece of c++code containing a while loop
int i=0;
while (i<10)
{cout<<I<<ENDL;< P>
i++;
}
(A)0 (B)8 (C) 9 (D) 10
43. What is the difference between public and private inheritance?
(A) under the public inheritance ,public and protected members of the base class have
the same status in the derived class.
(B)under private inheritance ,public and protected members of the base class all become
private members of the derived class.
(C)both A &B
(D) none of these.
44.inheritance facilitates reusability because
(A) child object cannot be modified.
(B)the base class need not be modified to derive a new class.
(C)derived class objects inherit only the desirable feature of the base class.
(D) objects of the base class can be treated as objects of the derived class.
45.the ability for the processor to delegate its use by application is called?
(A) cooperative multitasking (B) preemptive multitasking (C) time slicing
(D)sharing

46.a thread differs from a lightweight process in that :


(A)threads have a parent process (B)threads share processs resources but light weight
process do not. (D)threads run in user space ,but light weight thread run in kernel space.
47.the login prompt can be changed by changing the contents of the file
(A)initab (B) init (C) passwd (D)gettydefs
48.which command is used to delete all files in the current directory as well as all files
and sub directories in its sub directory?
(A)rm* (B)rm-r* (C)rm all (D)rm *.*
49. when all the elements above the main diagonal of a square matrix are zero ,then the
matrix is said to be lower triangular matrix .consider that such a matrix A is
represented in an array A[1:n*(n+1)/2)], such that the elements aij are stored by rows in
the array ,what is the addressing formula for element aij.(i.j=[1:n])
(A)(j*(j+1)/2)+1 (B) (i*(i+1)/2)+j
(C)(i*(i-1)/2)+j
(D) (j*(j-1)/2)+1
50.an algorithm for searching a large sorted array for a specific entry x compares every
fourth item in the array to x until it finds one that is larger than or equal to x. whenever a
larger item is found ,the algorithm examines the preceding three entries .if the array is
sorted smallest to the largest ,which of the following describes all cases when this
algorithm might use fewer comparisons to find x than would a binary tree search?
(A)it will never use fewer comparisons.
(B)when x is very close to the beginning of
the array . (C)when x is in the middle position in the array (D)when x is very close to the
end of the array.
OK.
Mohit

BYE,

WIPRO PAPER ON 11th NOVEMBER AT KARNATAKA


Hello friends,
I got placed in WIPRO TECHNOLOGIES. I am sorry to all of you, I took two
week to write about my experience.
The placement process was held at PES College, Mandya. Including our college
(Vidya Vikas Institute of Engineering & Technology, Mysore), totally 15 colleges were
there (1300 candidates).
Company has 15 months bond (including 3 months training).
Salary offered:
During training period - 12,000 (stipend)

After training 2.25 to 2.7 lacks (depending upon our performance.)


Short listed candidates:
Written test 271
Tech round 110
HR round 75 (Ooh! thank GOD I am one of them).
Friends, before I tell you about my experience in WIPRO placement process, I want
to tell about the long journey behind it.
Companies attended:
Infosys: didnt clear written test itself. (Remember, you have to explain the steps while
solving puzzles. Here I made a big mistake).
Caritor: didnt clear written test.
CTS: didnt clear written test.
Tech Mahindra: didnt clear written test.
Subex: didnt attend the test.
TATA Elxsi: cleared written test, cleared tech round, cleared HR but I didnt sign the
bond. (It had 2 years bond and the job place was Pune).
Satyam: didnt attend the test.
L n T InfoTech: didnt clear written test.
Accenture: didnt clear written test.
WIPRO TECHNOLOGIES: Cleared all the rounds and got selected.
The

selection

1.
2.
3. HR interview.
Written test:

process

of

WIPRO

Written

consists

of

rounds:

test.
Technical

interview.

It

consists

of

1.

Verbal

2.

aptitude

50

questions,

sections:

15

questions

15

questions

3. technical 20 questions
Remember there will be sectional cutoff.
Verbal section: This section was very difficult. This time questions were only based on
anatomy, analogy and arranging the sentences in order. Not even a single question was on
active to passive voice, direct to indirect speech and paragraph reading. They gave very
difficult words. I suggest you to refer GRE Barrons book for this section.
Aptitude: Even this section was difficult because it was time consuming (Lengthy
problems). Please work on all the chapters in R.S. Aggarwal. Dont neglect even a single
topic. (This time we had questions from stocks & shares, partnership too).
Technical: This section was bit easy compared to other two. But you should know the
concepts of all your subjects in depth. We had many question from UNIX & USP (UNIX
Shell Programming). Others are from C, C++, OS, Data structures, ADA and Computer
Networks. Some times they will ask logic design too.
They announced the short list at 2:30. At 3:00 interview process started. I had my
interview at 6:00. When I went to my panel I was shocked. (We got the information that
among 13 candidates no body has cleared tech round from that panel. I was the 15 th
person to enter that panel & thank God 2nd to clear the tech round).
Finishing the interview for 14th candidate he went out & came after 10 minutes
and told the volunteer to send me in.
Me:
He:

may
yes.

Please

Me:
He:

come
come

thank
sorry

Me:

(with

He:

so

smile
can

in.

sir?

take

your

you

Sandhya,
a

in

on
you

I
my

sir.

made
face)
please

seat.

you
its

ok

define

to
sir.

No

your

wait.
problem.
self?

Me: sir (Told about my family background), as my hobby I write portraits, read technical
magazines
like
Digit,
PC
Quest,
Chip
(+point)

He:

(stopped

me)

Me:

who

is

the

editor

Maulik

of

Digit?

Jasubhai.

(Please note, whenever you tell about your hobbies, strengths, weakness, etc please be
ready
to
prove
them.
Prepare
an
example
for
each.)
He:

(Impressed)

good,

continue.

Me: My another and interesting hobby is to write C-programs. I love C-coding, because
of which today I have 6 projects in my hand, 5 completed projects and another one is
under
progress.
He: (shocked) 6 projects? Hmm I am impressed. Can you explain your projects?
Me: Sure sir (I went there with full preparation. I took my projects in a CD. Even I took
the printout of the programs). I explained my projects by showing the source code.
He: very good. You have done good projects. If I ask you to write programs it will be
meaning less, so I dont ask you to write program. (Thought for sometimes) ok tell me
what will be the output of this program? (Wrote a small block)
Me:

(explained

He:

ok.

Me:

(shit!

He:

Tell
I

about

forgot

(gave

Me:

something)
types

them

and

me

told

was

thinking)

hmm

clue)

the

answer.

(smiled)

Me:

(smiled)
what

scheduling.

He:

He:

of

about

SQL?

Me: (Oh! god. I am weak in SQL, so told frankly) sir I am weak in SQL. But still you can
test
my
knowledge.
He:
Me:

gave

some

information
(wrote

&

told

to

write

something)

query.

He: (smiled) you told you are weak in SQL. How come you wrote the perfect answer?
Me:
He:

(smiled)
(Thought

for

while)

asked

an

aptitude

question.

Me: (shocked! Aptitude question in tech round!) Calculated something and explained. (I
think
I
was
wrong.
So
lost
confidence)
(Friends please remember if you dont know the answer dont sit simply. Try to explain
something or anything related to the topic. It may be right too. They never ask for
perfection.
But
you
should
at
least
know
the
basics.
)
He:
Me:

ok.

(Gave

(Started

calculation,

but

was

another
wrong

problem)
again)

He: (Stopped me) its ok. Leave. Again some basic questions on arrays and strings.
Me:

told

everything

(got

He:

ok

Sandhya.

It

was

nice

Me:

(I

thought

lost

the

to

my
talk

battle,

confidence
with

still

you.

smiled)

You
thank

back).
may

leave.

you

sir.

He: (Just wanted to see my reaction it seems) gave me a form & told take this form and
go
to
HR.
Me: (with big smile) thank you sir. (Came out & told yesssss!!!)
I took half an hour to fill that form. Be careful while filling that form. You may get
questions on that form. Please use effective sentences while filling the form. (Meanwhile
my other two friends came with a big smile. Oh god! We all cleared the tech round. We
were happy). I phoned my brother & took his help to fill the form. 2 cool HRs were there
to
help
us.
After finishing the form filling process, we came down. Within 5 minutes HR called me
(at
7:55).
Me:
He:
Me:

may
Yes.

I
Come
thank

come
in.

in
take

you

sir?
your

seat.
sir.

He: Define your self. Tell me about your family background (he specified).
Me:

(Told

about

my

family

background.)

He: why your marks are so less? (I got less percentage in 5 th and 6th semester)
Me: sir, I am very much interested in practical application more than theories. You can
see my resume sir I have mentioned 6 projects. I have done all of them from 3 rd to 6th
sem.
Means
2
projects
per
semester.
He: (stopped me) doing projects is good. I really appreciate you. But still your main
objective is to score good marks na? How can I believe that you are technically good?
Me: sir I have cleared my tech round. It proves that I have good control over my subjects.
I have studied my subjects to gain knowledge but not for examination purpose.
He:

(Impressed)

will

you

score

good

marks

7th

in

&

8th

SEM?

Me: sir, I have done these projects only to prove my technical skills and get placed in a
reputed company like WIPRO. After getting placed I will be tension free and I can
concentrate
on
my
studies.
So
I
will
sir.
He:

are

Me:

(Told

He:

(Impressed)

you
with

confidence)
ok.

You

sure?
yes
may

sir.
leave.

Me: (With a smile on face) thank you sir.


At 10:00 they announced the list of students who got placed.
Ooh! Me and my 2 friends made it. We got selected for WIPRO.
Friends please dont be sad if you are still trying. One or the other day will be
yours. Please keep faith on God and dont stop working. I know how we feel when we
fail to get through. But take each and every thing as a good experience. They are the
opportunities to gain knowledge. Keep on trying till you succeed. All the best.
Finally I would like to convey my thanks to my parents, my brother and my best
friends. They are the biggest support for me to win this battle. Also thanks to my lecturers
Yogesh, Purushottam and monish Kumar. Thank you everyone.
VIT PAPER ON 25/08/2006 AT CHENNAI
I attended test for VIT Consultancy today(25/8/2006)

The pattern consist of


Aptitude
J2ee test
the aptitude test question are from RS Agarwal . Its enough rush up the book before the
test(30 questions ,30 minutes)
the J2ee test comprise of the basic concepts of Java and J2ee (20 questions,20 minutes)
Tats it

thing which is like a secrete.


It is an easy round to me
He asks
1.tell me about Your self
2.tell me about Storage media
3.tell me about Software development life cycle
I ask him sir I want to drink some eater then he gave me some water with a smile face.
And then I replaid the main Phases in SDLC
4.Tellme about BLACK BOX TESTING and WHITE BOX TESTING.
Ok Venkateswarlu I selected u. I will see u again in WIPRO I feel so happy and give him
shake hand and happyly came out from the room.
Totally u must be confident when u are giving the details and answer the questions. Ok I
will see u at wipro. ALL THE BEST AND BEST OF LUCK.
VERNALIS SYSTEMS PATTERN - 19 MAR 2006 - CHENNAI
Vernalis test is very easy ..
75 questions -- 90 minutes
25 - apptitude questions ( Very very easy, prepare R.S Agarwal - that is enough)
6 - Logical Reasoning ( 2 paragraph - 6 questions )
15 - English questions ( very easy - basic only )
they give two set of rules ( X and Y )
if the statement begins with X then we want to check whether the statement follows that
X rules. if the rule
is broken then we want to specify the rule alphabetic...
X
1) statement must begin with the word ' one '
2) numbers should be in brackets ( [9] )

3) end with ;
like that they give some rules.. then gave some statements like
X one is te...............9
for the above statement
rule 1 -- ok
rule 2 -- not ok
rule 3 -- not ok
so we want to fill as b,c
i gave a sample statement only.. not an exact one..
then they asked
3 html ( basic -- mailto tag)
2 dbms
3 css
and some basic questions.. test was very easy..
Aptitude
1. There were 36 chairs. how many ways can they be placed such that all rows have equal no.
of chairs and at least three chairs are there in each row and there are at least three rows.
5 ways.
2. There are 27 balls, of which 1 is heavier. given a balance how many times you need to
weigh to find out the odd ball.
3 Weighs.
3. Product of three consecutive nos. 210. What is the sum of two least numbers
11
4. If the area of the sqaure is increased by 69 % how much the length of the side will
increase?
30%
5. if the sum of five consecutive nos. 35? how many prime nos are there :
2 primes.
6. if the length of the rectangle is reduced by 20% and breath is increased by 20 % what is
the net change ?
4 % decrease
7. A question on sets. There are some 20 Basketball players & 30 Football players, and 25
cricket players. 1 of them plays all the three games. 8 of them plays atleast two games. They
are 50 altogether. How many of them plays none of the games.

8. A question on directions. B is 20 miles east of A. D is 30 miles east of C. E is 10 miles north


of D. C is 20 miles north of B. How far E is from A? Some 3 questions on Reasoning like,
9. If you say that giving stock options to employees increases the productivity of the
company, which of the following sentences support it. A) Giving stock options increases the
morale of the employees
Technical
1.A Circuit with nand gates. (ans. may be XOR)
2.CMRR. relates to (options not in order)
voltage follower
non inverting amplifier
inverting amplifier
integrator
3. Given a circuit , give the ouput.
(ans. may be triangular wave.)
4. o/p of an assembly code.
multiply by 11.
5. how to handle asynchronous events.
a) polling
b) interrupt
etc.
6. Whether all recusive pgm can be writtten iteratively?
7. What data structes you will use if you want to go to first record from the last and vice
versa?
doubly linked circular list
8. Given 10000 nos. and 48MB Memory. What is the complexity of the efficient sorting algo.?
(the algo. is not mentioned)O(N)
9. Given a C code and ask what it does?
code was something similar to Bubble sort and that particular code does the sorting in
Desending order and the complexity
is O(n^2)(which is the next question).
10.
A code like this is given.
a. for(i=0;i<num;i++)
b. for(i=num;i>0;i--)
Assuming no code optimization and assume that the microprocessor
has flags etc. which one is correct.
b will execute faster.
11. If there are too many page faults what is the problem?
12. To ensure one pgm. doesnt corrupt other pgm. in a Multi-pgm enviornment
what you should do?

13. Which one you will use to implement critical section?


Binary Semaphore
14. Which one is not needed for Multi-processing. enviornment?
options are: virtual memory,security,time sharing,none of theabove.
15. Which one is not done by Data link layer ?
bit stuffing, LRC,CRC,parity check
16. Which one is not related to Data link layer?
17. Which one is not suitable for client-server application?
tcp/ip,message passing,rpc,none of the above.
18. What is SQL.
Procedural Relational DB Query Language.
19. Indexing in databases give you options were like 1.efficient deleting and inserting
2.efficient deleting.
etc.
20. int a=1,b=2,c=3;
printf("%d,%d",a,b,c);
What is the output?
21. Scope of Static Variable ............
in a file.
22. for(i=0; i<=10;i++,printf("%d",i)); +- (+- is there in the questions)
23. Real Time Os should have
a)fast context switch
b)Virtual memory etc.
24. Messages are transferred in some E71 code, where after 7 bits of data, 1 bit of stopping
data is to be transferred. what should be done.
options were like
a) send directly
b) send after encoding
etc.
25. There are three processes A, B, C. A sends data to B. B removes the header stores it and
sends the data to C. C returns it to B. B receives the message, identifies the message and
adds the header that was stored and sends to A.B receives the messages from C such that
atmost 'm' messages B are pending. Identify the best Data Structure.
26. A question in compiler about the heap and stack allocation of memory.
27. struct
{
char a[3];
int b;
}x;
char *cp;
a) size of x is 7.
B

b)
c)
d) cp takes the size of a pointer.
(d ) is the ans.

28.a logic ckt is given and asked to identify the configuration.


ans: XOR.
29.multi vibrator with nor gates is given
ans: astable multi sqr wave opt.
30.4 stage ripple counter with delay(f/f) 10msec. How much time it takes for a state to
change. 4*10=40.
31 impedence of a p'lel resonant circiut at resonance:R.
32 .serial to parellel conversion is done by ans:shift register.
33. if the address bus id 20bits.then the memory space is 1Mb.
34.filtering can be done with:capacitor,iductor,both,none.
35.the config that is worst effected by low CMMR
ans:Non inverting amplifier.
36.two progs are given. one satrts counting frm 0 to MAX and the other stars frm MAX to 0.
which one executes fast.may be Max to 0.Think of.it should be.
37. the fctn of datalink layer is:bit stuffing.
38.which of the following is not fctn of datalink layer: Encryption.
39.voltage levels of rs232x:+12,-12.
40.which of the following is not used for client/server. RPC,TCP/IP,MESSAGEQs None
ans:may be none.
41. which of the following is true.
ans:the primary key in DataBAse design is very important.
42. SQL is a Non procedural query language.
43.Data structure used to implement a menu: doubly linked circular linked list.
44. some regular expression is given:WaW'.may be it is context free grammar.
45.the feature of real time os is: fast context switching.
46.os implements protection with the help of hardware(like virtual addressing in 386/286 etc).
47. what is a real time system.

48. name some real time OS


49. what are the characteristics of Real time OS.
50. is DOS a real time OS.
51. what is a kernel,shell.
52. what is binary search, traversal, hashing etc.
53. given a scenario what is the suitable data structure.
54. write a code to count the no. of 1's in a binary rep. of a number. memory taken for char *,
int * etc.
55. char *cp; int *ip; cp++,ip++ - what is the result.
56. compare the no. of bytes in unix and Dos for long char short int.
57. how to make programs portable on unix and Dos under such circumstances.
58. in c++, what is a constructor, destructor, friend etc.
59. what is waterfall model, prototype model etc.
60. what is testing. what is unit testing, integration testing etc.
61. What is indexing in databases?
62. What is atomicity?
63. Can recursive pgms be written in C++, Write a recursive pgm to calculate factorial in c+
+.
64. What is best data structure to store the processes info in a real time operating system?
Aptitute test : 15 Minutes, 20 Questions
Some questions are:
(not in order)
1. A question (first one)on addition of fraction of inches
a. was the answer
2. There were 36 chairs. how many ways can they be placed suchthat all rows have equal no.
of chairs and atleast three chairs
are there in each row and there are atleast three rows.
ans:5 ways.
3. There are 27 balls, of which 1 is heavier. given a balancehow many times you need to
weigh to find out the odd ball.
ans:3 Weighs.
4. Product of three consecutive nos. 210. What is the sumof two least numbers
ans:11.

5. If the area of the sqaure is increased by 69 % howmuch the length of the side will increase?
ans:30%
6. if the sum of five consecutive nos. 35? how many prime nosare there :
ans:2 primes.
7. if the length of the rectangle is reduced by 20% and breathis increased by 20 % what is the
net change ?
ans:4 % decrease
8. A question on sets.
There are some 20 Basketball players & 30 Football players,and 25 cricket players. 1 of them
plays all the three games.
8 of them plays atleast two games. They are 50 altogether.How many of them plays none of
the games.
9. A question on directions.
B is 20 miles east of A. D is 30 miles east of C. E is 10 milesnorth of D. C is 20 miles north of
B. How far E is from A?
Some 3 questions on Reasoning like,
10. If you say that giving stock options to employees increases the productivity of the
company, which of the following sentences
support it.
A) Giving stock options increases the morale of the employees
..
..
etc.,
11. Gamblers comes to the Amusement parks. There are some Amusement parks in each city.
There are some gamblers in each city. So
what can you infer.
A) Amusement park always have gamblers.
..
..
etc.,
2. Technical Questions.
Electrical & Electronics : 15 Questions
1.A Circuit with nand gates. (ans. may be XOR)
2.CMRR. relates to (options not in order)
voltage follower
non invering amplifier
inverting amplifier
integrator
3. Given a circuit , give the ouput.
(ans. may be triangular wave.)
4. o/p of an assembly code.
mulitply by 11.
5. how to handle asynchronous events.
a) polling
b) interrrupt
etc.

ii)Data Structures, Algo., & Complexity theory : 5 questions


iii) OS : 5 questions
iv) Networks and Hardware: 5 questions
v) Databases and Misc.: 5 questions
vi) C Pgm. : 5 questions
some more 10 questions.
1. if W is a sequence of strings without a and W' is its reversalthen WaW' is accepted by:
Context Free Grammmars
2. Whether all recusive pgm can be writtten iteratively?
ans:yes.
3. What data structes you will use if you want to go to first record from
the last and vice versa?
ans:doubly linked circular list
4. Given 10000 nos. and 48MB Memory. What is the complexity of the
efficient sorting algo.? (the algo. is not mentioned)
O(N)
5. Given a C code and ask what it does?
code was something similar to Bubble sort and that
particular code does the sorting in Desending order and the complexity
is O(n^2)(which is the next question).
6.
A code like this is given.
a. for(i=0;i<num;i++)
b. for(i=num;i>0;i--)
Assuming no code optimization and assume that the microprocessorhas flags etc. which one is
correct.
b will execute faster.
7. If there are too many page faults what is the problem?
8. To ensure one pgm. doesnt corrupt other pgm. in a Multi-pgm enviornmentwhat you should
do?
9. Which one you will use to implement critical section?
ans:Binary Semaphore
10. Which one is not needed for Multi-processing. enviornment?options are: virtual
memory,security,time sharing,none of the
above.
11. Which one is not done by Data link layer ?
bit stuffing, LRC,CRC,parity check
12. Which one is not related to Data link layer?
13. Which one is not suitable for client-server application?
tcp/ip,message passing,rpc,none of the above.
14. What is SQL.

Procedural Relational DB Query Language.


15. Indexing in databases give youoptions were like 1.efficient deleting and inserting
2.efficient deleting.
etc.
16. int a=1,b=2,c=3;
printf("%d,%d",a,b,c);
What is the output?
17. Scope of Static Variable ............
in a file.
18. for(i=0; i<=10;i++,printf("%d",i)); +- (+- is there in the questions)
20. Real Time Os should have
a)fast context switch
b)Virtual memory etc.

21. Messages are transferred in some E71 code, where after 7 bits of data,
1 bit of stopping data is to be transferred. what should be done.
options were like
a) send directly
b) send after encoding
etc.
22. There are three processes A, B, C. A sends data to B. B removes theheader stores it and
sends the data to C. C returns it to B. B receives themessage, identifies the message and adds
the header that was stored and sends to A.B receives the messages from C such that atmost
'm' messages
B
are pending.
Identify the best Data Structure.
23. A question in compiler about the heap and stack allocation of memory.
24. struct
{
char a[3];
int b;
}x;
char *cp;
a) size of x is 7.
B
b)
c)
d) cp takes the size of a pointer.
(d ) is the ans.

VALUE LABS PAPER & INTERVIEW ON 22 JUL 2006 AT HYDERABAD


Hai frnds,
Useful for those who are going to attend from Tuesday onwards??
I am an ECE B.TECH student.
There are two people in the interview panel both technical and H.R will be conducted by
them simultaneously

MY EXPERIENCE AND QUESTIONS THEY ASKED ME


After entering the panel I have wished both the interviewers. Then they asked me to take
my seat and asked to give my resume(Give the resume with u r reference on it, it may
favour you).
When did you come here in the morning?
8:00 am sir.
When did you start at your room?
7:00 am sir.
Where do you live in Hyderabad?
Mehdipatnam sir.
Did you have your lunch?
No sir.
How are you feeling now?
A little tired sir.
Did you have your cookies?
Yes sir.
So lets start the interview ok?
Ok sir.
Tell me about yourself?
For this I have started with my name following with my acedamic credentials and about
the jkc training I have undergone and the project we did.
Explain the main idea of your project?
For this I have explained the whole idea of our project
You are technically strong in what?
I told that I am basically from ECE sir so we have only 'C'n our curriculum so I know
only that.
Don' you have idea about OS, CN, MICROPROCESSORS
As we have them in your syllabus I have an idea over them
Then alright (pointing to the other person the first one said) he is a king in
microprocessors first he will as you some questions on mp then we will go with some 'C'
questions ok?
Ok sir.
QUESTIONS ON MICROPROCESSORS
What is a microprocessor?
What is the new technology in microprocessors?
What is DMA?

What is FSB?
What is crystal frequency?
What is flash memory?
What is virtual memory?
What is paging?
When can you say a microprocessor is efficient?
Speed of processor will depend on what?
In 8086 how many instructions will be processed per second?
QUESTIONS ON 'C' LANGUAGE
Tell all the points which you know about malloc function?
What is a structure and its advantage?(derived data type & can use more than one data
type using structs at same time)
What is difference between a structure and a union?(regarding memory usage)
Write a program for swapping of 2 numbers with out using a third variable?
(simple Arithmetic equations let x, y are variables take x=x+y, y=x-y, x=x-y take an
example to understand)
What is difference between a stack and a heap?
What is #define why do we use it?
MISCELENIOUS QUESTIONS
ISO OSI Layers?
What all are the communications do you know?
Difference b/w analog and digital communications give examples?
Expand modem?
What is modulation and demodulation?
Draw all the pictorial representations of logic gates?
LOGICAL QUESTIONS
There are 36 ball which look identical but one of them is less weighted than others and
there is a common balance with you in how many least chances will you trace that ball
with less weight out of the group?
Ans: 4 chances
12 12 12 --> we will get group of 12 balls
4 4 4 -->we will get group of 4 balls
2 2 -->we will get group of 2 balls
1 1 -->here you will get the add ball out.
So 4 steps.
Guys please go through with all that you mentioned in your resume
All the best.
TRIANZ PATTERN AT BANGALORE ON 6th JULY 2006

hai friends,
This is pavan kumar from GIT banglore.Iam very happy beacause i placed in Trianz.
This good software company providing IT solutions and product oriented softwares.
Trianz pattern
---------------------1.Written test(75q-60min)
Verbal(15)
reasoning(15)
Technical(35)
Qunatitive(10)
2.Group Discussion(15 min)
3.TR+HR round(30 min)
C
Java
DBMS

written Test:
1.
APPRENTICE : PLUMBER ::
A. player : coach
B. child : parent
C. student : teacher
D. author : publishe
E. intern : doctor
2.

MUSICIAN : ORCHESTRA ::
A.
B.
C.
D.
E.

mechanic : car
songwriter : lyrics
desk : office
player : team
actor : screen

3.ASSENGERS : AIRPLANE ::
A. audience : theater
B. birds : nest
C. sailors : submarine
D. freight : warehouse
E. students : classroom
CORRAL : LIVESTOCK ::
A.
B.
C.
D.
E.

fence : posts
capture : thieves
nest : birds
devise : plans
fire : employees

4&5 etc. given


7,8,9,10
fill in the blanks are given
10-15:
some verbal reseanoing questiions
aptitude:
===========
time & distance
work and time
some basic questins
rations
clocks
intersts
true discount
====================
analitical questions
--------------1.arrange ments
technical
==============
c
java(few)
CN
DBMS

TISL Placement Sample Question Paper


TISL -----------> PAPER MODEL
Two parts.
Part A: aptitude (100 Que) 100 marks
Part B: comp knowledge test
TISL(TATA-IBM)PAPER
------------------Q9). what will be the result of executing following program
main
{
char *x="new";
char *y="dictonary";
char *t;
void swap (char * , char *);
swap (x,y);
printf("(%s, %s)",x,y);
char *t;
t=x;
x=y;
y=t;
printf("-(%s, %s)",x,y);
}
void swap (char *x,char *y)
{
char *t;

y=x;
x=y;
y=t;
}
a).(New,Dictionary)-(New,Dictionary)
b).(Dictionary,New)-(New,Dictionary)
c).(New,Dictionary)-(Dictionary,New)
d).(Dictionary,New)-(Dictionary,New)
e).None of the above
(Ans will be b or e) check
Q10).If a directory contains public files (can be valied and used
by any one ) which should not be altered ,the most liberal
permissions that can be given to the directory is
a)755
b)777
c)757
d)775
e)None of the above
(Ans a)
11) what would the following program results in
main()
{
char p[]="string";
char t;
int i,j;
for(i=0,j=strlen(p);i<j;i++)
{
t=p[i];
p[i]=p[j-i];
p[j-i]=t;
}
printf("%s",p);
}
a)will print:string
b)will not print anything since p will be pointing to a null string
c)will print:gnirtS
d)will result in a complication error
e)will print invallid characters(junk)
(Ans will be b ) check
12) After the following command is executed
$ ln old new
a listing is performed with the following output
$ ls -li
total 3
15768 -rw-rw-rw- 2 you 29 Sep 27 12:07 old
15768 " " " " " " " " new
15274 " " 1 " 40 " " 09:34 veryold
which of the following is true
a)old and new have same i-node number,2
b) " " " " " " " , 15768
c)old and new have nothing yo do with each other
d)very old and new are linked
e)very old and old are linked
(Ans is b)
13) What will be the result of executing the following statement

int i=10;
printf("%d %d %d",i,++i,i++);
a).10 11 12
b).12 11 10
c).10 11 11
d).result is OS dependent
e).result is compiler dependent
(Ans is e)
14) What does extern means in a function declaration
a)the funct has global scope
b)the funct need not be defined\
c)nothing really
d)the funct has local scope only to the file it is defined in
e)none of the above
(Ans will be c)
15) What will be result of the following program
main()
{
void f(int,int);
int i=10;
f(i,i++);
}
void f(int i,int j)
{
if(i>50)
return;
i+=j;
f(i,j);
printf("%d,",i);
}
a).85,53,32,21
b)10,11,21,32,53
c)21,32,53,85
d)32,21,11,10
e)none of the above
(Ans is e)
16). MS windows 3.1 is a
a)operating system
b)Application
c)Programing language
d)database
e)shell
(Ans will be b)
17).MS Windows 3.1 supports which type of multi-tasking?
a)cycle
b)executive
c)preemptive
d)Non-preemptive
e)Manual
(Ans )
18)The command ......ln /bin/mail /usr/you/bin/m
a)will not be executed because you are linking files
across different file systems
b)results ln /bin/main being the same file as /usr/you/bin/m
c)results in 2 links to the file mail
d) " " " " m
e)none
(Ans will be b)
19)In a standerd directory lay out ,/etc is the directory where

a) basic programs such as who and ed reside


b) - - - - - - c)various administrative files such as password file reside
d) - - - - - - e) - - - - - (Ans is c)
20) The command echo *
a) echoes all files in the current directory
b) - - - - c)
d)
e)
(Ans is a)
21)What will be the result of the following segment of the program
main()
{
char *s="hello world";
int i=7;
printf("%.*%s",s);
}
a)syntax error
b)hello w
c)
d)
e)
(Ans is b)
22) What will be the result of the following program
main()
{
int a,b;
printf("enter two numbers :");
scanf("%d%d",a,b);
printf("%d+%d=%d",a,b,a+b);
}
a)- - - - b) - -c) will generate run time error /core dump
d)
e)
(Ans is c)
23) What is the size of 'q'in the following program?
union{
int x;
char y;
struct {
char x;
char y;
int xy;}p;
}q;
a)11
b)6
c)4
d)5
e)none
(Ans is b why because no of bytes for int =4 given in instructions)
24) Which message is displayed when a window is destroyed
a)WM_CLOSE
b)WM_DESTROY
c)WM_NCDESTROY

d)
E)
(Ans is b)
25)Send Message and postmessage are
a)send message puts the message in the message queue and results,
postmessage processes the message immediately
b)Sendmessage processes the message immediately,postmessage puts
the message in the queue and returns
c) Both put the message in the message queue and returns
d) Both process the message immediately
e) None of the above
(Ans will be b check)
26) Which of the following message is used to limit the size
of teh Window
a)WM_SIZE
b)WM_PAIN
c)- - - d)- -- - (Ans is a)
27)until who|grep mary
do
sleep 60
done
a) is syntactically incorrect
b) waits 60 seconds irrespective of Mary being logged in or not
c) waits until Marry is logged in
d)waits till Mary exited
e)None
(Ans is c)
28)The UNIX system call that transforms an executable binary file into
a process is
a)execl()
b)execv()
c)execle()
d)execve()
e)All of the above
(Ans will be d check)
29)Which of the following is true about fork()
a)- - - - b)causes the creation of a new process ,the CHILD process
with a new process ID
c)
d)
e)
(Ans is b)
30) What do the following variable names represents?
sort register
volatile default
a)- - - b)---c)all the above are keywords
(Ans is c)
31)What will be the result of the following program
main()
{
char *x="String";
char y[] = "add";
char *z;
z=(char *) malloc(sizeof(x)+sizeof(y)=1);

strcpy(z,y);
strcat(z,y);
printf("%s+%s=%s",y,x,z);
}
a)Add+string=Add string
b)syntax error during compilation
c)run time error/core dump
d)add+string=
e)none
(Ans will be e consider cap&small leters)
32)What does the following expression means
a)
b)
c)
d)an arrey of n pointers to function returning pointers to
functions returning pointers to characters
(ANS IS d)
33)Which of the following is not a DDL object
a)HBRUSH
b)HPEN
c)HBITMAP
d)HRGN
e)HWND
(Ans ic e)
34) Which of the following message is used to initialize the
contents of a dialog
a)WM_CREATE
b)WM_SIZE
c)WM_COMMAND
d)WM_INITDIALOG
e)none
(Ans will be d)
35)Interprocess communication in UNIX can be achieved using
a)pipe
b)Message
c)Semaphores
d)Shared Memory
e)All of the above
(Ans is e)
36) Which of the following is true
a)UNIX is a time sharing multi-user OS
b)UNIX has a device independent file system
c)UNIX is full duplex
d)UNIX has command interpreter
e)All of the above
(Ans is e)
Q). PS1 pwd
export PS1 results in
a). your primary prompt being your current directory
b). " " and secondary prompts being the current dir
c). " " prompt being your home dir
d). " " and secondary prompts being the home dir
e). None of the above.
Q). If you type in the command
nohup sort employees > list 2 > error out &
and log off ,the next time you log in . the output
will be
a). in a file called list and the error will de typed in

a file error out


b). there will be no file called list or error out
c). error will be logged in a file called list and o/p
will be in error out
d). you will not be allowed to log in
e). none of the above
Q). In UNIX a files i-node
a)is a data structure that defines all specifications
of a file like the file size ,number of lines to a
file ,permissions etc.
b).---c). - - - -d). _ _ _
( ans is ---------(a) )
Q). The UNIX shell is....
a).does not come with the rest of the system
b).forms the interface between the user and the kernal
c)-- -- --d) - - - e) none
(ans is (b) )
Q).enum number { a=-1, b= 4,c,d,e}
what is the value of e ?
7,4,5,15,3
(ans is 7 ) check again
Q).The very first process created by the kernal that runs
till the kernal process is haltes is
a)init
b)getty
c)
d)
e)none
(Ans is a)
Q) Result of the following program is
main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a)0,5,9,13,17
b)5,9,13,17
c)12,17,22
d)16,21
e)syntax error
(Ans is d )
Q) What is the result
main()
{
char c=-64;
int i=-32

unsigned int u =-16;


if(c>i){
printf("pass1,");
if(c<u)
printf("pass2");
printf("Fail2");
}
else
printf("Fail1);
if(i<u)
printf("pass2");
else
printf("Fail2")
}
a)Pass1,Pass2
b)Pass1,Fail2
c)Fail1,Pass2
d)Fail1,Fail2
e)none
(Ans is c)

APTITUDE TEST
****************************************
Missing leter
1).eefgghii- (Ans j)
2)
3)defdefghi- (Ans g)
4)cdexyzfghxyz-(Ans i)
5)defdegde- (h)
6)abczabcyabc- (x)
7)fgbhibjkb- (l)
- - - - - (Ans is r)
9)aarbsctarb- (s)
10)bccdeefg- (g)
11)efhikl- (n)
12)abccdeffg- (h)
13amnbopc- (q)
14)tttssrqqqp- (p)
15)ddffhhjj- (l)
16)mnmnklopopkl- (q)
17)cddeeefff- (f)
18)gfed- (c)
19)dfhjl- (n)
20)abcijdefij (g)
21)efgefghefghi- (e)
22)bcbdedfgfhi- (h)
23)aababccdc- (d)
24)aibcidef- (i)
25)cehl- (q)
26)abdehimn- (s) check again
27)becfdge- (h)
28)agbhc- (i)
29)adhko- (r)
30)efghjklno- (q)
31)aedhg- (k)

32aeibf- (j)
33)zdwgt- (J)
34)zeyijxg- ()find
35)cqreuvg- (y)
36)ksjtiuh- (v)
37)rsjtuhvw- (f)
38)ieajfbk- (g)
39)hebifej- (g)
40)hjlmiel- (h)
--------------------------------

TOTAL 60 QUE'S 25-PROBLEMS & 35 FIGURES(figure series,we


have to find next coming figure)
HERE 13 PROB'S ARE THERS.REMAINING ALSO ALMOST LIKE THIS .
1) A boy multiplied a number with 10 and got 100,insted of
dividing it . If he devided it what would be the answer?
(Ans is 1)
2)If 12 shell cup board requires 18ft of wall space then
30 " " " " how much wall space?
(Ans is 45)
3)The average salary of three employee is 95Rs.per week.
If one employee earns 115 and other earns 65 rupees.
how much will third be earn?
(Ans is 105Rs)
4)A company instaled 36 punching machines at the begining of
the year.In the spring they instaled 9 additional m/c's
and then discontinued 18 in the fall.How many were still
installed at the end of the year?
(Ans is 9)check
5)During a given week a programmer spend 1/4 of his time
preparing charts,3/8 of his time for coding,rest of his time
for debugging the programs.If he had 48 hrs during the week
how many hours did he spend debugging the program.
(Ans is 18hrs)
6)A 16 story building has 12000ft on each floor. Company A
rents 7 floors and company B rents 4 floors. What is the
number of square feet of unrented floor space?
(Ans is 60000 sqft)
7)A man owns 2/3 of a computer service buroue business and
sells 3/4 of his share for $75000.What is the value of the
business.
(Ans is 150,000)
A computer printer produces 176400 lines in a given day.
If the printer was in operation for 7hrs during the day
how many lines did it print per minute?
(Ans is 420)
9)From its total income a company spent $20000 for advertising
half of the remainder on salaries and had $6000 left.What
was the total income?
(Ans is $32000)
10)In a certain company 20% of the men and 40% of the women
attended the annual company picnic.If 35% of all the employees are men .What % of all the employee went to the picnic?
(Ans is 33%)
11)The dimensions of certain IBM m/c are 48"*30". If the

size of the m/c is increased proportionally until the


sum of its dimensions equals to 156".What will be the
increase in the shortest side?
(Ans is 30)
12)If a card punch operator can process 80 cards in half an hour
How many cards can this process in 7hr30min?
(Ans is 1200)
13)In a computer tape library there are two racks with 40 tapes
per rack.In a given day 30 tapes are in use . What fraction
remains in the rack?
(Ans is 5/

THINKSOFT PAPER - 15 MAY 2006 - CHENNAI


Hi Friends, Here is THINKSOFT Pattern and few sample questions.
TEST PATTERN ::: 60 questions - 45 minutes
SECTIONS :::
Reading Comprehension
Aptitude(Maths)
Synonyms
Antonyms
Find Grammatical Mistakes
Data Sufficiency
Synonyms ::
Mandatory - compulsory
affirmed - confirmed
illicit - illegal
capricious - whimsical
alieviate - relieve,remove
Data Sufficiency ::
Two triangles are congruent
two triangles are right triangles
two triangles have same perimeter
Answers:
statement 1 is enough
statement 2 is enough
statement 1 and statement 2 together is required
Statement 1 is enough and statement 2 is enough separately
www.chetanasinterview.com
Data is insufficient
y>0
y square 2 - 4 > 0
Answers:
1.statement 1 is enough

2.statement 2 is enough
3.statement 1 and statement 2 together is required
4.Statement 1 is enough and statement 2 is enough separately
5.data is insufficient
Aptitude ::
37.5 % of a number is 450 what is the 87.5 % of the number?
Ans:1050
30% of 40% of 200
Ans:24
SI = 240
R=6
N=4
P=?
Ans:1000
Difference between simple interest and compound interest for 2 years = p(N/100) square
2. A problem based on this.
TECH MAHINDRA PAPER ON 4th NOVEMBER KOLKATA
HI, friendz.I'm Amitava from Kolkata.It was an Off Campus drive for 2006 freshers
batch. The aptitude was not so tough, but the buzzword was 'TIME'...they will give u
very little time to do these.u will be given one hour, and u need to answer 70 questions.
There was no negative marking and sectional cutoff. They announced it prior to the
test.So when ur time is almost exhausted, guessworks will come handy. There were five
sections.

Section 1: It was fill in the blanks without any options.it was simple.Just fill in with
prepositions,tenses etc.

Section 2: There were 'choose the most appropriate word'.some small 3-4 line
paragraphs will be given and u will be asked some easy questions on them. SEC 1 & 2

should be attempted first.It is scoring and one can do these 20 ques in maximum 15
mins.Score definite 20 here and keep much time for other sections.

Section 3: Comprehension.A paragraph in easy english is given.This should be


attempted last. Sec 3 & 4 consists ( 20 + 20 =40 )ques.So these section is the
decider.Try to solve quickly so u can attempt as much as possible before guesswork.

Section 4: Logical & Analytical Reasoning!! Solve R.S.Agarwal thoroughly.All those


series completion, odd man out, figures, missing no,venn diagram,small puzzles etc etc
given.

Section 5: Quantitative and Data Sufficiency.Solve R.S.Agarwal


quantitative.Knowledge of solving Time & work,profit & Loss,average, age
problems,percentage,Train ,Speed, Volume,Area etc will come handy.

They set a high cutoff.Only 29 cleared apti including myself from about 100.

Then in the same day we faced 3 interviews.

They call for technical interview first.It was a panel of two.One was an young man in
his 20s, another was a middleaged man about 40+. They were friendly.They started
with .."Tell about yourself".then as I'm a CS guy, started asking from C,C++,Java.They
asked to rate myself in all those three.I rated.Then they asked to write the code of

swapping two numbers using pointer and witout using temporary variable.I started
well,but got a bit confused in the middle.They helped me.Then command line
arguments in C & Java. Polymorphism,abstract class,multiple inheritance,interface,
exceptions, operator/method overloading,overriding,java thread and two ways of
implementation, arrays, stack related basic questions were asked.then they started with
DBMS.At first they started with a unfamiliar question bout DBase.I told i didnt used or
ever saw DBase.then Normalization,3NF,BCNF, referential integrity.They smiled and
asked "Lets get into Oracle." They asked if i know PL/SQL.I said no.They asked wat is
subquery and asked to fetch the salary of the top 3 highest paid employees.It lasted for
about 45 minutes.Then they asked me to wait in a room.

Then after half an hour of anxiety, one person came and called me for HR.This time it
wasnt a panel.Only one middle aged gentleman.He asked me typical HR related
questions such as why TM,why should we hire u,
strength,weaknesses,hobbies,semester marks,future plans.He seemed to be very
intersted about philately i.e stamp collecting which i told as one of my hobbies.Asked
about how many stamps I have,of which nations, catalogues,rare stamps, & blah
blah.Then asked to wait in the same room again.

Then in 10 minutes they called again.now it was a luxuriously decorated room and I
was greeted by an elderly lady.She asked me about how was the day, about my
family,work culture at tech mahindra,pay package etc.Then asked me "If I select u, will
u be able to cope up with immense pressure tat TM training will impart upon u??" Then

asked "r u ready to sign a bond of 2 years??" I replied positively.Then surprisingly


asked "O.K.Tell me what actually a bond is??" I replied "Its an agreement that I wont
leave TM for a certain period of time otherwise...".She interrupted me in the middle and
asked "AGREEMENT!!!U r just a kid in the block and using such business jargons.Its a
COMMITMENT .." & blah blah!!Then asked to wait and HR will get back to u. It was
6 in the evening.I was exhausted and was thinking they will ask "U may leave for the
day" as they were asking few other candidates.

After 5 mins they called me agin and smiled and said"Amitava.now u are one of us.U r
selected and u will have to join Tm by DEC,06." I was so happy.A long 1.5 yr job hunt
ended atlast.I am thankful to God and all my well wishers.When I was getting so
depressed tat no one will ever take me, God gifted me one of the best opportunity.I got
thru a company tat many of my friends who cracked campus earlier would envy.

Best of Luck to ALL.


By,
Amitava.
MBT Paper on feb-2006
HI Friends
.......i am nikhil srivastava recruited from RKDFist- bhopal by Tech Mahindra(MBT).I am a third
year student of Information Technology. Here i am trying
to narrate my experience which gives an idea about the selection process of the company...
Criteria is (60% throughout in 10th, 12th, and in BE/BTech)......
They have recruited around 45% students that have been sitted.....
There were generally three rounds...
1) Aptitude test...(includes aptitude+verbal reasoning+non-verbal
reasoning+comprehension(gre type))
2) Technical interview(HR+technical)
3) HR round

APTITUDE TEST:It consisted of 5 sections each with atleast 10 questions while one or two
sections contained 20 questions.There were altogether 75 questions which u have to answer in
1 hr only(remember time is very very imp in this round).The sections were:
a) Verbal reasoning and analytical
b) Non verbal reasoning and analytical
c) MCQ-questions based on English grammar(very easy)
d) English comprehension( Do it at last..coz it consumes time)

ThOrough prep from RS Aggarwal(verbal,non-verbal,quantitave) is enough to pass the


aptitude test besides having minimum base in english.
Anyway the result was declared within 40 mins and luckily I was selected.
Here i remember some of the ques. frm the aptitude section. As they are
1. If a boat is moving in upstream with velocity of 14km/hr and goes downstream with a
velocity of 40km/hr. then what is the speed of the stream?
(a) 13km/hr
(b) 26km/hr
(c) 34km/hr
(d) none of these
Ans: A
2. find the value of (0.75*0.75*0.75-0.001)/(0.75*0.75-0.75+0.01)
(a) 0.845
(b) 1.908
(c) 2.312
(d) 0.001
Ans: A
Then a questions frm alligation of mixtures
3. A man buys 12 lts of liquid which contain 20% of the liquid and the rest is water. He then
mixes it with 10lts of another mixture with 30% of liquid.
What is the % of water in the new mixture?
4.A certain number of men can finish a piece of work in 10 days. If however there were 10
men less it will take 10days more for the work to be finished.
How many men were there originally?
(a) 110 men
(b) 130 men
(c) 100 men
(d) none of these
ans:- A
5. In simple interest what sum amount of Rs. 1120/- in 4 years and Rs.1200/- in 5 years?

(a) Rs.500
(b) Rs.600
(c) Rs.800
(d) Rs.900
6. x% of y is y% of?
(a) x/y
(b) 2y
(c) x
(d) can't be determined
ans: C
7. The population of a city increases @ 4%p.a. there is an additional annual increases of 4%
of the population due to the influx of job seekers. Find
the % increase in population after 2 years?

8. The ratio of the number of boys and girls in a school is 3:2. Out of these 10% the boys and
25% of girls are scholarship holders. % of students who
are not scholarship holders?
9. A rectangular plant (2)^1/2 meters wide can be placed so that it is on either side of the
diagonal of a square shown below. (Figure is available). what
is the area of the Plank?
ans: 7*(2)^1/2.

And some questions on ages.. some on profit and loss.


prepare frm R.S. agrawall.....it will be sufficient to clear..... beware time is the factor.....
Logical Section:

1. a,c,e,g..
(a) h
(b)i
(c)d
(d)j
Ans: b

2. a,e,i,m,q,u_,_
(a) y,e
(b) b,f
(c) g,i
(d) none

3. 1,2,3,5,7,11....

(a) 15
(b) 9
(c)13
(d)12
ans: c(Series of prime no)
4. 1,3,4,8,15,27,...
(a) 60
(b)59
(c)43
(d)50
and similar to these there are many more ques.....so be prepare for them also.....

5.All pens are elephants. some elephants are cats.


(a) Some pens are cats
(b) No pens are cats
(c) All pens are cats
(d) None of the above
i think it (d)

6. Some green are blue. No blue are white.


(a) No green are white
(b) Some green are white
(c) No green are white
(d) None of the above
ans: b
Technical Interview
Now i am giving some idea about the technical inteview of mine....
which is a very friendly kind of....
i am giving some questions which they fired on me.....

Ques1: so. nikhil...... Tell me about urself?


This is the most obvious ques..every hr asked to make us comfortable
just give us general introuduction with ur achievements and qualification...
B
Ques2: he see my resume.....and asked how u maintain a good percentage throughout ur BE?
ans: sir.....i am a hard worker frm my childhood...
ques: what languages u have done?
ans: ..........

Ques: what is the diffrence b/w c & c++?


ans: .....
Ques: then he gave me a program to write it was of addition of matrices?

Ques: what u see ur self after 5 years ago?


ans: I said sir i want to be the HR of tech mahindra.....
That! was a six! he really impressed with my presence of mind......

Ques: What were ur strength and weakness?


Ques: prove that ur a good team player?
Ques: What is data structures?
Ques: what are generic pointers?
Ques: Is c++ is a superset of c then why we are using c in banks?
Ques: what is inheritance? write its syntax?
Ques: what are access specifiers?
Ques: What according to u ur salary be?
Ques: When u started giving meaningful contribution to the organisation?
Ques: what are paramaterised constructors?
Ques: In header files.... files are declared or defined?
ans; declared
Ques: what is normalisation?
Ques: What is black box and white box testing?

HR ROUND.......

This round is merely a formality....as they asked us about any special quality that we have....
i said sir i love to ride bikes...
they told us to take any topic frm ourselves and then give idea on that.....

then they take each of our's resume with one photograph and then they asked us to make

communications skills strong as there


are many chances to go abroad 4 their projects.

and then they asked that u all will miss bhopal


and i answer sir ! we are very eager to leave bhopal......
And then finally He said

"WELCOME TO TECH MAHINDRA"

It will be all......
best of luck....just have confidence in urself...
hope i will help u all frm my experience..
meet u soon at MBT......
BEST OF LUCK TO U ALL.....

BEST WISHES...
"NIKHIL SRIVASTAVA"
BE(IT)
RKDFIST-BHOPAL

Vous aimerez peut-être aussi