Generic Ability (2)

22
Industry Readiness Index - Generic Abilities We wish you the very best! Do not turn this page. Wait until you are asked to do so. Read instructions on this page carefully. Do not turn this page until you are asked to do so. Assessment Test ID: 2678 Duration: 75 minutes Number of Questions: 65 Max Marks: 65 Instructions: 1. Do not write anything on this test paper. 2. Separate sheets will be provided for rough work. Please ask if you need more. 3. Fill all the details clearly in the answer sheet. 4. Mark answers in the answer sheet provided by filling the circle of the correct choice corresponding to the question number. 5. To change your answer, erase the earlier mark clearly and mark the new answer. It is better to use a pencil if you want to change your answers. 6. Some questions may have more than one correct answer. In that case, it is indicated as part of the question. You must mark all the correct answers. Partial answers will be considered wrong. 7. Wrong answers will carry negative marks. Therefore, do not guess answers. 8. Do not use any tools like calculators, cell phones during the test. Switch off your cell phone now. 9. After completing the test, you must return all the papers including this test paper, answer sheet and the rough sheets. REF: 2678 Page 1 of 22

Transcript of Generic Ability (2)

Page 1: Generic Ability (2)

Industry Readiness Index - Generic Abilities

We wish you the very best!

Do not turn this page. Wait until you are asked to do so.

Read instructions on this page carefully.Do not turn this page until you are asked to do so.

Assessment Test ID: 2678Duration: 75 minutesNumber of Questions: 65Max Marks: 65

Instructions:

1. Do not write anything on this test paper.

2. Separate sheets will be provided for rough work. Please ask if you need more.

3. Fill all the details clearly in the answer sheet.

4. Mark answers in the answer sheet provided by filling the circle of the correctchoice corresponding to the question number.

5. To change your answer, erase the earlier mark clearly and mark the newanswer. It is better to use a pencil if you want to change your answers.

6. Some questions may have more than one correct answer. In that case, it isindicated as part of the question. You must mark all the correct answers.Partial answers will be considered wrong.

7. Wrong answers will carry negative marks. Therefore, do not guess answers.

8. Do not use any tools like calculators, cell phones during the test. Switch offyour cell phone now.

9. After completing the test, you must return all the papers including this testpaper, answer sheet and the rough sheets.

REF: 2678 Page 1 of 22

Page 2: Generic Ability (2)

Answer the next 1 question based on the information given below:

Make an estimate and pick the closest answer in each of the following cases.Do not use calculator unless stated otherwise.

1. 89.82 / (10.713 x 0.02815) =

[HP]

A) 3000

B) 300

C) 30

D) 3

End of questions based on the information given above.

2. In Country X a returning tourist may import goods with a total value of $500 or less tax free, butmust pay an 8 percent tax on the portion of the total value in excess of $500. What tax must bepaid by a returning tourist who imports goods with a total value of $730?

[TCS]

A) $58.40

B) $40.00

C) $24.60

D) $18.40

3. The mean of marks secured by 25 students in section A of Class X is 47, that of 51 students ofsection B is 51 and that of 30 students of section C is 53. Find the mean of marks of the studentsof three sections of Class X.

A) 50

B) 50.6

C) 52.5

D) 54.5

4. The present ratio of ages of A and B is 4 : 5. 18 years ago, this ratio was 11 : 16. Find the sumtotal of their present ages.

A) 90

B) 108

C) 120

D) 135

5. 20 persons went to a hotel for a combined dinner party 13 of them spent Rs.80 each on theirdinner and the rest spent Rs.13 more than the average expenditure of all the 20. What was thetotal money spent by them?

A) 1540

B) 1640

C) 1740

D) None of these

REF: 2678 Page 2 of 22

Page 3: Generic Ability (2)

6. The marked price of an article is Rs.300. If the selling price is 50% more than the amount ofdiscount allowed, find the selling price.

A) Rs.180

B) Rs.150

C) Rs.200

D) Rs.175

