5:31 PM

CTS APTITUDE QUESTION PAPER - 4

Posted by yusuf

SECTION I - 8 questions.

Series.

1. Interchange of letters in a word and the adjacent letters are also to
be changed. given letters series like [also few conditions]
AAABBB=
ABABAB=
LET QUESTION IS ABBAAB
If we apply 25 on this it means we have to interchange the letters
at positions 2 and 5, and we have to change the adjacent letters 2 and 5
from A to B and B to A.
That is q's A B B A A B
after Step 1 i.e interchange 2 and 5.

now change adjacent elements of 2 and 5...finally answer becomes
Ans: B A A B B A

//Hint: As per question papers 5 questions above like but numbers
change.

REMAINING 3 QUESTIONS:
6. To get AAABBB from BBBAAA what to apply:-
a) 25 b) 34 c)25 & 34 d) none


SECTION II
1. Given the function f(n a b c ) = ac if n=1
f(n a b c) = f( n-1 a c b) + f( 1 a b c) + f( n-1 b a c )
if n > 1
f( 2) = ?
Ans: f( 2 a c b ) = ab + ac + bc.

f(2 a b c)=f(1 a c b)+f(1 a b c)+f(1 b a c)
ab+ac+bc.
2. similar question in functions.
3. [ based on function in 1.] f( 4 a b c ) the number of terms is...?
Ans: f( 4 a b c ) = f( 3 a c b ) + f( 1 a b c ) + f( 3 b a c ) etc.
= 5ab + 5ac + 5bc.
4. f( 5 a b c ) = ?

SECTION III
Permutations and Combinations.
8 questions.

1. r = number of flags;
n = number of poles;
Any number of flags can be accommodated on any single pole.

i) r=5,n=5 The no. of ways the flags can be arranged ?
ii) to iv) are based on this. 5^5=3125.

6. r= 5 n = 3 . If first pole has 2 flags ,third pole has 1 flag
how many ways the remaining can be arranged? 3^2=9.
5p2.3p1.2.(arrangement).
5c2.3c1.1.(selection).

7.& 8. same as above.

SECTION IV
Question consising of figures consist of 4 small squares and every square
having an arrow pointing in one Direction.

GRE test of reasoning.
hint: What is the next sequence if we tilt the figure by 90 degrees like
that( clockwise and mirror images ? ).

SECTION V
In this section first part of compound word is given. Select meaning of
the second part from the choice given:
1. Swan
2. Swans
3. Fool
4. Fools
5. Stare
6. Lady
For all above 4 choices are given.....
Eg. Swan
a) category b) music c) --- d) none
Ans: Swansong is compound word. But song is not given as option. so
b) music is answer.

5:25 PM

CTS APTITUDE QUESTION PAPER - 3

Posted by yusuf

1. If all the 6 are replaced by 9, then the algebraic sum of all the numbers from 1 to 100(both inclusive) varies by Ans: 330

2. The total no. of numbers that are divisible by 2 or 3 between 100 and 200(both inclusive) are Ans:(68)

3. From a pack of cards Jack, Queen, King & ace are removed. Then the algebraic sum of rest of the cards is Ans:216

4. The average temperature of days from Monday to Wednesday is 37 degree Celsius and that of from Tuesday to Thursday is 34 degrees. The temperature of Thursday is 4/5th of Monday. Then the temperature of Thursday is
Ans: 36 degrees
5. Swetha, Tina, Uma and Vidya are playing a gambling. In this different people lose in different games-in the reverse alphabetical order. The rule is that if one loses she should double the amount of others. At the end of 4th game each of them have same amount of money (Rs.32). Which one of them started with the least amount? (6) Which one of them started with the largest amount money? (7.) At the end of the 2nd game what is the amount of money with uma?

Ans: Vidya, Swetha, Rs.8
8. A cube of 12 mm is painted on all its side. If it is made up of small cubes of size 3mm. If the big cube is splitted into those small cubes, the number of cubes that remain unpainted is Ans: 8

9. B is 50% faster than A. If A starts at 9 A.M. and B starts at 10 A.M. A travels at a speed of 50 km/hr. If A and B are 300 kms apart, The time when they meet when they travel in opposite direction is Ans: 12 noon

10. A graph will be there. Inside the graph sheet there will be a Quadrilateral. We have to count the number of squares in the Quadrilateral.

11. You are having 31kg of rice. You are provided with a 1kg stone for weighing. In how many weights the 31kg of rice can be weighed. Ans: 5

12. A starts at 11:00AM and travels at a speed of 4km/hr. B starts at 1:00PM and travels at 1km/hr for the first 1hr and 2km/hr for the next hr and so on. At what time they will meet each other. Ans.(9.48pm)

