Showing posts with label APTITUDE QUESTION. Show all posts
Showing posts with label APTITUDE QUESTION. Show all posts

TCS PREVIOUS YEAR PLACEMENT PAPER

TCS 2010 PLACEMENT PAPER,2010 TCS PLACEMENT PAPER,PLACEMENT PAPER FOR TCS 2010,TCS ONLINE TEST 2010,TCS TOUCHTONE TEST 2010,TCS LATEST PLACEMENT PAPER,TCS INTERVIEW QUESTION.
Aptitude round :
1)My flight takes of at 2am from a place at 18N 10E and landed 10 Hrs later at a place with coordinates 36N70W. What is the local time when my plane landed?
6:00 am b) 6:40am c) 7:40 d) 7:00 e) 8:00
Sol) The destination place is 80 degree west to the starting place. Hence the time difference between these two places is 5 hour 20 min. (=24hr*80/360). When the flight landed, the time at the starting place is 12 noon (2 AM + 10 hours). Hence, the time at the destination place is 12 noon – 5:20 hours = 6: 40 AM

2) In a two-dimensional array, X (9, 7), with each element occupying 4 bytes of memory, with the address of the first element X (1, 1) is 3000, find the address of X (8, 5)
Sol) initial x (1,1) = 3000 u have to find from x(8,1)so u have x(1,1),x(1,2) … x(7,7) = so u have totally 7 * 7 = 49 elements you need to find for x(8,5) ? here we have 5 elements each element have 4 bytes : (49 + 5 -1) * 4 = 212 —–( -1 is to deduct the 1 element ) 3000 + 212 = 3212

3) what’s the answer for that : A, B and C are 8 bit no’s. They are as follows:
A -> 1 1 0 0 0 1 0 1
B -> 0 0 1 1 0 0 1 1
C -> 0 0 1 1 1 0 1 0 ( – =minus, u=union)
Find ((A – C) u B) =?
Sol)To find A-C, We will find 2’s compliment of C and them add it with A, That will give us (A-C) 2’s compliment of C=1’s compliment of C+1 =11000101+1=11000110 A-C=11000101+11000110 =10001001
Now (A-C) U B is .OR. logic operation on (A-C) and B 10001001 .OR . 00110011 The answer is = 10111011,
Whose decimal equivalent is 187.

4) Which one among have higher deviation:1. 5,0,-5, 5,0,-5 2. -5,-5,-5,-5,-5,-5
3. 5,-5,5,-5,5,-5 4. 5,5,5,5,5,5
Sol) 3. 5,-5,5,-5,5,-5
whatever number they give you the ans must be either in (+,-,+,-) or in (-,+,-,+)form

5)Find the physical quantity represented by MOMENTUM *VELOCITY] / [LENGTH * ACCELERATION]?
Sol) mass

6)Find the result of the following _expression if, M denotes modulus operation, R denotes round-off, T denotes truncation:
M(373,5)+R(3.4)+T(7.7)+R(5.8)
Sol) 373/5=rem(3)
3+3+7+6=19.ans


7)Which of the following are orthogonal pairs?
a. 3i+2 b. i+1
c. 3-2i d. -7i+1
Sol)(3i+2)(+i)=2i+3
(3i+2)(-i)= -2i+3
ANS: (A)& (C).

8)Find d Odd one out? ( I m giving u al as dere was 3 ques on dat)
a. LINUX b. WINDOWS 98 c. SOLARIS d. SMTP
b. JAVA b. LISP c. Small talk d. Eiffel
c. HTTP b. ARP c. SMTP d. SAP
d. Linux b.windows NT c. SQL server d. UNIX
e. SAP b. ARP c. WAP d.TCP IP
f. Oracle b. Linux c. Ingress d. DB2
g. SMTP b. WAP c. SAP d. ARP
h. WAP b. HTTP c. BAAN d. ARP
i. SQL b. DB2 c. SYBASE d. HTTP

9)The size of a program is N. And the memory occupied by the program is given by M = square root of 100N. If the size of the program is increased by 1% then how much memory now occupied ?
Sol) M=sqrt(100N) N is increased by 1% therefore new value of N=N + (N/100) =101N/100
M=sqrt(100 * (101N/100) )
Hence, we get M=sqrt(101 * N)