7. In a hotel, rooms are numbered from 101 to 550. A room is chosen at random. What is theprobability that room number starts with 1, 2 or 3 and ends with 4, 5 or 6?

[Infosys]

A) 1/4

B) .188

C) 1/8

D) 1/5

8. How much water must be added to 40.5 litres of spirit worth Rs.15.68 for a litre, so as to reducethe price to Rs.12.96 per litre?

A) 7 2/3 litres

B) 8 1/3 litres

C) 8 1/2 litres

D) None of these

9. When two dice are rolled together, what is the probability of getting the same number on both ofthem?

[Cognizant]

A) 5/6

B) 1/5

C) 1/6

D) 1/36

10. In a 500 meters race, the ratio of speeds of two contestants A and B is 3:4. A has a start of 140meters, then

A) B wins by 20 meters

B) A wins by 20 meters

C) B wins by 40 meters

D) B wins by 25 meters

Answer the next 2 questions based on the information given below:

In the following questions mark:

1. If the question can be answered with the help of statement I alone.2. If the question can be answered with the help of statement II alone.3. If the question can be answered with the help of both I and II.4. If none of the above options is true.

REF: 2678 Page 3 of 22

Page 4: Generic Ability (2)

11. What is the total profit on sales of 7 dozen washers?I. Washers are bought at Rs.15 per dozen and sold at 4 for Rs.6II. The mark-up on washers is 20%

A) 1

B) 2

C) 3

D) 4

12. How many books are there on the shelf?I. If 4 more books are placed on the shelf, the total number of books on the shelf will be morethan 28.II. If 5 books are removed, the shelf will contain less than 21 books.

A) 1

B) 2

C) 3

D) 4

End of questions based on the information given above.

Answer the next 3 questions based on the information given below:

Following problems contain a question Statement and two statements giving certain data.You have todecide whether the data given in the statements are sufficient for answering the questions Thealternatives available are:

1) A alone is sufficient B is not or B alone is sufficient A is not2)If both (A) and (B) together are sufficient but none of them alone is sufficient3)If both statements alone are sufficient4)If both (A) and (B) together are not sufficient.

13. Who gets the minimum amount if Rs 385 is divided between A,B and C?(A) B gets 3/11th of what A and C receive together(B) A received 2/9th of what B and C receive together

[Capgemini]

A) 1

B) 2

C) 3

D) 4

14. What is student's overall average in four subjects?(A) The weightages of the subject are: Science 4, Hindi 5, Physics 3 & Bio. 1(B) He received 28 in science, 94 in Hindi, 71 in physics & 76 in Biology

[TCS]

A) 1

B) 2

C) 3

D) 4

REF: 2678 Page 4 of 22

Page 5: Generic Ability (2)

15. How far is it from A to B?(A) It is 15 km from A to C(B) It is 25 km from C to B

[Accenture]

A) 1

B) 2

C) 3

D) 4

End of questions based on the information given above.

Answer the next 2 questions based on the information given below:

i) P, Q, R, S, T and U are traveling in a bus.ii) There are two reporters, two technicians, one photographer and one writer in the group.iii) The photographer P is married to S who is a reporter.iv) The writer is married to Q who is of the same profession as that of U.v) P, R, Q, S are two married couples and nobody in the group has same profession.vi) U is brother of R.

16. Which of the following is a pair of husbands?

[Cognizant]

A) PQ

B) PR

C) QS

D) Cannot be determined.

17. Which of the following is a pair of technicians?

[Cognizant]

A) RS

B) SU

C) PT

D) QU

End of questions based on the information given above.

Answer the next 2 questions based on the information given below:

Read the given information and answer the questions based on it.There are 6 male players who play 6 different sports- Cricket, Football, hockey, Tennis, badmintonand athletics.They are married to 2 Engineers, Doctor, CA, Professor and Housewife, not necessarily inthe same order. The couples stay in 6 different cities- Ahmedabad, Bangalore, Kolkata, Delhi,Ernakulam and Indore. Following information is given:i)The football player is married to an engineer, but does not belong to eihter Kolkata or Delhi.ii)The doctor and the athlete do not stay in Indore and Ernakulam respectively.iii) The hockey player is not married to either Doctor or CA, but his wife is not a housewife either.iv)One of the engineers stays in Delhi.v)The hockey player,the tennis player and the cricketeer stay in Kolkata, Indore and Bangalorerespectively.vi)The lady who stays in Ernakulam is a housewife.