13. There are 80 coins, among them one coin weighs less compared to other. You are given a physical balance to weigh. In how many weighing the odd coin can be found. Ans.(4)
14. Diameter of the circle 4cm. The shaded part is 1/3 of the square area. What is the side of the square? Ans: root of(3pi)

15. A, B, C, can do a work in 8, 14, 16 days respectively. A does the work for 2 days. B continues from it and finishes till 25% of the remaining work. C finishes the remaining work. How many days would have taken to complete the work Ans(135/8)

5:20 PM

CTS APTITUDE QUESTION PAPER - 2

Posted by yusuf

1. If all the 6 are replaced by 9, then the algebraic sum of all the numbers from 1 to 100(both inclusive) varies by Ans: 330

2. The total no. of numbers that are divisible by 2 or 3 between 100 and 200(both inclusive) are Ans:(68)

3. From a pack of cards Jack, Queen, King & ace are removed. Then the algebraic sum of rest of the cards is Ans:216

4. The average temperature of days from Monday to Wednesday is 37 degree Celsius and that of from Tuesday to Thursday is 34 degrees. The temperature of Thursday is 4/5th of Monday. Then the temperature of Thursday is
Ans: 36 degrees
5. Swetha, Tina, Uma and Vidya are playing a gambling. In this different people lose in different games-in the reverse alphabetical order. The rule is that if one loses she should double the amount of others. At the end of 4th game each of them have same amount of money (Rs.32). Which one of them started with the least amount? (6) Which one of them started with the largest amount money? (7.) At the end of the 2nd game what is the amount of money with uma?

Ans: Vidya, Swetha, Rs.8
8. A cube of 12 mm is painted on all its side. If it is made up of small cubes of size 3mm. If the big cube is splitted into those small cubes, the number of cubes that remain unpainted is Ans: 8

9. B is 50% faster than A. If A starts at 9 A.M. and B starts at 10 A.M. A travels at a speed of 50 km/hr. If A and B are 300 kms apart, The time when they meet when they travel in opposite direction is Ans: 12 noon

10. A graph will be there. Inside the graph sheet there will be a Quadrilateral. We have to count the number of squares in the Quadrilateral.

11. You are having 31kg of rice. You are provided with a 1kg stone for weighing. In how many weights the 31kg of rice can be weighed. Ans: 5

12. A starts at 11:00AM and travels at a speed of 4km/hr. B starts at 1:00PM and travels at 1km/hr for the first 1hr and 2km/hr for the next hr and so on. At what time they will meet each other.
Ans.(9.48pm)

13. There are 80 coins, among them one coin weighs less compared to other. You are given a physical balance to weigh. In how many weighing the odd coin can be found. Ans.(4)
14. Diameter of the circle 4cm. The shaded part is 1/3 of the square area. What is the side of the square?
Ans: root of(3pi)

15. A, B, C, can do a work in 8, 14, 16 days respectively. A does the work for 2 days. B continues from it and finishes till 25% of the remaining work. C finishes the remaining work. How many days would have taken to complete the work Ans(135/8)

5:04 PM

CTS APTITUDE QUESTION PAPER - 1

Posted by yusuf

1. Using the digits 1,5,2,8 four digit numbers are formed and the sum of all possible such numbers.
Ans: 106656

2. Four persons can cross a bridge in 3,7,13,17 minutes. Only two can cross at a time. Find the minimum time taken by the four to cross the bridge.
Ans: 20

3. Find the product of the prime numbers between 1-20.
Ans: 9699690

4. 2,3,6,7
using these numbers form the possible four digit numbers that are divisible by 4.
Ans: 8

5. Two trains are traveling at 18kmph and are 60 km apart. There is fly in the train. it flies at 80 kmph. It flies and hits the second train and then it starts to oscillate between the two trains. At one instance when the two trains collide it dies. Distance traveled by the fly when both trains collide is?
Ans: 12km

6. There are 1000 doors that are of the open-close type. When a person opens the door he closes it and then opens the other. When the first person goes he opens-closes the doors in the multiples of 1 i.e., he opens and closes all the doors. when the second goes he opens and closes the doors 2, 4 6 8 respectively. Similarly when the third one goes he does this for 3 6 9 12 15th doors respectively. Find number of doors that are open at last.
Ans:Square Numbers.

7.There are 9 balls of this one is defective. Find the minimum no. of chances of finding the defective one.
Ans:3times.

8. There are coins of Rs.5, 2,1,50p,25p,10p,5p. Each one has got a weight. Rs 5 coin weighs 20gms. Find the minimum number of coins to get a total of 196.5gms.

9.A can do a work in 8 days, B can do a work in 7 days, C can do a work in 6 days. A works on the first day, B works on the second day and C on the third day respectively that is they work on alternate days. When will they finish the work.(which day will they finish the work)
Ans: 7 7/168 days

10.A batsman scores 23 runs and increases his average from 15 to 16. find the runs to be made if he wants top inc the avg to 18 in the same match.
Ans: 39 Runs.

