Vocab Lesson

by devi | 9:30 AM in | comments (0)

Vocab Lesson

1. Agrarian : related to agriculture

2. Heterogeneous: non similar things

3. Postulate : frame a theory

4. Sporadic: happening from time to time

5. Wan : looking ill, not bright

6. Tyro : a beginner

7. Neglect pay no attention to

8. Echelon : level of authority or responsibility

9. Differential : having or showing or making use of

10. Flimsy lacking : solidarity, strength

11. Affluent : wealthy, abundant

12. Malign : to slander

13. Jeopardy : danger

14. Extol : to praise highly

15. Atone : make repayment

16. Avarice : greed

17. Doleful dismal, mourful

18. Augury : prediction

19. Obnoxious : harmless

20. Sanction : hinder

21. Manifest: clear and obvious

22. Coincident: incidentally

23. Naive : innocent, rustic

24. Reciprocal: reverse or opposite

25. Bellicose inclined to fighting

Synonym-antonym

by devi | 9:30 AM in | comments (0)

Synonym-antonym

Synonyms

1. Latent = potential (inactive)
2. Momentary = transient
3. Latitude = scope
4. Heap = to pile (collect)
5. Adhesive = tenacious
6. Veer = diverge (turn)
7. Concur = acquiesce (accept)
8. Subside = wane (drop)
9. Enounce = reject
10. Hover = linger (stay close)
11. Tranquil = serene (calm)
12. Admonish = usurp (reprove)
13. Alienate = estrange (isolate)
14. Instigate = dissipate (dismiss)
15. Belief = conviction
16. Covet = crave (desire)
17. Belated = too late
18. Solicit = beseech (seek)
19. Brim = border
20. Divulge = reveal
21. Tamper = obstruct
22. Caprice = whim (impulse)
23. To merit = to deserve
24. Stifle = suffocate (smother)
25. Lethargy = stupor (lazy)

Synonyms


1. furtive | stealthy (secret)
2. pretentious | ostentatious(affected)
3. incentive | provocation
4. discretion | prudence
5. meager | scanty
6. cargo | freight(load)
7. baffle | frustrate
8. efface | obliterate(wipe out)
9. lament | mourn
10. compunction | remorse (regret)
11. amiable | friendly
12. cajole | coax (wheedle – sweet talk)
13. Embrace | hug (hold-cuddle)
14. latent | potential
15. Confiscate | appropriate (to take charge)
16. emancipate | liberate
17. misery | distress
18. confiscate | appropriate
19. annihilate | to destroy
20. acumen | exactness
21. metamorphosis | transform
22. scrutiny | close examination
23. obstinate | stubborn
24. fuse | combine
25. whet | sharpen

Synonyms asked in Hughes, Accenture & MBT


admonish = usurp (reprove)
merry = gay
alienate = estrange (isolate)
instigate = incite
dispel = dissipate (dismiss)
belief = conviction
covet= crave (desire)
belated = too late
solicit = beseech (seek)
brim = border
subside = wane (drop)
renounce= reject
hover = linger (stay close)
divulge = reveal
heap = to pile (collect)
adhesive = tenacious
veer = diverge (turn)
hamper = obstruct
caprice = whim (impulse)
to merit= to deserve
stifle = suffocate (smother)
inert = passive
latent = potential (inactive)
latitude = scope
concur = acquiesce (accept)
momentary = transient
tranquil = serene (calm)
admonish = cautious
lethargy = stupor (lazy)
volume = quantity
furtive= stealthy (secret)
meager = scanty
cargo = freight(load)
baffle = frustrate
efface = obliterate(wipe out)
misery = distress
pretentious = ostentatious(affected)
discretion = prudence
compunction = remorse (regret)
amiable = friendly
cajole = coax (wheedle – sweet talk)
incentive = provocation
Embrace = hug (hold-cuddle)
latent = potential
Confiscate = appropriate (to take charge)
emancipate = liberate
lament = mourn
confiscate = appropriate
obstinate = stubborn
acumen = exactness
metamorphosis = transform
scrutiny = close examination
annihilate = to destroy
fuse = combine
whet = sharpen
behest = request
adage = proverb
penitence = to repeat

Synonyms asked in Wipro, Polaris & Satyam


1] Depreciation = deflation,depression,devaluation,fall,slump
2] Depricate = 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] Intermittant = externally stopping and then starting
7] Detrimental = harmful
8] Mesotiate = …
9] Conciliation = make less angry or more friendly
10] Orthodox = conventional or superstitious
11] Fallible = liable to err
12] Volatile = ever changing
13] Manifestion = clear or obvious
14] Connotation = idea
15] Reciprocal = reverse, opposite
16] Agrarian = related to agriculture
17] Vacillate = undecided or dilemma
18] Experdent = fitting proper , desirable
19] Simulate = produce artificially resembling an existing one
20] Access = to approach
21] Compensation= salary
22] Truncate = shorten by cutting
23] Adherance = stick
24] Heterogenous = non-similar things
25] Surplus = excessive
26] Assess = determine the amount or value
27] Cognezance = knowledge
28] Retrospective = review
29] Naive = innocent , rustic
30] Equivocate = tallying on both sides
31] Postulate = frame a theory
32] Latent = dormant,secret
33] Fluctuate = wavering
34] Eliminate = to reduce
35] Affinity = strong liking
36] Expidite = hasten
37] Console = to show sympathy
38] Adversary = opposition
39] Affable = lovable,approchable
40] Decomposable = rotten
41] Agregious = apart from crowd,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

Synonyms asked in TCS & Kanbay


Admonish= usurp
Adhesive = tenacious, sticky, glue, gum, bonding agent
Alienate = estrange
Bileaf = big screen, big shot, big success
Belief = conviction
Baffle = puzzle
Brim = edge
Covet = to desire
Caprice = whim
Concur = similar, acquiesce
Confiscate = appropriate, to take charge, to annex
Cargo = load, luggage
Dispel = scatter
Divulge = reveal, make known, disclose
Discretion = prudence
Emancipate = liberate
Efface = obliterate
Embrace = hug, hold, cuddle
Furtive = stealthy
Heap = to gather
Hamper = obstruct
Heap = to pile
Hover = linger
Incentive = spur
Instigate = incite
Inert = passive
Latitude = scope
Lethargy = stupor
Lamont = lakes, lamentable
Lament = wail
Latent = potential
Merry = Enjoy
Meager = small, little, scanty
Misery = distress
Momentary = for small time
Merit = to deserve
Miserable = unhappy, sad
Obstinate = stubborn
Overt = obvious, clear, explicit, evident
Pretentious = ostentatious
Potential = ability
Rinaile = rigorous
Renounce= reject
Solicit = Humble, urge
Subside = wane
Stifle = snits
Tranquil = calm, silent, serene
To merit- to deserve
Volume = quantity
Veer = diverge
Wethargy = well wisher

