Thursday, March 17, 2016

Wipro previous placement questions - 3

Wipro previous placement questions - 3

1. If the day that will dawn 2 days after tomorrow is Friday, what day of the week dawned two days before yesterday?

a. Wednesday
b. Friday
c. Thursday
d. Sunday
Sol:
Two days before Friday = Wednesday. So today is Tuesday. Yesterday is Monday. Two days before monday = Saturday.

2. What should come in place of the question-mark (?) in the following number series?
5690, 5121, 4552, 3983, 3414, 2845,  ?
a. 2276
b. 2516
c. 2746
d. 2356
e. None of these
Sol:
The difference of the numbers in the series is same i.e 569.
5690 – 5121 = 569
5121 – 4552 = 569
4552 – 3983 = 569
3983 – 3414 = 569
3414 – 2845 = 569
So
2845 – 2276 = 569

3. A student scores 55% marks in 8 papers of 100 marks each. He scores 15% of his total marks in English. How much does he score in English?
1) 55
2) 66
3) 77
4) 44
5) None of these
Sol. Given student scores 55% marks in english in 8 papers of 100 marks each.
So,his total marks  = 55/100 × 800 ⇒ 440
15% of his 440 marks is 440 × (15/100) ⇒ 66
So, he scored 66 marks in english.
Ans is option-2.

4. A person travels 12 km in the southward direction and then travels 5km to the right and then travels 15 km toward the right and finally travels 5km towards the east, how far is he from his starting place?
(a) 5.5 kms
(b) 3 km
(c) 13 km
(d) 6.4 km
Sol:
To solve these type of questions, first draw the direction diagram and assume the person is at the intersection point.


From the diagram it is clear that he is 3 km from where he started.

5. A person travels 6km towards west, then travels 5km towards north ,then finally travels
6km towards west. Where is he with respect to his starting position?
(a) 13km east
(b) 13km northeast
(c) 13km northwest
(d) 13km west
Sol:

From the above diagram it is he started at C and reached position C. now ACD is a right angle triangle. AC = CD2+AD2 = 52+122=13
So he is 13 km away from the starting position and in north west position.

6. The difference between the compound and simple interest on a certain sum for 2 years at the rate of 8% per annum is Rs.80,What is the sum?
a) 11,880
b) 12,500
c) 13,250
d) 14,270
Sol:
Difference in simple and compound interest at the end of 2 years occurs because there is interest on first year interest. So Difference = P×(R100)2
⇒ 80 = P×(8100)2
⇒ P=80×(1008)2 = 12,500

7. If the class marks in frequency distribution weights of students be 128, 137, 146, 155, 164, 173 and 182 kgs then the first class boundary is
a)121.5
b)122.5
c)123.5
d)124.5
Sol:
Rule for class boundary is = n1– (n2 – n1)/2.
So here n1 = 128, n2 = 137;
First class boundary = 128 – (137 – 128)/2 = 128 – 4.5 = 123.5
Hence option (C) is correct.

8. Consider a courier company A which can deliver 100 parcels in 5 days with 5 men working for 8 hours a day. Consider another courier company B where every employee is equally efficient as that of company B. Company B is short of one man when compared to A and has a policy of asking its workers to work only for 6 hours a day. How long (in days) company B will take to deliver 100 parcels.
a. 8.3
b. 24
c. 12
d. 6.6
Sol:
Total amount of work done by Members of A in delivering 100 parcels (in terms of man hours) = 5 × 5 × 8  = 200 hours
Company B has 4 employees and each of them work 6 hours a day, Hence, work done per each day = 24
Therefore no.of days required to deliver 100 parcels = Number of days required to do 200 units of work = 200/24 = 8.33. Hence answer is a.

9. Consider two postmen A and B respectively. A is young and can deliver 20 parcels in 3 hours while B is older than A and can deliver only 15 parcels in 4 hours. If the total number of parcels to deliver is 60, how long they will take working together.
a. 121/12 hours
b. 144/36 hours
c. 144/25 hours
d. 121/25 hours
Sol:
Work done by 1st in 1  hour = 20/3 parcels / hour , Work done by 2nd om 1 hour = 15/4 parcels / hour
Total work done by both together per hour  = 20/3 + 15/4 = 125/12 parcels/hour
Time to do 60 unit work (ie, parcels)= 60 ÷ 125/12 = 60 × 12/125 = 144/25 hours.