11.A man sells apples. First he gives half of the total apples what he has and a half apple. Then he gives half of the remaining and a half apple. He gives it in the same manner. After 7 times all are over. How many apples did he initially have.
Ans: 127 apples.

12.In a club there are male and female members. If 15 female quit then the number of females will become double the number of males. If 45 males quit no. of female becomes five times the number of males. Find the number of females.
Ans: Females:175, Males:80

13.When I was married 10 years back my wife was the sixth member of my family. Now I have a baby. Today my father was dead and I had a new baby.now the average age of my family is the same as that when I was married. Find the age of my father when I was married.
Ans: 50.

14.I and two of my friends were palying a game. For each win I get Rs 3. totally I had three wins. Player 2 got Rs9 and player 3 got Rs 12. How many games had been played?

15.A person gives a secret to two other persons in 5 minutes. How long will he take to tell the secret to 768 people?

16.There are 40 seats in a bus. People agree to share the money for the number of seats. The total money comes to 70.37. How many seats were free?
Ans: 9 seats.Rs.2.27

17.I had Rs100 and I play. If I win I will hav Rs110 and if I lose I will hav Rs90. at the end I hav 2 wins and 2 loses. How much do I have?
18. In a village, there is flood. In one village causalities were less than the other. Why?
Ans: There were better health care centres(HCC).

19. A person has Rs.100. If he wins he gains 10%. If he loses the game, he loses 10%. He wins twice and loses twice. How much he has at the end?
Ans: Always less than 100.

20. In A tribal group two groups live in different climatic conditions. Ear Sensitivity is tested and found that one has more when compared to other. What is the reason?
Ans: Depends on the physical place and condition he is living.

8:57 AM

Tata Infotech Sample Test Paper - 2

Posted by yusuf

SERIES SECTION


Directions: In the following questions complete the series

NOTE: This section is quite tough and consists of 26 questions to be done in 10 minutes. Please keep track of time.


1. A C B D E F G I - I H K J L
Ans. H


2. A I Z B E Y C I X D I - G E N J W
Ans. W


3. A D G J M P - R W T S
Ans. S


4. A B C E F G I J K - M L O N P
Ans. M

5. A B F G K L P Q - T S V U W
Ans. U


6. J W X U V S T - Q P S E T
Ans. Q


7. A R H X Y T D T W S T - N P T K R
Ans. P


8. F M B I P Z V I E V - I R Y O U


9. N Z I Y C X KW F - J F V M Y
Ans. V


10. A A S A S P A S P K A - R Q T S U
Ans. S


11. A E C P S - T R U E
Ans. U


12. B B P R D D L N F F I K - H Q J I K
Ans. H


13 A Z E X I V M T - R Q N S O
Ans. Q


14. A B D G K P - L I W U X
Ans. U


15. B C D A E G H I F J L M N L K N M O
Ans. K


16. X W E F G V U H I J K - P N S R T
Ans. T


17. O D J T O P Q N O E R T - Q O U V W
Ans. O


18. P R N U U P E J R B B - H V U N E
Ans. E


19.L U L M G M N F N P S - O N Q P S
Ans. P

8:36 AM

Tata Infotech Sample Test Paper -1

Posted by yusuf

VERBAL SECTION
Directions: Give the synonyms for the following words
1. Depreciation: deflation, depression, devaluation, fall, slump

2. Depricate : feel and express disapproval,

3. Incentive : thing one encourages one to do (stimulus)

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 traditional, superstitious

10. Fallible : liable to error

11. Volatile : ever changing

12. Manifest: clear and obvious

13. Connotation : suggest or implied meaning of expression

14. Reciprocal: reverse or opposite

15. Agrarian : related to agriculture

16. Vacillate : undecided or dilemma

17. Expedient : fitting proper, desirable

18. Simulate : produce artificially resembling an existing one.

19. Access : to approah

20. Compensation: salary

21. Truncate : shorten by cutting

22. Adherence : stick

23. Heterogenous: non similar things

24. Surplus : excessive

25. Assess : determine the amount or value

26. Congnizance : knowledge

27. Retrospective : review

28. Naive : innocent,rustic

29. Equivocate : tallying on both sides, lie, mislead

30. Postulate : frame a theory

31. Latent : dormant, secret

32. Fluctuation : wavering,

33. Eliminate : to reduce

34. Affinity : strong liking

35. Expedite : hasten

36. Console : to show sympathy

37. Adversary : opposition

38. Affable : lovable or approachable

39. Decomposition : rotten

40. Agregious : apart from the crowd, especially bad

41. Conglomaration: group, collection

42. Aberration: deviation

43. Aurgury : prediction

44. Crediability : ability to common belief, quality of being credible

45. Coincident: incidentally

46. Constituent : accompanying

47. Differential : having or showing or making use of