10)A power unit is there by the bank of the river of 750 meters width. A cable is made from power unit to power plant opposite to that of the river and 1500mts away from the power unit.The cost of the cable below water is Rs.15/- per meter and cost of cable on the bank is Rs.12/-per meter. Find the total of laying the cable.
sol)750*15+(1500-750)*12=20250

11) Which shape will be obtained by using these values of X & Y?
X Y
0 0.00001
10 1.02
100 1.72
1000 3.00
9999 4.72
Sol): Y= log10(X)

12)Find d singularity matrix from a given set of matrices?
a) 2 3 b) 3 9 c) 0 5 d) 9 8
4 5 1 3 1 5 4 5
Sol): b (Hint: det (A) = 0)

13)In d given series {“b v f q q m b v f m g v f f v f m b v f b g d v f a m v f v f f …) How many v’s are dere such that each v is followed by f next to it, if the f is not followed by q next to it?
Sol): try it out

14)Madras , temperature at noon varies according to -t^2/2 + 8t + 3, where t is elapsed time. Find how much temperature more or less in 4pm to 9pm.?
Sol): In equation first put t=9,
we will get 34.5……………………… (1)
Now put t=4,
we will get 27………………………… (2)
So ans=34.5-27
=7.5

15)Number of edges,faces, vertices and of a cube
1.12,6,8 2.6,8,12 3.4 ,6, 8 4.8,12,6
sol)1.12,6,8

16)What is d largest prime number that can be stored in a 9 – bit register?
Sol): 2^9=512
509

17) In the word ORGANISATIONAL, if the first & second, third & fourth, forth& fifth are interchanged up to the last letter, what would be the the tenth letter 4m right?
Sol): I

18)If VXUPLVH is written as SURMISE, what is SHDVD is written as?
Sol): PEASA

19)A power unit is there by the bank of the river of 900 mtr width. a cable is made from power unit to power a plant opposite to that of the river and 3000 mtr away from the power unit. The cost of the cable bellows water Rs5 / mtr and cost of cable on the bank is Rs 4/ mtr. Find the pt where the cable cut through the river.
sol)3000-900=2100Ans

20) A, B and C are the mechanisms used separately to reduce the wastage of fuel by 30%, 40% and 10%. What will be the fuel economy if they were used combined?
Sol): Method is (70/100*60/100*90/100)*100 = 37.8
So, economy = 100-37.8 = 62.2

21)g[0]=1,g[1]=-1,g[n]=2*g[n-1]-3*g[n-2] then calculate g[4]= ?
Sol): try it out

22) Low temperature at the night in a city is 1/3 more than 1/2 high as higher temperature in a day. Sum of the low temperature and highest temp. is 100 degrees. Then what is the low temp?
sol)Let highest temp be x
so low temp=1/3 of x of 1/2 of x plus x/2 i.e. x/6+x/2
total temp=x+x/6+x/2=100
therefore, x=60
Lowest temp is 40

23)If log 0.317=0.3332 and log 0.318=0.3364 then find log 0.319 ?
Sol) log 0.317=0.3332 and log 0.318=0.3364, then log 0.319=log0.318+(log(0.318-0.317)) = 0.3396

24)Match the following
1. Mammal – cow —> a. A type of
2. Snake – reptile —> b. A part of
3. Roof – Building —> c. Not a type of
4. Mushroom – Vegetables —> d. A superset of
Sol): 1-c, 2-d, 3-b, 4-a

25)Find d value of @@+25 – ++@16, where @ denotes “square” and + denotes “square root”?
Sol): 621

26)Convert the decimal number 310 to d base 6?
Sol): 1234

27) How many positive integer solutions does the equation 2x+3y = 100 have?
sol) There is a simple way to answer this kind of Q’s given 2x+3y=100, take l. of ‘x’ coeff and ‘y’ coeff i.e. l. of 2,3.2*3=6then divide 100 with 6 , which turns out 16 hence answer is 16