Antonym Ex

Directions:
Each of the questions below consists of a word printed in bold letters, followed by five word or phrases. Choose the word or phrase, which is most nearly opposite in meaning to the word in bold letters, and mark the answer of your choice.

1. FULMINATION
A. praise
B. repetition
C. escape
D. ratification
E. addition
—————————————-
2. DISTEND
A. deteriorate
B. weaken
C. constrict
D. concentrate
—————————————-
3. TOUT
A. cast aspersions on
B. deny the relevance of
C. placate
D. withhold consent
E. misrepresent
—————————————-
4. SQUALID
A. fervid
B. florid
C. pristine
D. extraneous
E. abundant
—————————————-
5. SCOTCH
A. renovate
B. entrust
C. unfasten
D. encourage
E. emphasize
—————————————-
6. PERFIDY
A. tact
B. generosity
C. thoroughness
D. loyalty
E. gratitude
—————————————-
7. OUTLANDISH
A. conventional
B. prolific
C. unchanging
D. transparent
E. noticeable
—————————————-
8. FERVID
A. undistinguished
B. unexpected
C. stubborn
D. restrained
E. discouraged
—————————————-
9. VACUITY
A. quality
B. certainty
C. plenitude
D. stability
E. incontinence
—————————————-
10. RAVEL
A. knit
B. omit
C. remain silent
D. measure
E. increase in value
—————————————-
11. PLUMB
A. reversed
B. lofty
C. horizontal
D. thin
E. light
—————————————-
Answers

1. A
2. C
3. E
4. C
5. D
6. D
7. A
8. D
9. C
10. A
11. C

Sentence Completion

by devi | 9:30 AM in | comments (0)

Improve your Grammar

To answer the questions on ‘error spotting’ and ’sentence correction’, one has to know a bit of grammar. Normally, errors are found in subject-verb agreement, modifiers, parallelism, wrong usage of words, etc. We will briefly discuss some basic concepts here.

Subject-verb agreement:

Verb: It is an action word and represents action in the sentence.
Subject: It is the doer of action or verb.
Object: It is on whom the action is being performed.

Consider the sentence: Ram kicks the ball. Here the action word is ‘kick’. ‘Ram’ is the subject and ‘the ball’ is the object.

The meaning of subject-verb agreement is: When the subject is singular, use a singular verb. When the subject is plural, use a plural verb. In other words, the subject of the sentence and its verb should agree in number.

However, the following exceptions should be taken into consideration.

Collective Nouns (nouns representing a collection, like a bouquet of flowers, committee, etc.) take a singular verb. e.g.

(a) The jury ___ giving the verdict today. (is/are)
(b) A group of boys ___ waiting outside (is/are)
(c) Some boys ___ waiting outside (is/are)

In the first sentence, Jury is a collective noun and hence a singular verb is. Many would have gone for are in the second sentence. But the subject in this sentence is not merely boys but a group of boys which is collective noun and will thus take a singular verb is. However, we make the verb agree with the subject some boys and use the plural verb are in the third sentence. So the trick is in identifying whether the subject is singular or plural.

Whenever one refers to any quantity or number, a singular verb is used. e.g.

Five hundred rupees ___ not enough to buy a car. (is/are)
The answer is ‘is’.

Nouns — parenthesis and subject-verb agreement

Consider the following sentences.
(a) The father along with his sons___ going for fishing. (is/are)
(b) John as well as Jake ___ here at the party. (is/are)

The answer in both of them is is. Most of the students will have gone for are. Here the concept of parenthesis is used. Punctuate the first sentence. It is punctuated as: The father, along with his sons, is going for fishing. What one sees here is that what is separated off by the comma has no relation grammatically to the subject of the sentence, father. Since father is singular, the verb is singular. What one has separated off by commas is called a ‘parenthetical element’ or ‘parenthesis’. A parenthetical element between the subject and the verb has no influence on the verb. The subject decides the verb. Similarly, in the second sentence as well as Jake is a parenthetical element, which has no bearing on the subject, John. Hence, a singular verb.

Modifiers:
Adjectives modify a noun in a sentence. Adverbs modify a verb, another adverb, or an adjective in a sentence. Therefore, adjectives and adverbs are modifiers and these modifiers, in whatever forms (adj./adv-phrase/clause), modify something else in the sentence.

The following points should be noted. The modifier should be placed immediately before/after what it modifies (as is appropriate). If the modifier is not so placed, the error that results is called a misplaced modifier. e.g.

(a) He is enough tall to play basket ball.
(b) We could not discuss our problems completely.

(a) The modifier (adverb) is enough and it is modifying adjective tall. Here it is not appropriate to place modifier before tall, but it should be placed after tall. The correct sentence is: He is tall enough to play basket ball.

(b) The modifier (adverb) is completely. Is it modifying problems or the verb discuss? It is modifying discuss and hence it should be placed with it. The correct sentence is:
We could not completely discuss our problems.

Example: After finishing his speech, the audience was invited to ask questions.

Here, ‘After finishing. . .’ modifies the speaker and not the audience. Hence, the speaker/ he has to follow. The correct sentence is:
After finishing his speech, he invited the audience to ask questions.

Parallelism:
Parallelism means giving words equal importance, equal form and equal weight in a sentence. Each word should be of same order in the sentence. e.g.
.
(1) He spoke forcefully and with clarity.
(2) The job of the secretary was to file papers, to answer calls and typing.

These sentences do not have parallel construction. The correct sentences are as follows. (1) He spoke forcefully and clearly. (Equal importance to ‘forcefully’ and ‘clearly’)
(2) The job of the secretary was to file papers, to answer calls and to type. (Same order)

Redundancy:
This error is in saying the same thing twice through different words. e.g.
Revert back within 15 days.
Here ‘revert’ and ‘back’ have the same meaning. The correct sentence is:
Revert within 15 days.

Exercise
Choose the alternative that best replaces the underlined part.

1. The major reasons students give for failing to participate in the political process is that they have demanding assignments and work at part time jobs.

a. is that they have demanding assignments and work at
b. are demanding assignments and they work at
c. are that they have demanding assignments and that they have
d. is having demanding assignments and having

2. Planning a life ahead is easier than to live it.

a. Planning a life ahead is easier than to live it.
b. To plan a life in front of you is easier than to live it.
c. To plan a life ahead is easier than living it.
d. To plan a life ahead is easier than to live it.

3. A woman who is over 75 years are not allowed to travel alone.

a. A woman who is above 75 years are not allowed to travel alone.
b. 75-year-old women are the ones who are not allowed to travel alone.
c. A woman who is over the age of 75 is not allowed to travel alone.
d. A woman who is above 75 is not allowed to travel.

4. Neither she nor her plight were any longer amusing.

a. Neither her nor her plight were any longer amusing.
b. Neither she or her plight was any longer amusing.
c. Neither she nor her plight was any longer amusing.
d. Neither she nor her plight were any longer amusing.