10. A clock strikes every hour once at 1.00 twice at 2.00 and so on. the clock takes 6 seconds to strike 5.00 and 12 seconds to strike 9.00 the time needed to strike 1.00 is negligible. how long does the clock need for all its striking in 24 hours?
Sol:
The clock takes 12 secs to strike 9.00. So there are 8 gaps between 9 strikings. So the gap between the striking is 12/8 = 1.5 seconds.
To strike 2.00 it takes = 1.5 seconds.
To strike 3.00 it takes = 3 seconds.
To strike 4.00 it takes = 4.5 seconds
................
................
To strike 12.00 it takes = 16.5 seconds.
So it takes a total of 1.5 + 3 + 4.5 + . . . . . . + 16.5 = 1.5 ( 1 + 2 + 3 + .... + 11) = 99 seconds to strike 12 hours.
For 24 hours it takes 99 × 2 = 198 seconds.


120. The first republic day of the India was celebrated on 26th January,1950. It was
A. Monday
B. Wednesday
C. Thursday
D. Friday
sol:
1-1-1 AD fall on Monday. We calculate the number of odd days till 24th december, 1995.
Number of odd days till 1600 years = 0
1601 to 1700 = 5
1701 to 1800 = 5
1801 to 1900 = 5
49 years contains = 37 normal + 12 leap years =12 × 2 + 37 = 61 odd days = 61/7  = 5 odd days
25th January 1950 = 25/7 = 4 odd days
Total odd days =15 + 5 + 4 = 24/7 = 3 odd days
So 26th January,1950 is Thursday

12. On return from a business trip Mr. Chidambaram was to be picked up from the railway station by
his coachman. Someone he managed a train connection earlier and thus arrived two hours too early.
Immediately on arrived he rang up home for the coach and was told that it had just left in order to be
exactly in time for the train by which he was scheduled to come. To save the time he started walking
homeward at 3kmph. On the way he met the coachman who brought him home an hour before
schedule. How far is the Mr. Chidambaram’s house from the railway station?
a) 12 Km
b) 15 Km
c) 18 Km
d) 23 Km
Sol:
Very good questions. Appeared in Puzzles book of Ravi Nirula.
Let the train's correct time is 9.00 am. Now chidambaram reached the station at 7 am and he was informed that the coachman (car) left at 7 am. So car takes 2 hours to reach the station. This car expected to reach home at 11 am.
But the car after picking up chidambaram, reached home 1 hour early. i.e., 10 am. So car has travelled 3 hours and 1.5 hours towards the station. So it picked him up at 8.30 am. Car saved distance equivalent to 30 minutes. but this distance is covered by Chidambaram by walk. He took 1.5 hours to cover this distance.
So Car speed is 3 times that of his walking speed. Car speed = 3 × 3 = 9 km.
We know that car takes 2 hours to reach station. So the distance = 9 × 2 = 18 km.

13. Its not easy having a mathematics professor as a friend. When she invited you to her house she
says, “All the houses on my side of the street are numbered consecutively in even numbers. There are
Six houses on my Side of my block and sum of their numbers is 9870. You don’t know which block I
live on, and it’s a long street, but I will tell you that I live in the lowest number on my side of the block.  What’s the number? Or are you just going to ring the first- numbered doorbell for twenty blocks?
a) 1580
b) 1640
c) 1650
d) 1680
Sol:
Given all the number are even consecutive numbers. This is AP.
Formula for sum of numbers = Sn=n2[2a+(n1)d]
Sum = 9870, n = 6, d = 2
9870=62[2a+(61)2]
⇒ 9870 = 3 (2a + 10)
⇒ 9840 = 6a
⇒ a = 1640

14. A watch which gains uniformly is 2 minutes low at noon on Monday and is 4 min. 48 sec fast at 2 p.m. on the following Monday. When was it correct?
A. 2 p.m. on Tuesday
B. 2 p.m. on Wednesday
C. 3 p.m. on Thursday
D. 1 p.m. on Friday
Sol:
2 minutes slow at monday noon.
4 min 48 sec fast at 2 pm next monday.
It ran faster than normal time by 6 min 48 secs = 408 sec in 7 days 2 hours = 170 hours.
It was correct when it advanced 120 seconds than normal time.
The clock gains 408 seconds in 170 hours.
The clock gains 1 second in 170/408 hours
The clock gains 120 seconds in 170408×120 hours = 50 hours = 2 days 2 hours.
So the clock shows correct time on Wednesday 2 pm..