28)Amal bought 5 pens, 7 pencils and 4 erasers. Rajan bought 6 pens, 8 erasers and 14 pencils for an amount which was half more than what Amal had paid. What % of the total amount paid by Amal was paid for pens?
sol) Let, 5 pens + 7 pencils + 4 erasers = x rupees
so 10 pens + 14 pencils + 8 erasers = 2*x rupees
also mentioned, 6 pens + 14 pencils + 8 erarsers = 1.5*x rupees
so (10-6) = 4 pens = (2-1.5)x rupees
so 4 pens = 0.5x rupees => 8 pens = x rupees
so 5 pens = 5x/8 rupees = 5/8 of total (note x rupees is total amt paid by
amal) i.e 5/8 = 500/8% = 62.5%

29)A work is done by 2 people in 24 min. One of them can do this work alone in 40 min. How much time required to do the same work for the second person?
sol)Two people work together in 24 mins.
So, their one day work is
(1/x)+(1+y)=(1/24)
One man can complete the work in 40mins
one man’s one day work (1/y)= (1/40)
Now,
(1/x)=(1/24)-(1/40)
(1/x)=(1/60)
So, x can complete the work in 60 mins

30)A man has to get air-mail. He starts to go to airport on his motorbike. Plane comes early and the mail is sent by a horse-cart. The man meets the cart in the middle after half an hour. He takes the mail and returns back, by doing so, he saves twenty minutes. How early did the plane arrive?
sol)10min:::assume he started at 1:00,so at 1:30 he met cart .He returned home at 2:00.so it took him 1 hour for the total journey. by doing this he saved 20 min.so the actual time if the plane is not late is 1 hour and 20 min.so the actual time of plane is at 1:40.The cart travelled a time of 10 min before it met him.so the plane is 10 min early.
31,32.Two questions were on graphs . Practice graphs of tanx , logx , e^x.
33.34.35. Three questions were on bar graph. It was simple to attempt dere only. No need to practice.
36.37.38. Last problem was based on Venn diagram. Figure was given & on dat basis 3 ques were dere.
Ex: a Venn diagram on no. of people who know only English, only French, only German, both English and French, French and German, German and English, know all the three.
->How many know English more than French?

IT1001- DISTRIBUTED SYSTEMS QUESTION PAPER

B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2009.
Seventh Semester
Information Technology
IT1001- DISTRIBUTED SYSTEMS
(Regulation 2004)
Time: Three hours Maximum:100 marks
Answer ALL questions.
PART A- (10 X 2= 20 marks)
1. What is the main objective of distributed systems? What are the challenges?
2. What is the need for IDL?
3. Name the paradigms for distributed programming.
4. What is RAID?
5. What are the requirements for distributed mutual exclusion algorithms?
6. What is null RPC?
7. What are hierarchic locks?
8. What are phantom deadlocks?
9. What are trap door functions?
10. What is a linearizable service?
PART B - (5 X 16= 80 marks)
11. (a) (i) Describe the architectural models of distributed systems.(Marks 8)
(ii) What is marshalling? What are the different approaches of external data representation? Discuss.(Marks 8)
(Or)
(b) (i) Describe the various RPC protocols supporting client server communication.(Marks 10)
(ii) How is IPC implemented in UNIX? Explain.(Marks 6)
12. (a) How does the communication between distributed objects take place? Describe the related issues.(Marks 16)
(Or)
(b) What is name service? What are its goals? How is it implemented? What is directory service?(Marks 16)
13. (a) Describe the architecture for multi threaded servers. Discuss the issues related to thread programming, thread lifetime, thread synchronization, scheduling and implementation.(Marks 16)
(Or)
(b) (i) What is the significance of time in distributed system? What are the ways for synchronizing clocks? Give brief overview of various techniques. (Marks 8)
(ii) What do you understand by logical time and logical clocks? What is lamport's contribution for it? Discuss.(Marks 8)
14. (a) Discuss the various concurrency control protocols.(Marks 16)
(Or)
(b) Describe the various deadlock handling techniques.(Marks 16)
15. (a) Elaborate on various cryptographic algorithms. (Marks 16)
(Or)
(b) Write notes on:
(i) Fault tolerant services.(Marks 8)
(ii) Highly available services.(Marks 8)