Answers :
1. Here the error is of subject-verb agreement and parallelism. The major reasons students is a plural situation and hence the verb should be are. It is there only in (b) and (c). Option (b) does not have parallel construction. Hence, (c) is the answer.

2. Here the error is of parallel construction. Planning has –ing form and live has to live form. Only (b) and (d) have correct parallel construction. But (b) changes the meaning. Therefore, (d) is the answer.

3. Here the error is of subject-verb agreement. There is only one woman in the sentence. So the verb should be is. Only (c) and (d) have the correct form of the verb. Option (d) changes the meaning, as the word alone is not there, and is too general. The answer is (c), as it is specific, and its meaning is similar to the main sentence.

4. Here there is only one person being mentioned. Hence, the subject is singular. So the verb should be was. Only (b) and (c) have the correct form of the verb. But after Neither, the word nor comes. Hence, the answer is (c).

Sentence Completion Ex.

Directions:

Each sentence below has one or two blanks. Each blank shows that something has been omitted. Under each sentence five words are given as choice. Choose the one correct word for each blank that best fits the meaning of the sentences as a whole.


1. The fact that the____ of confrontation is no longer as popular as it once was____progress in race relations.
A. insidiousness … reiterates
B. practice … inculcates
C. glimmer … foreshadows
D. technique … presages
E. reticence … indicates

Ans : D
——————————————————————————————-
2. A child should not be ____ as being either very shy or over aggressive.
A. categorized
B. instructed
C. intoned
D. distracted
E. refrained

Ans : A
——————————————————————————————-
3. President Anwar el – Sadat of Egypt, disregarding ____ criticism in the Alab world and in his own Government, ____ accepted prime minister Menahem Begin’s invitation to visit Israel in order to address the Israeli parliament.
A. acrimonious … formally
B. blemished … stiffly
C. categorical … previously
D. malignant … plaintively
E. charismatic … meticulously

Ans : A
——————————————————————————————-
4. In his usual ____ manner, he had insured himself against this type of loss.
A. pensive
B. providential
C. indifferent
D. circumspect
E. caustic

Ans : D
——————————————————————————————-
5. We never believed that he would resort to ____ in order to achieve his goal; we always regarded him as a … man.
A. charm … insincere
B. necromancy … pietistic
C. logic … honorable
D. prestidigitation … articulate
E. subterfuge … honest

Ans : E
——————————————————————————————-
6. ANGLE : DEGREE
A. area : square inch
B. milk : quart
C. society : classes
D. letter : alphabet
E. time : minutes

Ans : A
——————————————————————————————-
7. CONFIRMED : INVETERATE
A. knowledge : supposed
B. financial : bankrupt
C. immature : callow
D. credible : incredible
E. careful: punishing

Ans : B
——————————————————————————————-
8. LULLABY : BARCAROLE
A. birth : marriage
B. night : morning
C. cradle : gondola
D. song : poem
E. carol : sonneteer

Ans : C
——————————————————————————————-
9. ZOOLOGY : ANIMALS
A. ecology : pollution
B. botany : plants
C. chemistry : atoms
D. history : people
E. mathematics : geometry

Ans : B
——————————————————————————————-
10. DORY : VAN
A. dairy : cow
B. fish : vehicle
C. freighter: caisson
D. runners : wheels
E. danish : Dutch

Ans : C

English Practice Ex - 2 (Sentence Correction)

Correct the following sentences

1. Daniel come to judgment!
2. The army have been called to carry out the rescue operations.
3. The parliament is divided on the bill.
4. Do not pride on your youngness because one day you shall grow old.
5. Keep on laughing. Laugh is the best medicine.
6. His brother committed a thiefhood in his house.
7. The chair is made of a wood.
8. He wears glass to aid his short-sighted eyes.
9. Lata works as a she-servant in the house.
10. The team camped at Namkum. They followed a rigorous routine.
11. White experimenting on the guinea pig, the doctor took his special care.
12. Time passes in his chariot majestically.
13. The earth treats us as his children, not strangers.
14. When the moon comes between the earth and the sun, her shadow causes lunar eclipse.
15. Take care of the vixen because they are wily creatures.
16. the trees bore mangos last summer,
17. Who shall win if there is a contest between the dwarves and the giants?
18. Sunil Gavaskar scored more than ten thousands run.
19. He does not cut paper with blade, but with scissor.
20. The same board is used for chess as well as draught.
21. The Indians are a religious minded people.
22. It is very difficult to chase huge score in the forth innings.
23. Children should not seek admissions to the elders’ society.
24. The down-to-earth never forget the grounds on which they stand.
25. The law of indexes proves very helpful in algebric calculations.
26. The bright lamps gave much lights.
27. The practices of the lawyers very from those of the doctors.
28. The vehicle is a carrier of goods.
29. I spoke to Kumar Gaurav’s the actor’s secretary.
30. He brought the cake from Deepak’s.
31. There was no money in the bank in Mava’s and Veena’s joint account.
32. The cup’s base was rounded.
33. You will be promoted in the time of a year.
34. Mr. M is ready to make any sacrifice for the sake of justice.
35. Devendra Kaushik is Anand of our chess circle.
36. The fleet of ships move at a uniform speed.
37. Aurangzeb’s religious bigitism caused severe harm to the Mughal Empire.
38. The tin is a precious metal.
39. Queen Elizabeth is the monarchess of England.
40. the milkwomen said that she would not supply milk on holidays.

Answers (English Practice Ex - 2 (Sentence Correction))

Answers to Sentence Correction Exercise

1. come- came
2. have- has
3. on- by
4. youngness- youth
5. laugh- laughter
6. thiefhood- theft
7. of a- of
8. glass- glasses
9. she-servent- maid
10. they- it
11. his- its
12. its- his
13. his- her
14. her- its
15. they are- she is a
16. bore- bored
17. dwarves- dwarfs
18. thousands- thousand
19. scissor- pair of scissors
20. draught- draughts
21. no error
22. no error
23. admissions- admission
24. forget the ground
25. indexes- indices
26. lights- light
27. practice of the lawyers vary
28. no error
29. gaurav’s- gaurav
30. no error
31. no error
32. base of the cup
33. a years time
34. justice’s sake
35. is the anand
36. ship moves
37. bigotism- bigotry
38. no error
39. monarchess- monarch
40. milkwomen- milkmaid

Reading Comprehension - Approach

We channelize the skill of effective reading into the area of comprehension. The question is, given a passage how do we tackle it?

Let us start with posing some rhetorical questions!

1. Do we need to read the entire passage to answer the questions?
2. Do we adopt the same approach to reading all types of passages?
3. Is it better the read the passage first or the question first?
4. Should we skim or scam? Won’t that reduce our accuracy?
5. Should we answer some questions from all passages or all questions from some passages?
6. Should we attempt as many questions as possible as fast as we can and get a majority of them correct or attempt a limited number and concentrate on accuracy?
7. Should we underline while reading?
The above mentioned questions cover most of the areas of concern that students have while starting off with reading comprehension.
An answer that summarizes all the above mentioned questions could be