48. Litigation : engaging in a law suit

49. Maratorium: legally or offficiallly determined period of dealy before
fulfillment of the agreement of paying of debts.

50. Negotiate : discuss or bargain

51. Preparation : act of preparing

52. Preponderant : superiority of power or quality

53. Relevance : quality of being relevant

54. Apparatus : appliances

55. Ignorance : blindness, in experience

56. Obsession: complex enthusiasm

57. precipitate : speed,active

8:15 PM

WIPRO - APTITUDE QUESTIONS PART 1

Posted by yusuf

1. Arrange letters into a meaningful word and choose the correct series
OCPIT
1 2 3 4 5
a)54123 b)51342 c)31254 d)42315
LADNHE
1 2 3 4 5 6
a) 524316 b) 345621 c) 431562 d) 256314
OT INCE
1 2 3 4 5 6
a) 524316 b) 365412 c) 412356 d) 234561
EATNRU
1 2 3 4 56
a) 542631 b) 362415 c) 423651 d) 234516
LORFSHUI
1 2 3 4 5 67 8
a) 54726318 b) 37628415 c) 41273856 d) 28345176



2. Fill the gap in the series 5,20,____ ,6.2,8,12 and the options are 10,14,24,12

3. There are some players in a volley ball team. After end of the game 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 42 liters of water is drank by all. The find the no of boys and girls in the volley ball team.


4. 120m long train crosses the pole after 2 ½ sec. Find how much time it takes to cross the 140m long platform

5. Average age of girls and boys is 26 average age of boys is 28 and average age of girls is 24 .what is the ratio of no of girls and boys.

6. A person is running at a speed of 18km/hr After one min a bomb blasts .Sound travels at 330m/s.How long does the man run before he cud he hear the sound??

7. A,B,C,D comes 2 a aggrement with E to start a bussiness. for that A,B,C,D donates 15/- each & E has to donate 5/- morethan the
average of first 4. what is the total sum, E's share?

8. How many weeks r there btw 3rd JULY &13th SEP

9. For the present cost of mangoes we are getting 300,if a discount of 20% is given How many mangoes can we get ?

10. There are totally 8 girls, A boy is standing behind first girl, 2 boys are standing behind 2nd girl., 3 boys are standing behind 3rd girl and so on, in a row. Who is 3rd left to 26th from the right?

10:05 PM

SATHYAM APTITUDE QUESTION PAPER - PART 1

Posted by yusuf

1)A and B can do a piece of work in 20 days. B and C can do it in 12 days. C and A can do it in 10 days. In how much time will A alone would take to do the work?


2)Sum in S.I. becomes 5 times its principal in 8 years what is the rate?


3) ?
145 161
63 71 79
25 29 33 37
8 10 12 14 16
1 2 3 4 5 6


4)What is the right output?
A1 int R=1
A2 K=3
A3 R=R*K*R
A4 PRINT"R"
A5 if(R,=3)
A6 GOTO a3
A7 printf(R8K8K)
A8 Halt

5)Find the ODD man out
975
867
329
498
none of these

6)A Can do a piece of work in 18 days . B can do that work in 30 days. Then in how many days they will do twice of that work together?

7)If 4 NOV 1971 falls on FRIDAY then what is 4 NOV 1869?

8) ?
92 92
42 38 42
18 14 14 18
6 4 2 4 6

9)I5 men work for 8 hours a day and it take 9 days for them to complete a work, then how many men had to work for completing the same work ,who work for 7 hours a day and for 12 days?
10)
147
75 66
37 ? 28
15 16 10 12
11)12 man can complete a work in 12 days. For a work 10 men work for 6 days and then 4 more men join them. In how many days will they complete the work?

12)A man is having some money deposited in bank. In the 1st yr he gets 8% interest, 2nd yr -11 %, 3rd year- 13%. If he gets Rs 12,400 at the end of three yrs. How much had he deposited?

13)A man took Rs 1000 as loan on simple intrest of 5%. But he pays Rs 200 annually as interest and amount. How much he will have to return after three years?

14)7,14,21,9,18,?,11,22,33

15)There is a field inside that there is a rectangular grass field with dimension 12X8 meter. One cow is tied at one corner of the grass field with a rope of 10 m. Cow is not allowed to enter the grass field .How much area it will graze?

16)1 can be written as # and 0 can be written as %....for example
1 is written as #
2 is written as #%
3 is written as ##
4 is written as #%%
then what is the LCM of 20,30,36 ?

17)A sells an article to B at 10% profit. B sells it to C at 25% profit. C sells it to D at 15% profit. What price did A pay to buy that article if D pays Rs.2056?

18)If a train of length 150m crosses a man in 12secs then what time it will take to cross a bridge of 250m length

19)A person always buys rice for Rs 200/- .if price get increased by 10%, then he will take 2 kg less. Then calculate the increased price of rice