REF: 2678 Page 5 of 22

Page 6: Generic Ability (2)

18. Who is married to the hockey player?

[HP]

A) Engineer

B) CA

C) Doctor

D) Professor

19. In which city does the doctor stay?

[HP]

A) Kolkata

B) Indore

C) Delhi

D) Bangalore

End of questions based on the information given above.

Answer the next 2 questions based on the information given below:

Directions for Questions

(i) Six friends A,B,C,D,E and F are sitting along the sides of a hexagonal table for playing a game,though not necessarily in the same order.

(ii) F, who is sitting exactly opposite of A, is to the immediate right of B.

(iii) D is between A and B and is exactly opposite to C.

20. A is sitting between which of the following pairs of persons?

[Zensar]

A) D and E

B) B and E

C) E and C

D) None of these

21. Who is sitting opposite B?

[Zensar]

A) E

B) F

C) A

D) C

End of questions based on the information given above.

22. There are five bus stops A, B, C, D and E at equal intervals. C is not the middle stop. A and E arenot terminal stops. C comes twice as many stops before D in upward journey as B comes after A.D is the first stop in downward journey. Which of the following gives the correct sequence of thestops in downward journey?

[Sasken]

REF: 2678 Page 6 of 22

Page 7: Generic Ability (2)

A) DACEB

B) DAECB

C) DCBAE

D) DEACB

23. In a pile of 10 books, there are 3 of History, 3 of Hindi, 2 of Mathematics and 2 of English.Taking from the above, there is an English book between a History and Mathematics book, aHistory book between a Mathematics book and an English book. A Hindi book between Englishand a Mathematics book. A Mathematics book between two Hindi books and two Hindi booksbetween Mathematics and a History book. Book of which subject is at the sixth position from thetop?

A) English

B) History

C) Mathematics

D) Hindi

24. In a marathon, Sam was faster than Jack. Denise beat Jim but lost to Jack. Who is the winner?

A) Sam

B) Jack

C) Denise

D) Jim

25. Viswas travels 2km towards west, then he turns left and travels 3 km, again he turns left totravel 4 km. In which direction is Viswas positioned now with respect to the starting point?

A) Southeast

B) Southwest

C) South

D) North

Answer the next 1 question based on the information given below:

Consider the following rules for writing a sentence.Rule 1: The sentence can have no more than six words.Rule 2: If there are more than five words, only one word may be capitalized.Rule 3: The sentence may contain only one verb.Rule 4: The sentence may not contain any plurals.Rule 5: There must be at the least four words.

26. Which one of the following sentences complies with all of the above rules?

A) He spit and hit.

B) Fly only United or American airlines.

C) They ripped books and swore.

D) The dew glistens in the moonlight.

End of questions based on the information given above.

Answer the next 2 questions based on the information given below:

REF: 2678 Page 7 of 22

Page 8: Generic Ability (2)

A word arrangement machine, when given an input line of words, rearranges them following aparticular rule in each step. The following is the illustration of the input and the steps of arrangement:Input: man's mood varies with time and environmentStep I: varies with man's mood environment and timeStep II: and time environment mood man's varies withStep III: environment time and varies with mood man'sStep IV: and varies environment time man's mood withAnd so on for subsequent steps. You have to find out the logic and answer the questions given below.

27. If Step IV reads "everyone were aware about their intimate friendship", what will be the middlethree words of Step II?

A) their intimate aware

B) aware intimate their

C) everyone were friendship

D) None of these

28. If Step V reads "bees are sucking juice from colorful flowers", what would Step III read?

A) sucking are bees colorful flowers juice from

B) colorful juice from bees sucking flowers are