Is there any particular approach that should be followed?

Approach - 1.

Step 1: Read the passage quickly; underline key elements.

Step 2: Answer each question – you can answer either general questions first or begin with specific questions; read back to the passage when in doubt.

Step 3: Attack inferential, except, least, not question (if any); eliminate, guess, move on.

Approach - 2.

Step 1: Read the stem of the question first; use lead words to search for relevant information.

Step 2: when you come across each word referred to the question stem, you can either underline it for further reference or immediately go back to the question and answer it.

Step 3: the remaining questions without clues then can be answered.

Approach - 3.

Step 1: Read the first question.

Step 2: Scan the passage for Answer.

Step 3: Mark the appropriate choice. Continue the method for each question.

Note: This approach can be used when the passage is flooded with facts. Here you need not memorize any information, just locate answers.

Approach - 4.

Step 1: Read the first two paragraphs of the passage.

Step 2: Skim through the questions and answer the questions pertaining to these paragraphs..

Step 3: Read next two paragraphs .go through the remaining questions; answer the questions pertaining to these paragraphs.

Step 4: Read the remaining paragraphs and answer the few question that remain.

Note: This approach is advised for the passage that is very lengthy and memorizing information becomes difficult.

Reading Comprehension Ex -2

Directions:
Each passage in this group is followed by questions based on its content. After reading a passage, choose the best answer to each question. Answer all questions following a passage on the basis of what is stated or implied in that passage.
Disequilibrium at the interface of water and air is a factor on which the transfer of heat and water vapor from the ocean to the air depends. The air within about a millimeter of the water is almost saturated with water vapor and the temperature of the air is close to that of the surface water. Irrespective of how small these differences might be, they are crucial, and the disequilibrium is maintained by air near the surface mixing with air higher up, which is typically appreciably cooler and lower in water vapor content. The turbulence, which takes its energy from the wind mixes the air. As the speed of wind increases, so does the turbulence, and consequently the rate of heat and moisture transfer. We can arrive at a detailed understanding of this phenomenon after further study. The transfer of momentum from wind to water, which occurs when waves are formed is an interacting-and complicated phenomenon. When waves are made by the wind, it transfers important amounts of energy-energy, which is consequently not available for the production of turbulence.

1. This passage principally intends to:

A. resolve a controversy
B. attempt a description of a phenomenon
C. sketch a theory
D. reinforce certain research findings
E. tabulate various observations
——————————————————————————————-
2. The wind over the ocean usually does which of the following according to the given passage?

I. Leads to cool, dry air coming in proximity with the ocean surface.
II. Maintains a steady rate of heat and moisture transfer between the ocean and the air.
III. Results in frequent changes in the ocean surface temperature.

A. I only
B. II only
C. I and II only
D. II and III only
E. I, II, and III
——————————————————————————————-
3. According to the author the present knowledge regarding heat and moisture transfer from the ocean to air as

A. revolutionary
B. inconsequential
C. outdated
D. derivative
E. incomplete
——————————————————————————————-
4. According to the given passage, in case the wind was to decrease until there was no wind at all, which of the following would occur?

A. The air, which is closest to the ocean surface would get saturated with water vapor.
B. The water would be cooler than the air closest to the ocean surface.
C. There would be a decrease in the amount of moisture in the air closest to the ocean surface.
D. There would be an increase in the rate of heat and moisture transfer.
E. The temperature of the air closest to the ocean and that of the air higher up would be the same.
——————————————————————————————-

Answers
1. B
2. A
3. E
4. A

Reading Comprehension Ex-1

Directions:

Each reading passage in this section is followed by questions based on the content of the reading passage. Read the passage carefully and chose the best answer to each question. The questions are to be answered on the basis of what is stated or implied in the passage.

But man is not destined to vanish. He can be killed, but he cannot be destroyed, because his soul is deathless and his spirit is irrepressible. Therefore, though the situation seems dark in the context of the confrontation between the superpowers, the silver lining is provided by amazing phenomenon that the very nations which have spent incalculable resources and energy for the production of deadly weapons are desperately trying to find out how they might never be used. They threaten each other, intimidate each other and go to the brink, but before the total hour arrives they withdraw from the brink.

1. The main point from the author’s view is that

A. Man’s soul and spirit can not be destroyed by superpowers.
B. Man’s destiny is not fully clear or visible.
C. Man’s soul and spirit are immortal.
D. Man’s safety is assured by the delicate balance of power in terms of nuclear weapons.
E. Human society will survive despite the serious threat of total annihilation.

Ans : E

——————————————————————————————
2. The phrase ‘Go to the brink’ in the passage means

A. Retreating from extreme danger.
B. Declare war on each other.
C. Advancing to the stage of war but not engaging in it.
D. Negotiate for peace.
E. Commit suicide.

Ans : C

——————————————————————————————
3. In the author’s opinion

A. Huge stockpiles of destructive weapons have so far saved mankind from a catastrophe.
B. Superpowers have at last realized the need for abandoning the production of lethal weapons.
C. Mankind is heading towards complete destruction.
D. Nations in possession of huge stockpiles of lethal weapons are trying hard to avoid actual conflict.
E. There is a Silverlining over the production of deadly weapons.

Ans : D

——————————————————————————————
4. ‘Irrepressible’ in the second line means

A. incompatible
B. strong
C. oppressive
D. unrestrainable
E. unspirited

Ans : D

——————————————————————————————
5. A suitable title for the above passage is

A. Destruction of mankind is in evitable.
B. Man’s desire to survive inhibits use of deadly weapons.
C. Mounting cost of modern weapons.
D. Threats and intimidation between super powers.
E. Cowardly retreat by man

Ans : B

Analogy

by devi | 9:14 AM in | comments (0)

Analogy

English Usage Practice Ex

1. By sheer hard work, he has ___ out a niche for himself.
(A) worked
(B) derived
(C) occupied
(D) carved

2. Tears ___ anger and tension naturally.
(A) relieve
(B) follow
(C) throw away
(D) release

3) This book is not long. I ____________ it by lunch time (will be reading, will have read)

4) Shiela _________ her case book (packed , has packed , had packed )

5) When I _________ my dinner I went to bed (had , have had, had had )

6) Perhaps we ____________ Mahabaleshwar next month (visit, will visit)

7) wood: sand ::

(a) coal: burn
(b) brick: lay
(c) oil: polish
(d) metal: burnish
(e) stone: quarry

8) carpenter: saw ::

(a) stenographer:typist
(b) painter:brush
(c) lawyer:brief
(d) runner:sneakers
(e) seamstress:scissors

9) crow:boastful ::