20)if 14th January 2004 is on Thursday then what was the day of 14th January 1912

21)A salary + B salary=10000, if A spends 70% of his income, and B spends 80% of his income, the difference between the spent money is 500, then what is the salary of A.

22)The radius of a circle was increased in length by some value. If the increase in circumference is 44 cm, the change in radius is

23)If $=’0’ and @=’1’And if we can write 0=$
1=@
2=@$
3=@@
4=@$$
Then find out average of @@@@ and @@@$$@

24)For a given set of numbers as 32, 45, 57, 142, 180, A machine gives following outputs after each step as shown below:
Step 1 33,47,60,146,185
step 2 33,185,60,146,47
step 3 34,185,63,146,52
step 4 52,34,63,146,185
step 5 185,146,63,34,52
If you are given a set of numbers as 7,5,3,9,13, What is the output of machine after step 5 ?

25)Mark the wrong output of following program :-
10 R=2
20 R=R*2
30 E=R*R
40 K=E+2
50 PRINT K
60 IF R<16
70 GOTO 20
80 END
a)18 b)64 c)258 d) e)None of these

7:03 PM

FUTURESOFT SAMPLE PAPER

Posted by yusuf

FUTURESOFT SAMPLE PAPER

1. S --> AB|AS
    A --> a|aA
    B --> b
What is the grammer accepted by the above?
Ans. aa*b

2. How many address lines are needed to address a 64Kb segment with each register storing upto 512 bytes.
Ans. 14 address lines

3.  Find the expression representing the following K-map

1   1 1
       
  1 1  
1   1 1
 
4. For the POS form of the expression given below
     _      _         _      
     X.Y.Z + X.Y.Z + X.( Y + Z )

5. In a computer system the ROM :
(a) contains boot software
(b) is permanent
(c) Both of the above
(d) None of the above
Ans. ©

6. The binary  equivalent of 3B7F is
Ans. 0011 1011 0111 1111

7. The register used by the shift reduce passing method is
Ans. Stack

8. A microprogram can be defines as to consist of
Ans. A primitive operation

9. Find the output for the following C program
int array[4][4] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
for (i=2;i<0;i--)
  for (j=2;j<=0;j--)
   printf(“%d”, arr[i][j]);
10. Find the output for the following C program
#include
void main()
{int i,x,sum=0;
int arr[6]=[1,2,3,4,5,6]
for (i=0;i<4;i++)
sum+ = func(arr[i]);
printf(“%d”, sum);
}
func(int x)
{ int val,x;
val = 2;
return(x+ val++);
}

11. Given the following data:
Process P1 takes 2 seconds
Process P2 takes 3 seconds
Process P3 takes 4 seconds
Process P4 takes 1 second
Process P5 takes 6 seconds
Find the average time in case of shortest job first (SJF) scheduling.

12. Given a string STOCK and a stack of size 4.
      Which of the following strings cannot  be generated using this stack.
(a) TSOCK
(b) TOSKC
(c) STOCK
(d) TKOSC
(e) None of these

13. Inversion of a matrix will take which of the following time complexities?
(a) O(n)
(b) O(n²)
(c) O(log n)
(d) O(n³)
(e) None of these

14. A drum rotates at 4000 rpm. What is its average access time.

15. What range of  integral values can be stored using 32 bits?

16. Where are the following variables stored
Automatic
Global
Static

17. If a layer 4 transfers data at the rate of 3000 bytes/sec.
      What will be the size of data block transferred by Layer 2

18. What is the greatest disadvantage of dynamic RAM over static RAM

Ans. High Power and need to refresh every 2 ms.

19. What happens when the CPU gets interrupted?

20. Find the Postfix of the following string
  (a + b) * ((-d) *f (ab - cd))

21. E --> E + E| E * E | E/E | E - E| .... then which is correct
(a) It is ambigous
(b) It is inherently ambigous
(c) It is non inherently ambigous
(d) None of the above

22. If there are n nodes and K edges in a graph then what is the order of traversing
Ans. O(n²)

23. A graph is represented as an adjacency list with n vertices and e edges
      What is its time complexity
Ans. O(n + e)

24. An array with address KV[a] had n elements. Which of the following correctly addresses the ith element of the array.
(a) KV(a) - 2a + 2i
(b) KV(a) +2i
(c) KV(a) - 2a
(d) None of these

25. Give an example of a primitive instruction in microprocessors.

26. A computer has 8 bit data bus and 16 bit address line.
      How many machine cycles will it take to store the contents to a memory location?

27. Where is a variable defined in a function stores?
Ans. Process Swappable Area

28. For the following C progralm
  int d=0;
   for(int i=0;i<31;i++)
    for(int j=0;j<31;j++)
     for(int k=0;k<31;k++)
     if (((i+j+k) % 3)==0)
    d=d+1;

Find value of d