C) from juice colorful flowers are bees sucking

D) none of these

End of questions based on the information given above.

29. Even the droning sound of their engines brings to mind the great roar of a fire-breathing dragonwith smoke spewing from its exhaust-pipe nostrils.In the sentences above, count the number of times a consonant is preceded by a vowel(a,e,i,o,u).

A) 40 times

B) 34 times

C) 36 times

D) 38 times

30. There are 5 mathematical expressions given below:444314433 > 444313433444313433 = 444313433444311433 < 444313433444313433 < 444313133444314433 = 444313433How many of the above expressions are wrong?

A) 4

B) 1

C) 2

D) 3

Answer the next 5 questions based on the information given below:

REF: 2678 Page 8 of 22

Page 9: Generic Ability (2)

Directions: Each question given below is followed by two arguments numbered I and II. You have todecide whether the argument is a 'strong' argument or a 'weak' argument.

31. Statement: Should the institution of marriages be abolished?Arguments: I. Yes. It is already showing cracks.II. No. It is necessary for the survival of society.

A) Neither I nor II is strong

B) Only argument I is strong

C) Only argument II is strong

D) Both I and II are strong

32. Statement: Should agriculture in rural India be mechanized?Arguments: I. Yes. It would lead to higher production.II. No. It would lead to rural unemployment.

A) Both I and II are strong

B) Only argument I is strong

C) Only argument II is strong

D) Neither I nor II is strong

33. Statement: Should colleges be given the status of a university in India?Arguments: I. Yes. Colleges are in a better position to assess the students' performance andtherefore the degrees will be more valid.II. No. It is utopian to think that there will not be nepotism and corruption in degrees beingawarded by colleges.

A) Only argument I is strong

B) Only argument II is strong

C) Neither I nor II is strong

D) Both I and II are strong

34. Statement: Should India encourage exports when most things are insufficient for internal useitself?Arguments: I. Yes. We have to earn foreign exchange, to pay for our imports.II. No. Even selective encouragement would lead to shortages.

A) Both I and II are strong

B) Only argument I is strong

C) Only argument II is strong

D) Neither I nor II is strong

35. Statement: Should officers accepting bribe be punished?Arguments: I. No. Certain circumstances may have compelled them to take bribe.II. Yes. They should do the job they are entrusted with honestly.

A) Only argument I is strong

B) Only argument II is strong

C) Both I and II are strong

D) Neither I nor II is strong

REF: 2678 Page 9 of 22

Page 10: Generic Ability (2)

End of questions based on the information given above.

Answer the next 4 questions based on the information given below:

Choose the most appropriate option:

36. If you are advising somebody, you will say "you ----------------to a doctor."

A) should go

B) could go

C) would go

D) go

37. You do not know the way to the airport. If you want to ask somebody the way to the airportwhich of the following way would you ask?

A) Where is the airport? Please?

B) Could you please tell me how I go to the airport?

C) Could you please tell me how to get to the airport?

D) Could you please tell me where is the airport?

38. When I meet someone for the first time

A) I wait for the other person to make the introduction first.

B) I introduce myself with a smile and offer a handshake.

C) I hug the person.

D) I normally talk to a new person only after somebody introduces me to that person.

39. Your colleague is seriously injured in an accident.What would you say in this situation?

A) Hey, you are injured?

B) I heard you are injured.

C) So sorry about that

D) Why don't you be careful while driving?

End of questions based on the information given above.

Answer the next 1 question based on the information given below:

Spot the error if any in the following sentences.

40. I waited for my friend on the restaurant for two hours, from 10 AM to 12PM. But he neverarrived.

A) For

B) On

C) To

D) No error

End of questions based on the information given above.

Answer the next 1 question based on the information given below:

Identify the error if any in the following sentences.

41. Besides involving in many activities on campus, we also study hard because we want to get goodgrades.

REF: 2678 Page 10 of 22

Page 11: Generic Ability (2)

A) Involving

B) Study

C) Want

D) No error

End of questions based on the information given above.