(a) smirk:witty
(b) conceal:s;y
(c) pout:sulky
(d) blush:coarse
(e) bluster:unhappy

10) glossary:words ::

(a) catalogue:dates
(b) atlas:maps
(c) almanac:synonyms
(d) thesaurus:rhymes
(e) lexicon:numbers

Answers

1) d
2) a
3) will have read
4) has packed
5) had had
6) will visit
7) a
8) b
9) a
10) a

Analogy Exercise - 2

Solve the following and check with the answers given at the end.

11. lumber : bear ::

(a) roost : hen
(b) bray : donkey
(c) waddle : goose
(d) swoop : hawk
(e) chirp : sparrow

12. taxonomy : classification ::

(a) etymology : derivation
(b) autonomy : authorization
(c) economy : rationalization
(d) tautology : justification
(e) ecology : urbanisation

13. Skin : man ::

(a) hide:animal
(b) jump:start
(c) peel:potato
(d) eat:food
(e) wool:cloth

14. Bamboo : Shoot ::

(a) Bean : Sprout
(b) Peas : Pod
(c) Potato : Eye
(d) Carrot : Root
(e) Leaf : Stem

15. Chemise : Lingerie::

(a) unreal : fantastic
(b) benison : curse
(c) malt : beverage
(d) malar : cheekbone
(e) bracts : involucre

16. Editor : magazine ::

(a) captain : ship
(b) actor : movie
(c) director : film
(d) player : team
(e) jockey : horse

17. Volcano : Lava ::

(a) Fault : earthquate
(b) crack : wall
(c) tunnel : dig
(d) water : swim
(e) floor : polish

18. Deflect : Missile ::

(a) Siege : Castle
(b) Distract : Attraction
(c) Protect : Honour
(d) Drop : Catch
(e) Score : Goal

19. marathon : stamina ::

(a) relay : independence
(b) hurdle : perseverance
(c) sprint : celerity
(d) job : weariness
(e) ramble : directness

20.glossary : words ::

(a) catalogue : dates
(b) atlas : maps
(c) almanac : synonyms
(d) thesaurus : rhymes
(e) lexicon : numbers

——————————————————————-
ANSWERSAns 11. (a)
Ans 12. (a)
Ans 13. (a)
Ans 14. (a)
Ans 15: (c)
Ans 16. (a)
Ans 17. (a)
Ans 18. (a)
Ans 19. (a)
Ans 20. (a)

Ans 11. (a)Ans 12. (a)Ans 13. (a)Ans 14. (a)Ans 15: (c)Ans 16. (a)Ans 17. (a)Ans 18. (a)Ans 19. (a)Ans 20. (a)

Analogy Exercise - 1

Solve the following and check with the answers given at the end.

1. moderator : debate ::

(a) legislator : election
(b) chef : banque
(c) auditor : lecture
(d) conspirator : plot
(e) umpire : game

2. crow : boastful ::

(a) smirk : witty
(b) conceal:s;y
(c) pout : sulky
(d) blush : coarse
(e) bluster : unhappy

3. bracket : shelf ::

(a) hammer : anvil
(b) girder : rivet
(c) strut : rafter
(d) valve : pipe
(e) bucket : well

4. archipelago : islands::

(a) arbor : bower
(b) garden : flower
(c) mountain : valley
(d) sand : dune
(e) constellation : star

5. Farrago : Medley::

(a) length : mileage
(b) horse : foal
(c) paletine : vassal
(d) salmagundi : olio
(e) palinode : sketch

6. gullible : duped ::

(a) credible : cheated
(b) careful : cautioned
(c) malleable : moulded
(d) myopic : mislead
(e) articulate : silenced

7. Teapot : Hollowware::

(a) telescope : heliometer
(b) actress : glamourstock
(c) society : fourierism
(d) lipstick : fard
(e) Modern : Communication

8. celerity : snail ::

(a) indolence : sloth
(b) cunning : weasel
(c) curiosity : cat
(d) humility : peacock
(e) obstinacy : mule

9. wood : sand ::

(a) coal : burn
(b) brick : lay
(c) oil : polish
(d) metal : burnish
(e) stone : quarry

10. carpenter : saw ::

(a) stenographer : typist
(b) painter : brush
(c) lawyer : brief
(d) runner : sneakers
(e) seamstress : scissors
————————————————————————————

ANSWERSAns 1. (a)
Ans 2. (a)
Ans 3. (a)
Ans 4. (a)
Ans 5: (d)
Ans 6. (a)
Ans 7: (d)
Ans 8. (a)
Ans 9. (a)
Ans 10. (a)

Ans 1. (a)Ans 2. (a)Ans 3. (a)Ans 4. (a)Ans 5: (d)Ans 6. (a)Ans 7: (d)Ans 8. (a)Ans 9. (a)Ans 10. (a)

Boats and Streams

by devi | 6:34 AM in | comments (0)

Boats and Streams
Important facts:

1)In water, the direction along the stream is called down stream.

2)Direction against the stream is called upstream.

3)The speed of boat in still water is U km/hr and the speed of
stream is V km/hr then

speed down stream =U + V km/hr
speed up stream = U – V km/hr

Formulae:

If the speed down stream is A km/hr and the speed up stream is
B km/hr then speed in still water = ½(A+B) km/hr
rate of stream =1/2(A-B) km/hr

Problems:
1. In one hour a boat goes 11 km long the stream and 5 km
against the stream. The speed of the boat in still water is?

Sol:
Speed in still water = ½ ( 11+5) km/hr= 8 kmph

2.A man can row 18 kmph in still water. It takes him thrice
as long as row up as to row down the river. find the rate
of stream.

Sol:
Let man’s rate up stream be xkmph
then, in still water =1/2[3x+x]=2x kmph
so, 2x= 18, x=9
rate upstream =9kmph
rate downstream =27 kmph
rate of stream = ½ [27-9]
= 9kmph

3.A man can row 71/2kmph in still water . if in a river running at 1.5 km an hour, if takes him 50 min to row to place and back. how far off is the place?

Sol: speed down stream =7.5+1.5=9kmph
speed upstream =7.5-1.5=6kmph

let the required distence x km. then ,
x/9+x/6=50/60 = 2x+3x= 5/6*18
5x=15, x=3
Hence, the required distence is 3 km

4.A man can row 3 quarters of a km aganist the stream is
111/4 min. the speed of the man in still water is ?

Sol: rate upstream = 750/625 m/sec =10/9 m/sec
rate downstream =750/450 m/sec = 5/3 m/sec
rate in still water =1/2[10/9+5/3] = 25/18 m/sec
= 25/18*18/5=5 kmph

5.A boat can travel with a speed of 13 kmph in still water.
if the speed of stream is 4 kmph,find the time taken by the boat to go 68 km downstream?

Sol: Speed down stream = 13+4= 17 kmph
time taken to travel 68km downstream =68/17 hrs
= 4 hrs