29. e= | | <(e)> |
     What forms do the expressions created by the above definition fit in
Ans. All arithematic expressions

30. If a set of numbers are in sorted order then which of the following sorting method is best
Ans. Bubble Sort

31. A magnetic tape is similar to which of the following structures
Ans. List

32. The s/n id 3 dB Find the capacity of the line.

9:37 AM

APTITUDE QUESTIONS _PART 3

Posted by yusuf

SECTION.C (PRG SKILLS)
--------
(1) STRUCT DOUBLELIST
{ DOUBLE CLINKED
INT DET; LIST VOID
STRUCT PREVIOUS; BE GIVEN AND A PROCEDURE TO DELETE
STRUCT NEW; AN ELEMENT WILL BE GIVEN
}
DELETE(STRUCT NODE)
{
NODE-PREV-NEXT NODE-NEXT;
NODE-NEXT-PREV NODE-PREV;
IF(NODE==HEAD)
NODE
}
IN WHAT CASE THE PREV WAS
(A) ALL CASES
(B) IT DOES NOT WORK FOR LAST ELEMENT
(C) IT DOES NOT WORK FOR-----
(2) SIMILAR TYPE QUESTION
ANS: ALL DON'T WORK FOR NON NULL VALUE

(3) VOID FUNCTION(INT KK)
{
KK+=20;
}
VOID FUNCTION (INT K)
INT MM,N=&M
KN = K
KN+-=10;
}
SECTION D
--------
(1) a=2,b=3,c=6 c/(a+b)-(a+b)/c=?
(2) no.rep in hexadecimal, write it in radiv 7
(3) A B C D E
* 4
---------- find E ANS: 13
E D C B A
------------
(4) GRE-MODEL TEST-1, SECTION-6(19-22)
(5) M HAS DOUBLE AMOUNT AS D, Y HAS RS. 3 MORE THAN HALF OF AMOUNT OF D
THE ORDERING A,B,C M C D C Y
ANS:DATA INSUFFICIENT D C M C Y
(6)IN STASTIC MEN CAUSE MORE ACCIDENTS THEN ONE CONCLUSION
(A) MEN DRIVE MORE THAN ONCE
(B) STASTICS GIVE WRONG INFORMATION
(C) WOMEN ARE CAUTION THAN ME ANS; C(VERIFY)
(D)-----ETC
(7) P,Q,R,S,T,U -SECURING GRANT;TWO TOURIST PARTIES AND THEN TWO SECURITY
GAURDS SHOULD GO WITH EACH PARTY
________________________________________________________________________
P AND R-ARE ENEMIES, Q DOES NOT GO SOUTH
P&S-ARE WILLING TO BE TOGETHER
______________________________________________________________________
THE TWO PARTIES MAY GO SOUTH&NORTH RESPECTIVELY
AT ONE POINT EACH MAY PASS EACH OTHER THEN GAURDS CAN EXCHANGE
6 Q BASED ON THIS
(8)pq-r/s =2 what is q inference a,n&d
(a) a can do n units of work in strs,a&b can do n units of work in 2 hrs
in how many hrs n units of work ans:3 hr 30 min p = (2s+r)/q
____________

main()
{
int var=25,varp;
varp=&var;
varp p = 10; fnc(varp)
printf("%d%d,var,varp);
}
(a) 20,55(b) 35,35(c) 25,25(d)55,55

[ c++,c,dbms interview]
[fundamentals]
this is new paper

Application -Software

Questions
(5)ingless ans:RDMS
(1)bit program-ans d
(2)c ans
(3)+ 0 ans
(4)00p--ans linking
(5)------
(6)-------
(9)25--45 even no. ans--10
(10) >10 <100 ---ans=n+9

9:31 AM

HCL APTITUDE QUESTIONS

Posted by yusuf

SECTION B


1.enum day = { jan = 1 ,feb=4, april, may}
what is the value of may?
a)4 b)5 c)6 d)11
e)none of the above


2.main
{
int x,j,k;
j=k=6;x=2; ans x=1
x=j*k;
printf("%d", x);

3. fn f(x)

{ if(x<=0)
return; ans fn(5) ....?
else f(x-1)+x;
}


4. i=20,k=0;
for(j=1;j{
k+=j<10?4:3;
}

printf("%d", k); ans k=4


5. int i =10
main()
{
int i =20,n;
for(n=0;n<=i;)
{
int i=10
i++;
}
printf("%d", i); ans i=20

6. int x=5;
y= x&y
( MULTIPLE CHOICE QS)
ans : c


7. Y=10;
if( Y++>9 && Y++!=10 && Y++>10)
printf("........ Y);
else printf("".... )


ans : 13


8. f=(x>y)?x:y
a) f points to max of x and y
b) f points to min of x and y
c)error
d) ........

ans : a


9. if x is even, then

