My Quote

Quote of the Day

aalayance

1.Analytical problem about name of ships, year they were built, cargo, destination, captain of the

ship.

(4 of each were given)

Some conditions were given: to find all -------15points-------15mins



2.A bartender tells a teacher "3 women visited Peter Paterson yesterday". Sum of their ages = your

age.

an you tell me how old is the oldest woman?

Teacher after considering 4 a while replied "no, I can't"

The bartender says "of course, you can't. But if I tell you that the oldest woman is older than Peter

Paterson,

then you should be able to tell it".

What is the age of Peter Paterson? ------10points--------10mins



3. In a town Chineville, the no. of vessels in each house is an even number. The maximum no. of

vessels in a house can be 274. Can you tell how many houses are there in Chineville?

---5points---5mins



soln:Tn=a+(n-1)d where a=2,d=2,Tn=274 n=137



4. Write a program/algorithm/pseudo-code to reverse a 2-D array of integers.

subject to the following conditions:

i).cannot use more than 1 loop in the entire program(for, while, d..while )..without using any loop

will fetch more points

ii).You are not supposed to merely print the nos in the reverse order, the change should be

reflected in the memory as well.

iii).Array is not of fixed size. So don't assume a fixed size. Program should work for all array sizes

for eg:



0 1 2 100 -1 9

3 4 5 -------------> 8 7 6

6 7 8 5 4 3

9 -1 100 2 1 0