15. A clock is set at 5 a.m. The clock loses 16 minutes in 24 hours. What will be the true time when the clock indicates 10 p.m. on 4th day?
A. 9 p.m
B. 10 p.m
C. 11 p.m
D. 12 p.m
sol:
Time from 5 a.m. on a day to 10 p.m. on 4th day = 89 hours.
The faulty clock shows only 1424 min for 24 hours in correct clock.
So 1 minute of the faulty clock = 24/1424 hours
1 hour of the faulty clock = 24/1424 × 60 hours
89 hours of the faulty clock = 24/1424 × 60 × 89 = 90 hours.
So true time is 1 hour more than 10 pm. i.e., 11 pm.

16. On 8th march,2005,Wednesday falls.   What day of the week was it on 8th march,2004?
A. Monday
B. Tuesday
C. Wednesday
D. Friday
Sol:
Tuesday

17.Find the day of the week on 25th December,1995?
A. Monday
B. Wednesday
C. Friday
D. Sunday
Answer : A
Sol:
1-1-1 AD fall on Monday. We calculate the number of odd days till 24th december, 1995.
Number of odd days till 1600 years = 0
1601 to 1700 = 5
1701 to 1800 = 5
1801 to 1900 = 5
1901 to 1994 = 94 + 23 = 117
3 + 0 + 3 + 2 + 3 + 2 + 3 + 3 + 2 + 3 + 2 + 24 = 50
So total odd days = 182 = 0 odd days.
So 25th december 1995 also falls on Monday.

18. Today is Thursday. The day after 59 days will be?
A. Sunday 
B. Monday
C. Tuesday 
D. Wednesday
Sol:
59/7 = 3 is remainder
Thursday + 3 days = Sunday

19. Today is Wednesday what will be the day after 94 days ?
A. Monday
B. Tuesday
C. Wednesday
D. Sunday
Sol:
94/7= 13 weeks and 3 days
Today is Wednesday, after three days if you count-it is Saturday on 94th day
After 94th day, it is Sunday

Wednesday, March 16, 2016

Amcat Previous questions - 3

Amcat Previous questions - 3

For the following questions find the word which is similar to the sentence or word given. 


1. EGREGIOUS
A. pious
B. outrageous
C. anxious
D. sociable
E. gloomy
Answer: B
Explanation: 
Egregious means very bad or outrageous.  Pious means having belief in God.  Sociable means being friendly.  Gloomy means dull. 

2. GARNISH
A. paint
B. garner
C. adorn
D. abuse
E. banish
Answer: C
Explanation:
Garnish means decorate.  You hear this word mostly on TV in culinary episodes. After preparing  a dish the anchor says that you have to adorn this with badam or something to give some good taste or look!! Adorn is similar to this.  Garner means collect.  Abuse means criticize.  Banish means eradicate or remove. 

33. EMACIATED
A. garrulous
B. primeval
C. vigorous
D. disparate
E. thin

Answer: E
Explanation:
Emaciated means very thin or weak.  Garrulous means talkative or chatter box.  Primeval means earliest time in history.  Vigorous means intense.  Disparate means separate and cannot be compared.

4. 
Flowers and insects or anything lasting only for a day.
A. Transitional
B. Ephemeral
C. Transient
D. Transitory
E. Monumental

Answer: B
Explanation:
One word substitution for the above definition is Ephemeral.  Transient also similar.  But for flowers we can use ephemeral.  Transient smile means which lasts for short time.   Transitory is not permanent.  Monumental means something which is very important. 

5. The liberal school of thought trusts in education reform, and the sporadic use of force to remedy the depravity of certain isolated individuals
or groups.
A. Infrequent, irregular
B. Persistent, constant
C. Continuous
D. Sparing
E. Corrective and preventive both
Answer: A
Explanation:
Sporadic means happening at irregular intervals.  Persistent means stubborn which won't move.  Sparing means spending economically.  

6. He has got a meretricious style which does not produce a lasting effect.
A. Capricious
B. Whimsical
C. Flamboyant
D. Pretentious
E. Showily attractive
Answer: E
Explanation:
Meretricious means showy but has no real value.   Whimsical means something lasts for short time like fashion.  Flamboyant means having attraction due to their charm.  Pretentious means trying to attract others. 

7. His style is quite transparent.
A. verbose
B. involved
C. lucid
D. witty
Answer: C
Explanation:
Transparent means clear. So lucid is the synonym.  Verbose means using more words than necessary.
Witty remarks are using words in such a way that creates humor. 