6.A boat takes 90 min less to travel 36 miles downstream then
to travel the same distence upstream. if the speed of the boat in still water is 10 mph . The speed of the stream is :

Sol: Let the speed of the stream be x mph .
then, speed downstream = [10+x]mph
speed upstream =[10-x] mph
36/[10+x] - 36/[10-x] = 90/60 =72x*60= 90[100-x2]
(x+50)(x-2) =0
x=2 kmph

7.At his usual rowing rate, Rahul 12 miles down stream in a certain river in 6 hrs less than it takes him to travel the same distence upstream. but if he could double his usual rowing rate for his 24 miles roundthe down stream 12 miles would then take only one hour less than the up stream 12 miles.what is the speed of the current in miles per hours?

Sol: Let the speed in still water be x mph and the speed of
the curren be y mph.
then, speed upstream = (x-y)
speed downstream =(x+y)
12/(x-y) - 12/(x+y) = 6
6(x2 – y2) m= 2xy => x2 – y2 =4y -(1)
and 12/(2x-y) - 12/(2x+y) =1 => 4×2 – y2 = 24y
x2= ( 24y + y2)/4 –>(2)
from 1 and 2 we have
4y+ y2 =( 24y+y2)/4
y=8/3 mph
y= 22/3 mph

8.There is a road beside a river. two friends started from
a place A, moved to a temple situated at another place B and then returned to A again. one of them moves on a cycle at a speed of 12 kmph, while the other sails on a boat at a speed of 10 kmph . if the river flows at the speedof 4 kmph,which of the two friends will return to place A first ?

Sol: Clearly, The cyclist moves both ways at a speed of 12 kmph
so, average speed of the cyclist = 12 kmph
the boat sailor moves downstream = (10+4) = 14 kmph
upstream =(10-4) = 6 kmph
So, average speed of the boat sailor =[ 2*14*6]/[14+6] kmph
=42/5 kmph =8.4 kmph
Since, the average speed of the cyclist is greater, he will
return to A first.

9.A boat takes 19 hrs for travelling downstream from point A to
point B. and coming back to a point C midway between A and B.
if the velocity of the sream is 4 kmph. and the speed of the
boat in still water is 14 kmph. what is the distence between
A and B?

Sol:
speed downstream =14+4 =18 kmph
speed upstream = 14 -4 = 10 kmph
let the distence between A and B be x km. then,
x/18 + (x/2)/10 = 19
x/18 + x/20 =19
19x/180 =19 =>x = 180km
Hence, the distence between A and B bw 180 km

C Basic Codes (50-100)

by devi | 6:34 AM in | comments (0)

51) main( )

{

void *vp;

char ch = ‘g’, *cp = “goofy”;

int j = 20;

vp = &ch;

printf(“%c”, *(char *)vp);

vp = &j;

printf(“%d”,*(int *)vp);

vp = cp;

printf(“%s”,(char *)vp + 3);

}

Answer:

g20fy

Explanation:

Since a void pointer is used it can be type casted to any other type pointer. vp = &ch stores address of char ch and the next statement prints the value stored in vp after type casting it to the proper data type pointer. the output is ‘g’. Similarly the output from second printf is ‘20’. The third printf statement type casts it to print the string from the 4th value hence the output is ‘fy’.

52) main ( )

{

static char *s[ ] = {“black”, “white”, “yellow”, “violet”};

char **ptr[ ] = {s+3, s+2, s+1, s}, ***p;

p = ptr;

**++p;

printf(“%s”,*--*++p + 3);

}

Answer:

ck

Explanation:

In this problem we have an array of char pointers pointing to start of 4 strings. Then we have ptr which is a pointer to a pointer of type char and a variable p which is a pointer to a pointer to a pointer of type char. p hold the initial value of ptr, i.e. p = s+3. The next statement increment value in p by 1 , thus now value of p = s+2. In the printf statement the expression is evaluated *++p causes gets value s+1 then the pre decrement is executed and we get s+1 – 1 = s . the indirection operator now gets the value from the array of s and adds 3 to the starting address. The string is printed starting from this position. Thus, the output is ‘ck’.

53) main()

{

int i, n;

char *x = “girl”;

n = strlen(x);

*x = x[n];

for(i=0; i

{

printf(“%s\n”,x);

x++;

}

}

Answer:

(blank space)

irl

rl

l

Explanation:

Here a string (a pointer to char) is initialized with a value “girl”. The strlen function returns the length of the string, thus n has a value 4. The next statement assigns value at the nth location (‘\0’) to the first location. Now the string becomes “\0irl” . Now the printf statement prints the string after each iteration it increments it starting position. Loop starts from 0 to 4. The first time x[0] = ‘\0’ hence it prints nothing and pointer value is incremented. The second time it prints from x[1] i.e “irl” and the third time it prints “rl” and the last time it prints “l” and the loop terminates.

54) int i,j;

for(i=0;i<=10;i++)

{

j+=5;

assert(i<5);

}

Answer:

Runtime error: Abnormal program termination.

assert failed (i<5),>,

Explanation:

asserts are used during debugging to make sure that certain conditions are satisfied. If assertion fails, the program will terminate reporting the same. After debugging use,

#undef NDEBUG

and this will disable all the assertions from the source code. Assertion

is a good debugging tool to make use of.

55) main()

{

int i=-1;

+i;

printf("i = %d, +i = %d \n",i,+i);

}

Answer:

i = -1, +i = -1

Explanation:

Unary + is the only dummy operator in C. Where-ever it comes you can just ignore it just because it has no effect in the expressions (hence the name dummy operator).

56) What are the files which are automatically opened when a C file is executed?

Answer:

stdin, stdout, stderr (standard input,standard output,standard error).

57) what will be the position of the file marker?

a: fseek(ptr,0,SEEK_SET);

b: fseek(ptr,0,SEEK_CUR);

Answer :

a: The SEEK_SET sets the file position marker to the starting of the file.

b: The SEEK_CUR sets the file position marker to the current position

of the file.

58) main()

{

char name[10],s[12];

scanf(" \"%[^\"]\"",s);

}

How scanf will execute?

Answer:

First it checks for the leading white space and discards it.Then it matches with a quotation mark and then it reads all character upto another quotation mark.

59) What is the problem with the following code segment?

while ((fgets(receiving array,50,file_ptr)) != EOF)

;

Answer & Explanation:

fgets returns a pointer. So the correct end of file check is checking for != NULL.

60) main()

{

main();

}

Answer:

Runtime error : Stack overflow.

Explanation:

main function calls itself again and again. Each time the function is called its return address is stored in the call stack. Since there is no condition to terminate the function call, the call stack overflows at runtime. So it terminates the program and results in an error.

61) main()

{

char *cptr,c;

void *vptr,v;

c=10; v=0;

cptr=&c; vptr=&v;

printf("%c%v",c,v);

}