DATA STRUCTURE APTITUDE QUESTION & ANSWER

FREE DOWNLOAD PDF FOR DATA STRUCTURE
1. What is data structure?
A data structure is a way of organizing data that considers not only the items
stored, but also their relationship to each other. Advance knowledge about the
relationship between data items allows designing of efficient algorithms for the
manipulation of data.
2. List out the areas in which data structures are applied extensively?
??Compiler Design,
??Operating System,
??Database Management System,
??Statistical analysis package,
??Numerical Analysis,
??Graphics,
??Artificial Intelligence,
??Simulation
3. What are the major data structures used in the following areas : RDBMS, Network
data model & Hierarchical data model.
??RDBMS – Array (i.e. Array of structures)
??Network data model – Graph
??Hierarchical data model – Trees
4. If you are using C language to implement the heterogeneous linked list, what pointer
type will you use?
The heterogeneous linked list contains different data types in its nodes and we
need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So
we go for void pointer. Void pointer is capable of storing pointer to any type as it is a
generic pointer type.
5. Minimum number of queues needed to implement the priority queue?
Two. One queue is used for actual storing of data and another for storing
priorities.
6. What is the data structures used to perform recursion?
Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller’ so
knows whom to return when the function has to return. Recursion makes use of system
stack for storing the return addresses of the function calls.
Data Structures Aptitude
2
Every recursive function has its equivalent iterative (non-recursive) function.
Even when such equivalent iterative procedures are written, explicit stack is to be used.
7. What are the notations used in Evaluation of Arithmetic Expressions using prefix and
postfix forms?
Polish and Reverse Polish notations.
8. Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and
Postfix notations.
Prefix Notation:
^ - * +ABC - DE + FG
Postfix Notation:
AB + C * DE - - FG + ^
9. Sorting is not possible by using which of the following methods?
(a) Insertion
(b) Selection
(c) Exchange
(d) Deletion
(d) Deletion.
Using insertion we can perform insertion sort, using selection we can perform
selection sort, using exchange we can perform the bubble sort (and other similar sorting
methods). But no sorting method can be done just using deletion.
10. A binary tree with 20 nodes has null branches?
21
Let us take a tree with 5 nodes (n=5)
It will have only 6 (ie,5+1) null branches. In general,
A binary tree with n nodes has exactly n+1 null nodes.
11. What are the methods available in storing sequential files ?
??Straight merging,
??Natural merging,
??Polyphase sort,
??Distribution of Initial runs.
Null Branches
3
12. How many different trees are possible with 10 nodes ?
1014
For example, consider a tree with 3 nodes(n=3), it will have the maximum
combination of 5 different (ie, 23 - 3 = 5) trees.
i ii iii iv v
In general:
If there are n nodes, there exist 2n-n different trees.
13. List out few of the Application of tree data-structure?
??The manipulation of Arithmetic expression,
??Symbol Table construction,
??Syntax analysis.
14. List out few of the applications that make use of Multilinked Structures?
??Sparse matrix,
??Index generation.
15. In tree construction which is the suitable efficient data structure?
(a) Array (b) Linked list (c) Stack (d) Queue (e) none
(b) Linked list
16. What is the type of the algorithm used in solving the 8 Queens problem?
Backtracking
17. In an AVL tree, at what condition the balancing is to be done?
If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.
18. What is the bucket size, when the overlapping and collision occur at same time?
One. If there is only one entry possible in the bucket, when the collision occurs,
there is no way to accommodate the colliding value. This results in the overlapping of
values.
19. Traverse the given tree using Inorder, Preorder and Postorder traversals.

yahoo interview question free download