8. Only those who are gullible take every advertisement seriously.
A. fallible
B. enthusiastic
C. unsuspecting
D. unrealistic
Answer: C
Explanation:
Gullible people are who easily believes everything. So unsuspecting is the right synonym.  Fallible means capable of making mistakes. 

9. We didn't believe in his statement, but subsequent events proved that he was right.
A. later
B. many
C. few
D. earlier
Answer: A

10. The angry villagers have lynched two suspected child-lifters already.
A. beaten up
B. captured
C. killed
D. mutilated
Answer: C
Lynch means killing without legal trial.  Mutilated means causing injury

Tuesday, March 15, 2016

Important C++ Interview Questions for Freshers

Important C++ Interview Questions for Freshers

   


1.What is difference between C and C++ ?
2. What is a class?
3. What is an Object/Instance?
4. What do you mean by C++ access specifiers ?
5. What are the basics concepts of OOP?
6. What is the use of volatile keyword in C++? Give an example.
7.What is the difference between an object and a class?
8.What is the difference between class and structure?
9.What is public, protected, private?
10.How variable declaration in C++ differs that in c ?
11.What are the C++ tokens ?
12.What is the difference between method overloading and method overriding?
13.What is constructors?
14.What is destructors?
15.Differentiate between a template class and class template ?
16.What is a Null object?
17.Can you handle exception in C++ ?
18.What is virtual function ?
19.What is the Standard Template Library?
20.What do you mean by static methods ?

Sunday, March 13, 2016

Core Java Common Interview Questions and Answers

Core Java Common Interview Questions and Answers

What is the difference between procedural and object-oriented programs?- a) In procedural program, programming logic follows certain procedures and the instructions are executed one after another. In OOP program, unit of program is object, which is nothing but combination of data and code. b) In procedural program, data is exposed to the whole program whereas in OOPs program, it is accessible with in the object and which in turn assures the security of the code.

What is the difference between Assignment and Initialization?- Assignment can be done as many times as desired whereas initialization can be done only once.

What is the difference between constructor and method?- Constructor will be automatically invoked when an object is created whereas method has to be called explicitly.

What is the difference between an argument and a parameter?- While defining method, variables passed in the method are called parameters. While using those methods, values passed to those variables are called arguments.

What is the difference between overloading and overriding?- a) In overloading, there is a relationship between methods available in the same class whereas in overriding, there is relationship between a superclass method and subclass method. b) Overloading does not block inheritance from the superclass whereas overriding blocks inheritance from the superclass. c) In overloading, separate methods share the same name whereas in overriding, subclass method replaces the superclass. d) Overloading must have different method signatures whereas overriding must have same signature.

What is the difference between this() and super()?- this() can be used to invoke a constructor of the same class whereas super() can be used to invoke a super class constructor. 

What is the difference between superclass and subclass?- A super class is a class that is inherited whereas sub class is a class that does the inheriting.

What is the difference between String and String Buffer?- a) String objects are constants and immutable whereas StringBuffer objects are not. b) String class supports constant strings whereas StringBuffer class supports growable and modifiable strings.

What is the difference between Array and vector?- Array is a set of related data type and static whereas vector is a growable array of objects and dynamic.

What is the difference between exception and error?- The exception class defines mild error conditions that your program encounters. Exceptions can occur when trying to open the file, which does not exist, the network connection is disrupted, operands being manipulated are out of prescribed ranges, the class file you are interested in loading is missing. The error class defines serious error conditions that you should not attempt to recover from. In most cases it is advisable to let the program terminate when such an error is encountered.

What is the difference between process and thread?- Process is a program in execution whereas thread is a separate path of execution in a program.

What is the difference between abstract class and interface?- a) All the methods declared inside an interface are abstract whereas abstract class must have at least one abstract method and others may be concrete or abstract. b) In abstract class, key word abstract must be used for the methods whereas interface we need not use that keyword for the methods. c) Abstract class must have subclasses whereas interface can’t have subclasses.

What is the difference between Integer and int?- a) Integer is a class defined in the java. lang package, whereas int is a primitive data type defined in the Java language itself. Java does not automatically convert from one to the other. b) Integer can be used as an argument for a method that requires an object, whereas int can be used for calculations.

What is the difference between choice and list?- A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices and only one item may be selected from a choice. A List may be displayed in such a way that several list items are visible and it supports the selection of one or more list items.

What is the difference between scrollbar and scrollpane?- A Scrollbar is a Component, but not a Container whereas Scrollpane is a Conatiner and handles its own events and perform its own scrolling.