Answer:

Compiler error (at line number 4): size of v is Unknown.

Explanation:

You can create a variable of type void * but not of type void, since void is an empty type. In the second line you are creating variable vptr of type void * and v of type void hence an error.

62) main()

{

char *str1="abcd";

char str2[]="abcd";

printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd"));

}

Answer:

2 5 5

Explanation:

In first sizeof, str1 is a character pointer so it gives you the size of the pointer variable. In second sizeof the name str2 indicates the name of the array whose size is 5 (including the '\0' termination character). The third sizeof is similar to the second one.

63) main()

{

char not;

not=!2;

printf("%d",not);

}

Answer:

0

Explanation:

! is a logical operator. In C the value 0 is considered to be the boolean value FALSE, and any non-zero value is considered to be the boolean value TRUE. Here 2 is a non-zero value so TRUE. !TRUE is FALSE (0) so it prints 0.

64) #define FALSE -1

#define TRUE 1

#define NULL 0

main() {

if(NULL)

puts("NULL");

else if(FALSE)

puts("TRUE");

else

puts("FALSE");

}

Answer:

TRUE

Explanation:

The input program to the compiler after processing by the preprocessor is,

main(){

if(0)

puts("NULL");

else if(-1)

puts("TRUE");

else

puts("FALSE");

}

Preprocessor doesn't replace the values given inside the double quotes. The check by if condition is boolean value false so it goes to else. In second if -1 is boolean value true hence "TRUE" is printed.

65) main()

{

int k=1;

printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");

}

Answer:

1==1 is TRUE

Explanation:

When two strings are placed together (or separated by white-space) they are concatenated (this is called as "stringization" operation). So the string is as if it is given as "%d==1 is %s". The conditional operator( ?: ) evaluates to "TRUE".

66) main()

{

int y;

scanf("%d",&y); // input given is 2000

if( (y%4==0 && y%100 != 0) || y%100 == 0 )

printf("%d is a leap year");

else

printf("%d is not a leap year");

}

Answer:

2000 is a leap year

Explanation:

An ordinary program to check if leap year or not.

67) #define max 5

#define int arr1[max]

main()

{

typedef char arr2[max];

arr1 list={0,1,2,3,4};

arr2 name="name";

printf("%d %s",list[0],name);

}

Answer:

Compiler error (in the line arr1 list = {0,1,2,3,4})

Explanation:

arr2 is declared of type array of size 5 of characters. So it can be used to declare the variable name of the type arr2. But it is not the case of arr1. Hence an error.

Rule of Thumb:

#defines are used for textual replacement whereas typedefs are used for declaring new types.

68) int i=10;

main()

{

extern int i;

{

int i=20;

{

const volatile unsigned i=30;

printf("%d",i);

}

printf("%d",i);

}

printf("%d",i);

}

Answer:

30,20,10

Explanation:

'{' introduces new block and thus new scope. In the innermost block i is declared as,

const volatile unsigned

which is a valid declaration. i is assumed of type int. So printf prints 30. In the next block, i has value 20 and so printf prints 20. In the outermost block, i is declared as extern, so no storage space is allocated for it. After compilation is over the linker resolves it to global variable i (since it is the only variable visible there). So it prints i's value as 10.

69) main()

{

int *j;

{

int i=10;

j=&i;

}

printf("%d",*j);

}

Answer:

10

Explanation:

The variable i is a block level variable and the visibility is inside that block only. But the lifetime of i is lifetime of the function so it lives upto the exit of main function. Since the i is still allocated space, *j prints the value stored in i since j points i.

70) main()

{

int i=-1;

-i;

printf("i = %d, -i = %d \n",i,-i);

}

Answer:

i = -1, -i = 1

Explanation:

-i is executed and this execution doesn't affect the value of i. In printf first you just print the value of i. After that the value of the expression -i = -(-1) is printed.

71) #include

main()

{

const int i=4;

float j;

j = ++i;

printf("%d %f", i,++j);

}

Answer:

Compiler error

Explanation:

i is a constant. you cannot change the value of constant

72) #include

main()

{

int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} };

int *p,*q;

p=&a[2][2][2];

*q=***a;

printf("%d..%d",*p,*q);

}

Answer:

garbagevalue..1

Explanation:

p=&a[2][2][2] you declare only two 2D arrays. but you are trying to access the third 2D(which you are not declared) it will print garbage values. *q=***a starting address of a is assigned integer pointer. now q is pointing to starting address of a.if you print *q meAnswer:it will print first element of 3D array.

73) #include

main()

{

register i=5;

char j[]= "hello";

printf("%s %d",j,i);

}

Answer:

hello 5

Explanation:

if you declare i as register compiler will treat it as ordinary integer and it will take integer value. i value may be stored either in register or in memory.

74) main()

{

int i=5,j=6,z;

printf("%d",i+++j);

}

Answer:

11

Explanation:

the expression i+++j is treated as (i++ + j)

76) struct aaa{

struct aaa *prev;

int i;

struct aaa *next;

};

main()

{

struct aaa abc,def,ghi,jkl;

int x=100;

abc.i=0;abc.prev=&jkl;

abc.next=&def;

def.i=1;def.prev=&abc;def.next=&ghi;

ghi.i=2;ghi.prev=&def;

ghi.next=&jkl;

jkl.i=3;jkl.prev=&ghi;jkl.next=&abc;

x=abc.next->next->prev->next->i;

printf("%d",x);

}

Answer:

2

Explanation:

above all statements form a double circular linked list;

abc.next->next->prev->next->i

this one points to "ghi" node the value of at particular node is 2.

77) struct point

{

int x;

int y;

};

struct point origin,*pp;

main()

{

pp=&origin;

printf("origin is(%d%d)\n",(*pp).x,(*pp).y);

printf("origin is (%d%d)\n",pp->x,pp->y);

}

Answer:

origin is(0,0)

origin is(0,0)

Explanation:

pp is a pointer to structure. we can access the elements of the structure either with arrow mark or with indirection operator.

Note:

Since structure point is globally declared x & y are initialized as zeroes

78) main()

{

int i=_l_abc(10);

printf("%d\n",--i);

}

int _l_abc(int i)

{

return(i++);

}

Answer:

9

Explanation:

return(i++) it will first return i and then increments. i.e. 10 will be returned.

79) main()

{

char *p;

int *q;

long *r;

p=q=r=0;

p++;

q++;

r++;

printf("%p...%p...%p",p,q,r);

}

Answer:

0001...0002...0004

Explanation:

++ operator when applied to pointers increments address according to their corresponding data-types.

80) main()

{

char c=' ',x,convert(z);

getc(c);

if((c>='a') && (c<='z'))

x=convert(c);

printf("%c",x);

}

convert(z)

{

return z-32;

}

Answer:

Compiler error

Explanation:

declaration of convert and format of getc() are wrong.

81) main(int argc, char **argv)