Questions 1 - 11
1. Which of the following will NOT add john to the users array?
1. $users[] = 'john';
Successfully adds john to the array
2. array_add($users,’john’);
Fails stating Undefined Function array_add()
3. array_push($users,‘john’);
Successfully adds john to the array
4. $users ||= 'john';
Fails stating Syntax Error
2. What’s the difference between sort(), assort() and ksort? Under what circumstances would you use each of these?
1. sort()
Sorts an array in alphabetical order based on the value of each element. The index keys will also be renumbered 0 to length - 1. This is used primarily on arrays where the indexes/keys do not matter.
2. assort()
The assort function does not exist, so I am going to assume it should have been typed asort().
asort()
Like the sort() function, this sorts the array in alphabetical order based on the value of each element, however, unlike the sort() function, all indexes are maintained, thus it will not renumber them, but rather keep them. This is particularly useful with associate arrays.
3. ksort()
Sorts an array in alphabetical order by index/key. This is typically used for associate arrays where you want the keys/indexes to be in alphabetical order.
3. What would the following code print to the browser? Why?
PLAIN TEXT
PHP:
1. $num = 10;
2. function multiply(){
3. $num = $num * 10;
4. }
5. multiply();
6. echo $num; // prints 10 to the screen
Since the function does not specify to use $num globally either by using global $num; or by $_GLOBALS['num'] instead of $num, the value remains 10.
4. What is the difference between a reference and a regular variable? How do you pass by reference and why would you want to?
Reference variables pass the address location of the variable instead of the value. So when the variable is changed in the function, it is also changed in the whole application, as now the address points to the new value.
Now a regular variable passes by value, so when the value is changed in the function, it has no affect outside the function.
PLAIN TEXT
PHP:
1. $myVariable = "its' value";
2. Myfunction(&$myVariable); // Pass by Reference Example
So why would you want to pass by reference? The simple reason, is you want the function to update the value of your variable so even after you are done with the function, the value has been updated accordingly.
5. What functions can you use to add library code to the currently running script?
This is another question where the interpretation could completely hit or miss the question. My first thought was class libraries written in PHP, so include(), include_once(), require(), and require_once() came to mind. However, you can also include COM objects and .NET libraries. By utilizing the com_load and the dotnet_load respectively you can incorporate COM objects and .NET libraries into your PHP code, thus anytime you see "library code" in a question, make sure you remember these two functions.
6. What is the difference between foo() & @foo()?
foo() executes the function and any parse/syntax/thrown errors will be displayed on the page.
@foo() will mask any parse/syntax/thrown errors as it executes.
You will commonly find most applications use @mysql_connect() to hide mysql errors or @mysql_query. However, I feel that approach is significantly flawed as you should never hide errors, rather you should manage them accordingly and if you can, fix them.
7. How do you debug a PHP application?
This isn't something I do often, as it is a pain in the butt to setup in Linux and I have tried numerous debuggers. However, I will point out one that has been getting quite a bit of attention lately.
PHP - Advanced PHP Debugger or PHP-APD. First you have to install it by running:
pear install apd
Once installed, start the trace by placing the following code at the beginning of your script:
apd_set_pprof_trace();
Then once you have executed your script, look at the log in apd.dumpdir.
You can even use the pprofp command to format the data as in:
pprofp -R /tmp/pprof.22141.0
For more information see http://us.php.net/manual/en/ref.apd.php
8. What does === do? What’s an example of something that will give true for ‘==’, but not ‘===’?
The === operator is used for functions that can return a Boolean false and that may also return a non-Boolean value which evaluates to false. Such functions would be strpos and strrpos.
I am having a hard time with the second portion, as I am able to come up with scenarios where '==' will be false and '===' would come out true, but it's hard to think of the opposite. So here is the example I came up with:
PLAIN TEXT
PHP:
1. if (strpos("abc", "a") == true)
2. {
3. // this does not get hit, since "a" is in the 0 index position, it returns false.
4. }
5.
6. if (strpos("abc", "a") === true)
7. {
8. // this does get hit as the === ensures this is treated as non-boolean.
9. }
9. How would you declare a class named “myclass” with no methods or properties?
PLAIN TEXT
PHP:
1. class myclass
2. {
3. }
10. How would you create an object, which is an instance of “myclass”?
PLAIN TEXT
PHP:
1. $obj = new myclass();
It doesn't get any easier than this.
11. How do you access and set properties of a class from within the class?
You use the $this->PropertyName syntax.
PLAIN TEXT
PHP:
1. class myclass
2. {
3. private $propertyName;
4.
5. public function __construct()
6. {
7. $this->propertyName = "value";
8. }
9. }