Answer the next 1 question based on the information given below:

Identify the errors if any and choose the correct option from the following.

42. I didn't go to their wedding because nobody told me about it.

A) Tell

B) Will tell

C) Has told

D) No error

End of questions based on the information given above.

Answer the next 2 questions based on the information given below:

Indentify the part of the sentence that has an error:

43. I can't play tennis on Friday/A as I usually will visit my grandmother/B who lives 100 km away/C and looks forward to my visit./D

A) A

B) B

C) C

D) D

44. Ramesh just wants a general idea/A of the story so he wouldn't need to/ B read the whole story/C which consists of about 600 pages./D

A) A

B) B

C) C

D) D

End of questions based on the information given above.

45. We were happy that (A)/ the audience responded well (B)/ and gave all the speakers (C)/ apatiently listening (D)/.The sentence above is divided into parts, which are marked A, B, C and D. One of these partscontains an error or may not be acceptable in standard written communication. Mark that part asyour answer.

A) (A)

B) (B)

C) (C)

D) (D)

REF: 2678 Page 11 of 22

Page 12: Generic Ability (2)

46. Each of the hotel's(A)/200 rooms were(B)/equipped with high quality(C)/air-conditioning andTelevision. (D)/The sentence above is divided into parts, which are marked A, B, C and D. One of these partscontains an error or may not be acceptable in standard written communication. Mark that part asyour answer.

A) (A)

B) (B)

C) (C)

D) (D)

47. She received(A)/several gifts(B)/on the Christmas(C)/this year(D)The sentence above is divided into parts, which are marked A, B, C and D. One of these partscontains an error or may not be acceptable in standard written communication. Mark that part asyour answer.

A) (A)

B) (B)

C) (C)

D) (D)

48. Neither John nor Jim were able to tell me(A)/who had visited our place(B)/in the evening in myabsence(C)/.No error(D)The sentence above is divided into parts, which are marked A, B, C and D. One of these partscontains an error or may not be acceptable in standard written communication. Mark that part asyour answer.

A) (A)

B) (B)

C) (C)

D) (D)

Answer the next 5 questions based on the information given below:

REF: 2678 Page 12 of 22

Page 13: Generic Ability (2)

Astrologers habitually prone to goof-ups now have an excuse for why their predictions have beengoing haywire, the emergence of newer and newer planets that have caused their calculations to goawry. For the international team of astronomers who recently discovered eight new planets, thearrivals are, however, a cause for excitement. Indeed, even as the rest of the world continues to beconsumed by a morbid passion for shiny new war machines, deadly chemicals and sinister war tactics,astronomers have been doggedly searching the heavens for more heavenly bodies in the belief thatthe search will take us closer to a more exalted goal - that of knowing the truth about us and theuniverse. "Reality is much bigger than it seems... the part we call the universe is the merest tip of theiceberg" one scientist remarked. How true.

In the beginning, skeptics wouldn't accept that the earth actually moves, let alone that it revolvesaround the sun because of an unshaken belief that the earth was the centre of the universe. We'vecome a long way. Today, scientists have spotted nearly 80 extra-solar planets using sophisticatedinstruments. What's more, our universe may not be the only universe in the cosmos; there could wellbe several parallel universes teeming with many galaxies, solar systems and planets, although none ofthis may be perceptible to the naked eye. Perhaps sages who say that truth is not easily perceptible,mean just this - what is evidently before us is not the whole truth.