{

printf("enter the character");

getchar();

sum(argv[1],argv[2]);

}

sum(num1,num2)

int num1,num2;

{

return num1+num2;

}

Answer:

Compiler error.

Explanation:

argv[1] & argv[2] are strings. They are passed to the function sum without converting it to integer values.

82) # include

int one_d[]={1,2,3};

main()

{

int *ptr;

ptr=one_d;

ptr+=3;

printf("%d",*ptr);

}

Answer:

garbage value

Explanation:

ptr pointer is pointing to out of the array range of one_d.

83) # include

aaa() {

printf("hi");

}

bbb(){

printf("hello");

}

ccc(){

printf("bye");

}

main()

{

int (*ptr[3])();

ptr[0]=aaa;

ptr[1]=bbb;

ptr[2]=ccc;

ptr[2]();

}

Answer:

bye

Explanation:

ptr is array of pointers to functions of return type int.ptr[0] is assigned to address of the function aaa. Similarly ptr[1] and ptr[2] for bbb and ccc respectively. ptr[2]() is in effect of writing ccc(), since ptr[2] points to ccc.

85) #include

main()

{

FILE *ptr;

char i;

ptr=fopen("zzz.c","r");

while((i=fgetch(ptr))!=EOF)

printf("%c",i);

}

Answer:

contents of zzz.c followed by an infinite loop

Explanation:

The condition is checked against EOF, it should be checked against NULL.

86) main()

{

int i =0;j=0;

if(i && j++)

printf("%d..%d",i++,j);

printf("%d..%d,i,j);

}

Answer:

0..0

Explanation:

The value of i is 0. Since this information is enough to determine the truth value of the boolean expression. So the statement following the if statement is not executed. The values of i and j remain unchanged and get printed.

87) main()

{

int i;

i = abc();

printf("%d",i);

}

abc()

{

_AX = 1000;

}

Answer:

1000

Explanation:

Normally the return value from the function is through the information from the accumulator. Here _AH is the pseudo global variable denoting the accumulator. Hence, the value of the accumulator is set 1000 so the function returns value 1000.

88) int i;

main(){

int t;

for ( t=4;scanf("%d",&i)-t;printf("%d\n",i))

printf("%d--",t--);

}

// If the inputs are 0,1,2,3 find the o/p

Answer:

4--0

3--1

2--2

Explanation:

Let us assume some x= scanf("%d",&i)-t the values during execution

will be,

t i x

4 0 -4

3 1 -2

2 2 0

89) main(){

int a= 0;int b = 20;char x =1;char y =10;

if(a,b,x,y)

printf("hello");

}

Answer:

hello

Explanation:

The comma operator has associativity from left to right. Only the rightmost value is returned and the other values are evaluated and ignored. Thus the value of last variable y is returned to check in if. Since it is a non zero value if becomes true so, "hello" will be printed.

90) main(){

unsigned int i;

for(i=1;i>-2;i--)

printf("c aptitude");

}

Explanation:

i is an unsigned integer. It is compared with a signed value. Since the both types doesn't match, signed is promoted to unsigned value. The unsigned equivalent of -2 is a huge value so condition becomes false and control comes out of the loop.

91) In the following pgm add a stmt in the function fun such that the address of

'a' gets stored in 'j'.

main(){

int * j;

void fun(int **);

fun(&j);

}

void fun(int **k) {

int a =0;

/* add a stmt here*/

}

Answer:

*k = &a

Explanation:

The argument of the function is a pointer to a pointer.

92) What are the following notations of defining functions known as?

i. int abc(int a,float b)

{

/* some code */

}

ii. int abc(a,b)

int a; float b;

{

/* some code*/

}

Answer:

i. ANSI C notation

ii. Kernighan & Ritche notation

93) main()

{

char *p;

p="%d\n";

p++;

p++;

printf(p-2,300);

}

Answer:

300

Explanation:

The pointer points to % since it is incremented twice and again decremented by 2, it points to '%d\n' and 300 is printed.

94) main(){

char a[100];

a[0]='a';a[1]]='b';a[2]='c';a[4]='d';

abc(a);

}

abc(char a[]){

a++;

printf("%c",*a);

a++;

printf("%c",*a);

}

Explanation:

The base address is modified only in function and as a result a points to 'b' then after incrementing to 'c' so bc will be printed.

95) func(a,b)

int a,b;

{

return( a= (a==b) );

}

main()

{

int process(),func();

printf("The value of process is %d !\n ",process(func,3,6));

}

process(pf,val1,val2)

int (*pf) ();

int val1,val2;

{

return((*pf) (val1,val2));

}

Answer:

The value if process is 0 !

Explanation:

The function 'process' has 3 parameters - 1, a pointer to another function 2 and 3, integers. When this function is invoked from main, the following substitutions for formal parameters take place: func for pf, 3 for val1 and 6 for val2. This function returns the result of the operation performed by the function 'func'. The function func has two integer parameters. The formal parameters are substituted as 3 for a and 6 for b. since 3 is not equal to 6, a==b returns 0. therefore the function returns 0 which in turn is returned by the function 'process'.

96) void main()

{

static int i=5;

if(--i){

main();

printf("%d ",i);

}

}

Answer:

0 0 0 0

Explanation:

The variable "I" is declared as static, hence memory for I will be allocated for only once, as it encounters the statement. The function main() will be called recursively unless I becomes equal to 0, and since main() is recursively called, so the value of static I ie., 0 will be printed every time the control is returned.

97) void main()

{

int k=ret(sizeof(float));

printf("\n here value is %d",++k);

}

int ret(int ret)

{

ret += 2.5;

return(ret);

}

Answer:

Here value is 7

Explanation:

The int ret(int ret), ie., the function name and the argument name can be the same.

Firstly, the function ret() is called in which the sizeof(float) ie., 4 is passed, after the first expression the value in ret will be 6, as ret is integer hence the value stored in ret will have implicit type conversion from float to int. The ret is returned in main() it is printed after and preincrement.

98) void main()

{

char a[]="12345\0";

int i=strlen(a);

printf("here in 3 %d\n",++i);

}

Answer:

here in 3 6

Explanation:

The char array 'a' will hold the initialized string, whose length will be counted from 0 till the null character. Hence the 'I' will hold the value equal to 5, after the pre-increment in the printf statement, the 6 will be printed.

99) void main()

{

unsigned giveit=-1;

int gotit;

printf("%u ",++giveit);

printf("%u \n",gotit=--giveit);

}

Answer:

0 65535

Explanation:

100) void main()

{

int i;

char a[]="\0";

if(printf("%s\n",a))

printf("Ok here \n");

else

printf("Forget it\n");

}

Answer:

Ok here

Explanation:

Printf will return how many characters does it print. Hence printing a null character returns 1 which makes the if statement true, thus "Ok here" is printed.



Pages 1 2 3 4 Last>>