What is the difference between applications and applets?- a)Application must be run on local machine whereas applet needs no explicit installation on local machine. b)Application must be run explicitly within a java-compatible virtual machine whereas applet loads and runs itself automatically in a java-enabled browser. d)Application starts execution with its main method whereas applet starts execution with its init method. e)Application can run with or without graphical user interface whereas applet must run within a graphical user interface.

What is the difference between set and list?- Set stores elements in an unordered way but does not contain duplicate elements, whereas list stores elements in an ordered way but may contain duplicate elements.

What is the difference between an applet and a servlet?- a) Servlets are to servers what applets are to browsers. b) Applets must have graphical user interfaces whereas servlets have no graphical user interfaces.

What is the difference between doPost and doGet methods?- a) doGet() method is used to get information, while doPost() method is used for posting information. b) doGet() requests can’t send large amount of information and is limited to 240-255 characters. However, doPost()requests passes all of its data, of unlimited length. c) A doGet() request is appended to the request URL in a query string and this allows the exchange is visible to the client, whereas a doPost() request passes directly over the socket connection as part of its HTTP request body and the exchange are invisible to the client.

What is the difference between TCP/IP and UDP?- TCP/IP is a two-way communication between the client and the server and it is a reliable and there is a confirmation regarding reaching the message to the destination. It is like a phone call. UDP is a one-way communication only between the client and the server and it is not a reliable and there is no confirmation regarding reaching the message to the destination. It is like a postal mail.

Saturday, March 12, 2016

TCS Technical Interview Experience - Questions Asked


TCS Technical Interview Experience - Questions Asked

Company Name:  TCS 

Technical round will be purely based on whatever you have mentioned in your resume and depends on your engineering branch if you're from computer science background be ready to face questions on C, C++, DBMS, Networking, Java, Data structure etc.
  1. What is the difference between C and C++?
  2. What is data abstraction?  what are the three levels of data abstraction with Example?
  3. What is Doubly link list?
  4. What is your strongest programming language (Java, ASP, C, C++, VB, HTML, C#, etc.)?
  5. What is rdbms?
  6. What are the two integrity rules used in DBMS?
  7. Differences between C and Java?
  8. What is command line argument?
  9. What are the different storage classes in C ?
  10. What does static variable mean? 
  11. Write a program using bubble sort?
  12. How do you print an address ?
  13. What is inner and outer join?
  14. What are macros? what are its advantages and disadvantages? 
  15. What is jdk, jvm?
  16. Difference between pass by reference and pass by value? 
  17. Write a program using linked list?
  18. What is an object?
  19. What is a class?
  20. What is the difference between class and structure?
  21. Tell me about your final year project?
  22. What is ponter?
  23. What is the difference between null and void pointer?
  24. What is cache memory ?
  25. What is debugger?
  26. What is Memory Alignment?   
  27. Explain the difference between 'operator new' and the 'new' operator?   
  28. Differentiate between Compiler and Interpreter? 
  29. Difference between delete and delete[]?     
  30. Const char *p , char const *p What is the difference between the above two?   
  31. Which header file should you include if you are to develop a function which can accept variable number of arguments?
  32. What is conversion constructor?    
  33. What is a spanning Tree?
  34. Explain recursive function & what is the data structures used to perform recursion?
  35. Why should we use data ware housing and how can you extract data for analysis with example?
  36. What is user defined exception in Java? 
  37. What is scope of a variable?
  38. What is java Applet?
  39. What do you know about the garbage collector? 
  40. What is an interrupt?
  41. Write a Binary Search program
  42. Applications Of B+ Tree?
  43. What is function overloading 
  44. What are enumerations?
  45. What is function overloading and operator overloading?
  46. What is static identifier?
  47. What is friend function?
  48. Tell me something about abstract classes?
  49. What is Cryptography?
  50. What is the difference between realloc( ) and free( )?
  51. What is encryption?
  52. What is the difference between an array and a list?
  53. What exactly is a digital signature?
  54. What is data structure?
  55. You know what is SAP?
  56. What are the differences between structures and arrays?
  57. What is decryption?
  58. What is oops?
  59. Can you list out the areas in which data structures are applied extensively?
  60. What is SDLC?
  61. Why the JAVA is more flexible then C++.
  62. What are the advantages of inheritance?
  63. Do you know in which language CS is developed?
  64. Can we do overloading in C++.
  65. Difference b/w 32 bits and 64 bits?
  66. Tell something about deadlock and how can we prevent dead lock?