Scientists say that "everything in the tangible universe has its shadowy counterpart in other, paralleluniverses". In fact, it is by observing the play of cosmic light and shadow through powerful devicesthat scientists have been able to 'feel' shapes or 'see' shadows that indicate the existence of otherheavenly bodies without actually seeing them. The international team of scientists involved in thepresent discovery conducted their search through telescopes in Australia, Belgium, UK and the US.Two of the newly discovered eight planets are believed to have circular orbits very like the Earth's,while the others have well-defined elliptical orbits much like Pluto's. This is significant because aplanet with a circular orbit would more likely be hospitable to life forms than would one with anelliptical orbit. In the latter, the planet experiences extreme temperatures depending on whether it isproximate to or distant from the energy-giving star it's circumambulating. As in the case of otherrecent discoveries-such as finding traces of microbes in a meteorite - this too strengthens the beliefthat we're not alone in the universe. So would we be exchanging inter galactic emails soon? Perhapsnot as yet, given that our closest neighboring galaxy is millions of light years away. What is within ourimmediate grasp, though, is exploring the viability of establishing human settlements in space-anendeavor that has assumed urgency what with biological terrorism and the like threateninghumankind on earth. As Stephen Hawking recently said," I don't think the human race will survive thenext thousand years unless we spread into space. There are too many accidents that can befall life ona single planet".

49. According to the passage it can be inferred that

A) Inference P: Finding traces of microbes in a meteorite proves the existence of life on otherplanets.

B) Inference Q: Finding traces of microbes in a meteorite converted the belief into truth that weare not alone in the universe.

C) Inference R: Finding traces of microbes in a meteorite would make it possible to exchangegalactic e-mails in future.

D) Both inferences P & R.

50. According to the passage, we can infer that

REF: 2678 Page 13 of 22

Page 14: Generic Ability (2)

A) Parallel universes are half truth and half truth is not perceptible.

B) Parallel universes are not easily perceptible be cause they are not the whole truth.

C) Parallel universes are not easily perceptible and what we perceive is not the whole truth.

D) Truth is always easily perceptible.

51. According to the author's belief, it can be inferred that all of the following are not true, except

A) It is unlikely that the human race can survive the next thousand years.

B) It seems quite likely that the human race can survive the next thousand years.

C) Accidents will wipe out the human race from this planet by accidents within the next onethousand years.

D) The age of human race is one thousand years.

52. After the discovery of new plants, according to the passage, scientists are

A) Euphoric.

B) Jubilant.

C) Enthusiastic.

D) Elated.

53. The author is against war and spending on war. Say true or false.

A) True

B) False

End of questions based on the information given above.

Answer the next 12 questions based on the information given below:

REF: 2678 Page 14 of 22

Page 15: Generic Ability (2)

Program:

Computers accept data, process them and produce output. To achieve this, they need instructions totell them what to do. A program contains a set of instructions that a computer can use to perform atask.

Constants and Variables:

Computers use data to perform tasks called data processing. Data processing is made possible whendata is stored in a computer's memory. Data may be changed or remain the same during dataprocessing.

The term constant describes data that is set before the program is used and will remain the samewhile the program is running.

The term variable describes data that may change while the program is running.

Example: Age of a person is a variable as it changes every year but date of birth of a person is aconstant as it will always remain the same.

Data types:

These are the four main simple, or primitive, data types. There are other data types that representmore complex data. Data types limit which kind of data a variable can hold and determine which kindsof operations can be performed on it.

Char: The char data type represents single characters, such as 'm'. A variable made up of a number ofcharacters is called a string. For ex: "Hello World".

Integer: Integers are positive and negative whole numbers. For example, -2 and 117954.

Real: Real data are numbers with a fractional part. For example, 8.65 and -0.03.

Boolean: Boolean values are logical values and can be either true or false.

Operators:

An operator is a symbol that represents a specific action that must be performed on data.

Examples: +, -, *, /, =, <, >, %

Expressions and Statements:

An expression consists of operators and operands.

For example, assignment operators are used in statements to instruct programs to assign values tovariables. When assigning a value to a variable, the variable is always placed on the left-hand side ofthe assignment operator. In the following statement, sales1 and sales2 variables are operands, + isan operator, and = is an assignment operator. Values of sales1 and sales2 variables are summed andthe sum value is stored in the variable total.

REF: 2678 Page 15 of 22

Page 16: Generic Ability (2)

total = sales1 + sales2;

More Examples of expressions:-> x % y returns the remainder value when x is divided by y.-> x / y returns the quotient value when x is divided by y.-> x == y compares the values of x and y and returns true if they are equal otherwise it returns false.