RS Agarwwal verbal resoning free download

RS AGARWWAL VERBAL RESONING

download rs agarwwal verbal resoning
ANALOGY
EXERCISE A
Directions: In each of the following questions,there is a certain relationship
between two given words
on one side of : : and one word is given on another side of : :while another word is
to be found from the given alternatives,having the same relation with this word as
the words of the given pair bear. Choose the correct alternative.
1 . Moon : Satellite : : Earth :?
(A) Sun (B) Planet (C)Solar System (D) Asteroid
Ans: (B)
Explanation: Moon is a satellite and Earth is a Planet .
2 . Forecast : Future : : Regret :?
(A) Present (B) Atone (C)Past (D)Sins
Ans: (C)
Explanation: Forecast is for Future happenings and Regret is for past actions .
3. Influenza : Virus : : Typhoid : ?
(A) Bacillus (B)Parasite (C)Protozoa (D) Bacteria
Ans: (D)
Explanation: First is the disease caused by the second .
4. Fear : Threat : : Anger : ?
(A)Compulsion (B)Panic (C)Provocation (D)Force
Ans: (C)
Explanation: First arises from the second .
5. Melt : Liquid : : Freeze : ?
(A)Ice (B)Condense (C)Solid (D)Crystal
Ans: (C)
Explanation: First is the process of formation of the second .
6. Clock : Time : : Thermometer : ?
(A)Heat (B)Radiation (C)Energy (D)Temperature
Ans: (D)
Explanation: First is an instrument used to measure the second .
7. Muslim : Mosque : : Sikhs : ?
(A)Golden Temple (B)Medina (C)Fire Temple (D)Gurudwara
Ans: (D)
Explanation: Second is the pace of worship for the first
. 8. Paw : Cat : : Hoof : ?
(A)Horse (B)Lion (C)Lamb (D)Elephant
Ans: (A)
Explanation: First is the name given to the foot of the second .
9. Eye :Myopia : : Teeth : ?
(A)Pyorrhea (B)Cataract (C)Trachoma (D)Eczema
Ans: (A)
Explanation: Second is a disease of the first
.
10. Tractor : Trailer : : Horse : ?
(A)Stable (B)Cart (C)Saddle (D)Engine
Ans: (B)
Explanation: Second is pulled by the first
. 11. Scribble : Write : : Stammer : ?
(A)Walk (B)Play (C)Speak (D)Dance
Ans: (C)
Explanation: First is an improper form of the second
.
12. Flower : Bud : : Plant : ?
(A) Seed (B)Taste (C)Flower (D)Twig
Ans: (A)
Explanation: First develop from the second .
13. Errata : Books : : flaws:?
(A)Manuscripts (B)Metals (C)Speech (D)Charter
Ans: (B)
Explanation: Errata comprises from the books.Similarly, Flaws are the defects in the
metals.
14. Gun : Bullet : : Chimney : ?
(A)Ground (B)House (C)Roof (D)Smoke
Ans: (D)
Explanation: Second comes out of the first .
15. Breeze : Cyclone : : Drizzle : ?
(A)earth quake (B)Storm (C)Flood (D)Down pour
Ans: (D)
Explanation: Second is more intense than the first .
16. Car : Garage : : Aeroplane : ?
(A)Port (B)Depot (C)Hanger (D)Harbour
Ans: (C)
Explanation: First is temporarily parked in the second .
17. Race : Fatigue : : Fast : ?
(A)Food (B)Appetite (C)Hunger (D)Weakness
Ans: (C)
Explanation: First causes the second .
18. Candle : Wax : : Paper :?
(A)Wood (B)Tree (C)Bamboo (D)Pulp
Ans: (D)
Explanation: First is made from the second
. 19. Acting : Theater : : Gambling : ?
(A)Casino (B)Club (C)Bar (D)Gymn
Ans: (A)
Explanation: Second is the place for performing the first .
20. Venerate : Worship : : Extol : ?
(A)Glorify (B)Homage (C)Compliment (D)Recommend
Ans: (A)
Explanation: The words in each pair are synonyms .