(x%2)=0
x &1 !=1
x! ( some stuff is there)

a)only two are correct
b) three are correct
c), d) ....


ans : all are correct

10. which of the function operator cannot be over loaded

a) <=
b)?:
c)==
d)*

ans: b and d

11:42 AM

C++ Aptitude Questions

Posted by yusuf

C++ Questions

Note: All the programs are tested under Turbo C++ 3.0, 4.5 and Microsoft VC++ 6.0 compilers.

It is assumed that,
Programs run under Windows environment,
The underlying machine is an x86 based system,
Program is compiled using Turbo C/C++ compiler.
The program output may depend on the information based on this assumptions (for example sizeof(int) == 2 may be assumed).

1) class Sample
{
public:
int *ptr;
Sample(int i)
{
ptr = new int(i);
}
~Sample( )
{
delete ptr;
}
void PrintVal( )
{
cout << "The value is " << *ptr;
}
};
void SomeFunc(Sample x)
{
cout << "Say i am in someFunc " << endl;
}
int main( )
{
Sample s1= 10;
SomeFunc(s1);
s1.PrintVal( );
}
Answer:
Say i am in someFunc
Null pointer assignment(Run-time error)


Explanation:
As the object is passed by value to SomeFunc the destructor of the object is called when the control returns from the function. So when PrintVal is called it meets up with ptr that has been freed.The solution is to pass the Sample object by reference to SomeFunc:
void SomeFunc(Sample &x)
{
cout << "Say i am in someFunc " << endl;
}
because when we pass objects by reference that object is not destroyed. while returning from the function.
Which is the parameter that is added to every non-static member function when it is called?
Answer:
‘this’ pointer