Operator Precedence:

Operators are evaluated in a specific order according to operator precedence.

For example, in the statement

y = 7 + 3 * 2

the multiplication operator (*) is executed before the addition operator, according to operatorprecedence. So, after executing the statement, variable y will have a value of 13.

The three Control Structures:

1. Sequence:A computer program executing in sequence performs each instruction once only. The instructions areexecuted in the sequence in which they appear, and the program does not skip or repeat any of theinstructions.

2. Selection:Selection implies that a choice will be made, which depends on the value of a condition specified bythe programmer. One form of selection is IF - THEN - ELSE.

Example:IF age < 18 THEN OUTPUT "You cannot vote yet"ELSE OUTPUT "You can vote"ENDIF

In the example, the first output statement will execute when the value of age is less than 18. Thesecond output statement will execute when the value of age is 18 or more.

3. Repetition:Repetition repeats a section of code while a certain condition holds true. There are three types ofloops used for repetition. They are: WHILE DO Loop DO WHILE Loop FOR Loop

WHILE DO Loop:A WHILE DO loop is used to execute the statement block to be repeated as long as the condition istrue. The statement block ends with ENDWHILE. The following code is an example of repetition thatprints a message "Hello World" 5 times.

REF: 2678 Page 16 of 22

Page 17: Generic Ability (2)

count = 0WHILE count < 6 DO PRINT "Hello World" ADD 1 TO countENDWHILE

DO WHILE Loop:In this type of loop, the set of statements inside the block are executed and at the end of eachiteration, the condition is checked. The block is executed as long as the condition is true. The block isexecuted once, irrespective of the condition is true or not. The above example can be implementedusing DO WHILE loop as follows:

count = 0DO PRINT "Hello World" ADD 1 to countWHILE (count < 6)

FOR Loop:This loop ensures that the set of statements inside the block is executed for certain number of times.We need to specify the starting value, terminating value and the incrementing value. This controlstructure is advisable if we know the number of times the statements should be executed. Forexample, to print Hello World 5 times, we write the loop as follows:

FOR count = 1 to 5 PRINT "Hello World"END FOR

Arrays:

An array is a series of elements of the same type placed in contiguous memory locations that can beindividually referenced by adding an index to the same name. For example, we can store 5 values oftype int in an array without having to declare 5 different variables. The following statement is used toinitialize elements of an array:

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

Or a set of statements as shown below can be used:

int a[5]; a[0] = 2; a[1] = 4; a[2] = 6; a[3] = 8; a[4] = 10;

Flowcharts:

A flowchart is a means of visually presenting the flow of data through an information processingsystem, the operations performed within the system and the sequence in which they are performed. Aflowchart is a diagrammatic representation that illustrates the sequence of operations to be performed

REF: 2678 Page 17 of 22

Page 18: Generic Ability (2)

to get the solution of a problem.

The following symbols are most commonly used in a flowchart:Oval: to represent the start and the end of a taskRectangle: to represent a process or a sequence of statements (an operation on data)Diamond: to represent a decision or a conditionRhombus: to represent an input or an output data

54. What will be the output of the below code:

Integer count1 = 0, count2 = 0, i;Integer a[7] = {3, 7, -7, 0, 9, 0, -5}FOR i = 0 to 6 IF(a[i] < 0) count1 = count1 + 1 ELSE count2 = count2 + 1 ENDIFENDFORPRINT count1, count2

A) 4 3

B) 3 4

C) 2 5

D) 5 2

55. What will be the output of the below code if the value of number is 99?("%" is the modulus operator that gives the remainder when numerator is divided by thedenominator."/" is the division operator that gives the quotient")

INTEGER indexcount, numberREAD numberFOR indexcount = 2 to number / 2 IF (number % indexcount == 0) then PRINT "No" EXIT from program ENDIFEND FORPRINT "Yes"

A) Yes

B) No

C) No Yes

D) Yes No

REF: 2678 Page 18 of 22

Page 19: Generic Ability (2)

56. What will be the output of the below code if the value of a is 456(x % y returns the remainder when x is divided by y.x / y returns the quotient when x is divided by y.x != y returns true if values of x and y are not equal otherwise it returns false.)

INTEGER r = 0, p, aREAD aWHILE (a != 0) DO p = a % 10 r = r * 10 + p a = a / 10ENDWHILEPRINT r

A) 654

B) 456

C) 15

D) 546

57. What will be the output of the below code if the value of x is 4 and the value of y is 3?

Integer i = 1Integer p = 1WHILE (i <= y) DO p = p * x i = i + 1ENDWHILEPRINT p

A) 256

B) 27

C) 81

D) 64

58. Consider the following code:

IF age < 18 THEN PRINT "Invalid "ELSE PRINT "Valid "END IFPRINT "Thanks for entering the age"

If value of age is 18, what will be printed?

A) Invalid Thanks for entering the age

B) Valid

C) Invalid

D) Valid Thanks for entering the age

REF: 2678 Page 19 of 22

Page 20: Generic Ability (2)

59. What will be the output of the below code if the initial value of num is 256.x % y returns the remainder value when x is divided by y.

Integer num, sum, digitsum = 0While (num > 0) Do digit = num % 10 num = num / 10 sum = sum + digitEndWhile

A) 256

B) 652

C) 13

D) 0

60. The following pseudocode has been written to find the average of 5 numbers accepted from theuser:

Integer nNum, nTotal = 0, nAverage, nCounter = 1WHILE nCounter <= 5 DO accept nNum nTotal = nTotal + nNum nCounter = nCounter + 1ENDWHILE

nAverage = nTotal / 5PRINT nAverage

What would be the output if the five numbers entered were: 20, 8, 8, 12, 12 and the statementnCounter = nCounter + 1 was altered to nCounter = nNum + 1 ?

A) 12

B) 4

C) 15

D) 20

61. FieldA = "Buckingham Palace"Print SubString(FieldA, 3, 4)

Output: king

Print SubString(FieldA, 12, 4)

Given the sample statement in which the string "king" is printed, which one of the following doesthe second statement print?

REF: 2678 Page 20 of 22

Page 21: Generic Ability (2)

A) queen

B) alac

C) Pala

D) lace

62. What does the following code do?

INTEGER X, YX = 0Y = 0READ X, YX = X + YY = X - YX = X - YPRINT X, Y

A) Swaps the values of X and Y

B) Finds the difference between X and Y

C) Finds the sum of the numbers X and Y

D) None of these

63. What will be the output of the below code if the List is an array with elements {5, 1, 8, 4, 19, 6}and the value of num is 10. ('AND' is an operator used to combine two conditions. It returnstrue if and only if both the conditions are true.x != y returns true if values of x and y are not equal otherwise it returns false)

Integer loc = 0;WHILE((List[loc] != num) AND (loc < 6)) DO loc = loc + 1END WHILEIF (loc == 6) loc = -1PRINT locEnd

A) 0

B) 5

C) 6

D) -1

64. How many times will the following loop get executed?

INTEGER i = 10DO i = i + 10WHILE (i < 15)

REF: 2678 Page 21 of 22

Page 22: Generic Ability (2)

A) 5 times

B) 1 time

C) 15 times

D) 0 times

65. The following code has been written to display a series of numbers:

BEGIN INTEGER nNum1, nNum2, nNum3, nCounter nCounter = 2 nNum1 = 1 nNum2 = 1 DISPLAY nNum1 DISPLAY nNum2 WHILE nCounter < 10 DO nNum3 = nNum1 + nNum2 DISPLAY nNum3 nNum1 = nNum2 nNum2 = nNum3 nCounter = nCounter + 1 ENDWHILEEND

What will be the output of the above code?

A) 1 1 2 3 4 6 9 13 19 28

B) 1 1 2 3 5 8 13 21 34 55

C) 1 1 3 5 7 9 11 13 15 17

D) None of the these

End of questions based on the information given above.

REF: 2678 Page 22 of 22