3) class base
{
public:
int bval;
base( ){ bval=0;}
};
class deri:public base
{
public:
int dval;
deri( ){ dval=1;}
};
void SomeFunc(base *arr,int size)
{
for(int i=0; icout<bval;
cout<}
int main( )
{
base BaseArr[5];
SomeFunc(BaseArr,5);
deri DeriArr[5];
SomeFunc(DeriArr,5);
}

Answer:
00000
01010

Explanation:
The function SomeFunc expects two arguments.The first one is a pointer to an array of base class objects and the second one is the sizeof the array.The first call of someFunc calls it with an array of bae objects, so it works correctly and prints the bval of all the objects.
When Somefunc is called the second time the argument passed is the pointeer to an array of derived class objects and not the array of base class objects. But that is what the function expects to be sent. So the derived class pointer is promoted to base class pointer and the address is sent to the function.
SomeFunc( ) knows nothing about this and just treats the pointer as an array of base class objects. So when arr++ is met, the size of base class object is taken into consideration and is incremented by sizeof(int) bytes for bval (the deri class objects have bval and dval as members and so is of size >= sizeof(int)+sizeof(int) ).


4) class base
{
public:
void baseFun(){ cout<<"from base"<};
class deri:public base
{
public:
void baseFun(){ cout<< "from derived"<};
void SomeFunc(base *baseObj)
{
baseObj->baseFun();
}
int main( )
{
base baseObject;
SomeFunc(&baseObject);
deri deriObject;
SomeFunc(&deriObject);
}


Answer:
from base
from base

Explanation:
As we have seen in the previous case, SomeFunc expects a pointer to a base class. Since a pointer to a derived class object is passed, it treats the argument only as a base class pointer and the corresponding base function is called.

5) class base
{
public:
virtual void baseFun( ){ cout<<"from base"<};
class deri:public base
{
public:
void baseFun( ){ cout<< "from derived"<};
void SomeFunc(base *baseObj)
{
baseObj->baseFun( );
}
int main( )
{
base baseObject;
SomeFunc(&baseObject);
deri deriObject;
SomeFunc(&deriObject);
}

Answer:
from base
from derived

Explanation:
Remember that baseFunc is a virtual function. That means that it supports run-time polymorphism. So the function corresponding to the derived class object is called.

6. void main( )
{
int a, *pa, &ra;
pa = &a;
ra = a;
cout <<"a="<}
Answer:
Compiler Error: 'ra', reference must be initialized
Explanation:
Pointers are different from references. One of the main
differences is that the pointers can be both initialized and assigned,
whereas references can only be initialized. So this code issues an error.

7. const int size = 5;
void print(int *ptr)
{
cout<}
void print(int ptr[size])
{
cout<}
void main( )
{
int a[size] = {1,2,3,4,5};
int *b = new int(size);
print(a);
print(b);
}
Answer:
Compiler Error : function 'void print(int *)' already has a body
Explanation:
Arrays cannot be passed to functions, only pointers (for arrays, base addresses) can be passed. So the arguments int *ptr and int prt[size] have no difference as function arguments. In other words, both the functoins have the same signature and so cannot be overloaded.

8. class some
{
public:
~some( )
{
cout<<"some's destructor"<}
};


void main( )
{
some s;
s.~some( );
}
Answer:
some's destructor
some's destructor
Explanation:
Destructors can be called explicitly. Here 's.~some( )' explicitly calls the
destructor of 's'. When main( ) returns, destructor of s is called again, hence the result.

9. #include
class fig2d
{
int dim1;
int dim2;
public:
fig2d() { dim1=5; dim2=6;}
virtual void operator<<(ostream & rhs);
};
void fig2d::operator<<(ostream &rhs)
{
rhs <dim1<<" "<dim2<<" ";
}
/*class fig3d : public fig2d
{
int dim3;
public:
fig3d() { dim3=7;}
virtual void operator<<(ostream &rhs);
};
void fig3d::operator<<(ostream &rhs)
{
fig2d::operator <<(rhs);
rhs<dim3;
}
*/
void main( )
{
fig2d obj1;
// fig3d obj2;
obj1 << cout;
// obj2 << cout;
}
Answer:
5 6
Explanation:
In this program, the << operator is overloaded with ostream as argument. This enables the 'cout' to be present at the right-hand-side. Normally, 'cout' is implemented as global function, but it doesn't mean that 'cout' is not possible to be overloaded as member function.
Overloading << as virtual member function becomes handy when the class in which it is overloaded is inherited, and this becomes available to be overrided. This is as opposed to global friend functions, where friend's are not inherited.

10. class opOverload
{
public:
bool operator==(opOverload temp);
};
bool opOverload::operator==(opOverload temp)
{
if(*this == temp )
{
cout<<"The both are same objects\n";
return true;
}
else
{
cout<<"The both are different\n";
return false;
}
}
void main( )
{
opOverload a1, a2;
a1= =a2;
}
Answer:
Runtime Error: Stack Overflow
Explanation:
Just like normal functions, operator functions can be called recursively. This program just illustrates that point, by calling the operator == function recursively, leading to an infinite loop.

11. class complex
{
double re;
double im;
public:
complex( ) : re(1),im(0.5) {}
bool operator==(complex &rhs);
operator int( ){}
};
bool complex::operator == (complex &rhs)
{
if((this->re == rhs.re) && (this->im == rhs.im))
return true;
else
return false;
}
int main( )
{
complex c1;
cout<< c1;
}
Answer: Garbage value
Explanation: The programmer wishes to print the complex object using output
re-direction operator, which he has not defined for his lass. But the compiler instead of giving an error sees the conversion function and converts the user defined object to standard object and prints some garbage value.

12. class complex
{
double re;
double im;
public:
complex( ) : re(0),im(0) {}
complex(double n) { re=n,im=n;};
complex(int m,int n) { re=m,im=n;}
void print( ) { cout<};
void main( )
{
complex c3;
double i=5;
c3 = i;
c3.print( );
}
Answer:
5,5
Explanation:
Though no operator= function taking complex, double is defined, the double on the rhs is converted into a temporary object using the single argument constructor taking double and assigned to the lvalue.

13. void main( )
{
int a, *pa, &ra;
pa = &a;
ra = a;
cout <<"a="<
}
Answer:
Compiler Error: 'ra',reference must be initialized
Explanation:
Pointers are different from references. One of the main differences is that the pointers can be both initialized and assigned, whereas references can only be initialized. So this code issues an error.
Try it Yourself






9:41 PM

YOUTH GLITZ

Posted by yusuf

INTERVIEW SAMPLE QUESTION-PUZZLES


Here is the model aptitude question asked by the software companies while seeking for a job.


*************************************
HCL SYSTEM SOFTWARE PAPER
*************************************





section 1.

1.which of the following involves context switch,
a) system call b)priviliged instruction
c)floating poitnt exception
d)all the above
e)none of the above
ans: a

2.In OSI, terminal emulation is done in
a)semion b)appl.. c)presenta... d)transport
ans: b

3....... 25MHz processor , what is the time taken by the instruction which needs 3 clock cycles,
a)120 nano secs b)120 micro secs
c)75 nano secs d)75 micro secs


4. For 1 MBmemory no of address lines required,
a)11 b)16 c)22 d) 24
ans: 16

5. Semafore is used for
a) synchronization b0 dead-lock avoidence
c)box d) none
ans : a


6. class c: public A, public B

a) 2 member in class A,B shouldnot have same name
b) 2 member in class A,C " '' '' ''
c) both
d) none

ans : a


7. question related to java


8. OLE is used in

a)inter connection in unix
b)interconnection in WINDOWS
c)interconnection in WINDOWS NT

9.No given in HEX ---- write it in OCTAL

10.macros and function are related in what aspect?
a)recursion b)varying no of arguments
c)hypochecking d)type declaration

11.preproconia.. does not do one of the following
a)macro ...... b)conditional compliclation
c)in type checking d)including load file

ans: c