Collection of Technical Interviews Questions

Collection of Technical Interviews Questions

1. You are given some long text string such as
“This text has many words. Which word occurs the most in the text?”

Write a program which finds the word that appears most frequently in the text. If there is a tie then your program must return the word that appear first in the text.
2. Given a set of banks (classes) each with a different function for updating an account, with possibly different parameters, how do you get a single function to call the appropriate method on each type.
3. Can a Java class have a data member of the same type as that Java class?
4. How does Java implement garbage collection?
5. How big is a reference in Java?
6. Given two long strings, find the largest common substring in O(n log n) time.
7. Given a histogram (height of each bar and the common width of all bars) find the biggest rectangle that can be drawn such that every point in the rectangle lies above a bar, that is, the rectangle only covers parts of the histogram and none of the background.
8. There are three pizzas: one burned on both sides, one burned on one side, one not burned. They are randomly stacked and you see that the side at the top is burned. What is the probability that the other side of the top is not burned?
9. Implement the software for a coke machine.
10. What is the difference between a class and an object?
11. You are given a function which generates a random number from the set 1,2,3,4,5 each with equal probability. Use this function to implement another function which generates a random number from the set 1,2,3,4,5,6,7 each with equal probability.
12. Imagine you have two marbles and a 100-story building. You are told that the marbles will break if they are dropped from a certain floor. Figure out a way, as effectivly as possible, how high you can drop the marbles before they break. Remember, it could be the 1st floor, it could be the 99th.
13. Let's say you have a computer with 2M RAM. This computer has a hard drive (with lots of free space) and a 100M file which you should sort. Let me know how you, as effectivly as possible, sort the file.
14. We take the computer from the previous question and replace the hard drive with a network adapter. You have no local storage but the RAM. You will receive one million eight-digit phone numbers through a TCP stream which you shall sort in RAM. You are now allowed to send any data before all the numbers have been sorted. How would you solve this?
15. Suppose I give you a phonebook and ask you for a name, how long would that take?

Thinkers - microsoft Interview questions

Thinkers - microsoft Interview questions
* How are M&Ms made?
* If you had a clock with lots of moving mechanical parts, you took it apart
piece by piece without keeping track of the method of how it was disassembled,
then you put it back together and discovered that 3 important parts were not
included; how would you go about reassembling the clock?
* If you had to learn a new computer language, how would you go about doing it?
* You have been assigned to design Bill Gates bathroom. Naturally, cost is not a
consideration. You may not speak to Bill.
* What was the hardest question asked of you so far today?
* If MS told you we were willing to invest $5 million in a start up of your
choice, what business would you start? Why?
* If you could gather all of the computer manufacturers in the world together
into one room and then tell them one thing that they would be compelled to do,
what would it be?
* Explain a scenario for testing a salt shaker.
* If you are going to receive an award in 5 years, what is it for and who is the
audience?
* How would you explain how to use Microsoft Excel to your grandma?
* Why is it that when you turn on the hot water in any hotel, for example, the
hot water comes pouring out almost instantaneously?
* Why do you want to work at Microsoft?
* Suppose you go home, enter your house/apartment, hit the light switch, and
nothing happens - no light floods the room. What exactly, in order, are the
steps you would take in determining what the problem was?
* Interviewer hands you a black pen and says nothing but "This pen
is red."

Applications-Microsoft interview questions

Applications-Microsoft interview questions
* How can computer technology be integrated in an elevator system for a hundred
story office building? How do you optimize for availability? How would
variation of traffic over a typical work week or floor or time of day affect
this?
* How would you implement copy-protection on a control which can be embedded in a
document and duplicated readily via the Internet?
* Define a user interface for indenting selected text in a Word document.
Consider selections ranging from a single sentence up through selections of
several pages. Consider selections not currently visible or only partially
visible. What are the states of the new UI controls? How will the user know
what the controls are for and when to use them?
* How would you redesign an ATM?
* Suppose we wanted to run a microwave oven from the computer. What kind of
software would you write to do this?
* What is the difference between an Ethernet Address and an IP address?
* How would you design a coffee-machine for an automobile.
* If you could add any feature to Microsoft Word, what would it be?
* How would you go about building a keyboard for 1-handed users?
* How would you build an alarm clock for deaf people?

Algorithms -Microsoft interview questions

Algorithms -Microsoft interview questions
* What's the difference between a linked list and an array?
* Implement a linked list. Why did you pick the method you did?
* Implement an algorithm to sort a linked list. Why did you pick the method you
did? Now do it in O(n) time.
* Describe advantages and disadvantages of the various stock sorting algorithms.
* Implement an algorithm to reverse a linked list. Now do it without recursion.
* Implement an algorithm to insert a node into a circular linked list without
traversing it.
* Implement an algorithm to sort an array. Why did you pick the method you did?
* Implement an algorithm to do wild card string matching.
* Implement strstr() (or some other string library function).
* Reverse a string. Optimize for speed. Optimize for space.
* Reverse the words in a sentence, i.e. "My name is Chris" becomes
"Chris is name My." Optimize for speed. Optimize for space.
* Find a substring. Optimize for speed. Optimize for space.
* Compare two strings using O(n) time with constant space.
* Suppose you have an array of 1001 integers. The integers are in random order,
but you know each of the integers is between 1 and 1000 (inclusive). In
addition, each number appears only once in the array, except for one number,
which occurs twice. Assume that you can access each element of the array only
once. Describe an algorithm to find the repeated number. If you used auxiliary
storage in your algorithm, can you find an algorithm that does not require it?
* Count the number of set bits in a number. Now optimize for speed. Now optimize
for size.
* Multiple by 8 without using multiplication or addition. Now do the same with 7.
* Add numbers in base n (not any of the popular ones like 10, 16, 8 or 2
-- I hear that Charles Simonyi, the inventor of Hungarian Notation, favors -2
when asking this question).
* Write routines to read and write a bounded buffer.
* Write routines to manage a heap using an existing array.
* Implement an algorithm to take an array and return one with only unique
elements in it.
* Implement an algorithm that takes two strings as input, and returns the
intersection of the two, with each letter represented at most once. Now speed
it up. Now test it.
* Implement an algorithm to print out all files below a given root node.
* Given that you are receiving samples from an instrument at a constant rate, and
you have constant storage space, how would you design a storage algorithm that
would allow me to get a representative readout of data, no matter when I looked
at it? In other words, representative of the behavior of the system to date.
* How would you find a cycle in a linked list?
* Give me an algorithm to shuffle a deck of cards, given that the cards are
stored in an array of ints.
* The following asm block performs a common math function, what is it?

cwd xor ax, dx
sub ax, dx

* Imagine this scenario:


I/O completion ports are communictaions ports which take handles to files,
sockets, or any other I/O. When a Read or Write is submitted to them, they
cache the data (if necessary), and attempt to take the request to completion.
Upon error or completion, they call a user-supplied function to let the users
application know that that particular request has completed. They work
asynchronously, and can process an unlimited number of simultaneous requests.


Design the implementation and thread models for I/O completion ports. Remember
to take into account multi-processor machines.
* Write a function that takes in a string parameter and checks to see whether or
not it is an integer, and if it is then return the integer value.
* Write a function to print all of the permutations of a string.
* Implement malloc.
* Write a function to print the Fibonacci numbers.
* Write a function to copy two strings, A and B. The last few bytes of string A
overlap the first few bytes of string B.
* How would you write qsort?
* How would you print out the data in a binary tree, level by level, starting at
the top?

Riddles-Microsoft Interview questions

Riddles-Microsoft Interview questions

* Why is a manhole cover round?
* How many cars are there in the USA? (A popular variant is "How many gas
stations are there in the USA?")
* How many manhole covers are there in the USA?
* You've got someone working for you for seven days and a gold bar to pay them.
The gold bar is segmented into seven connected pieces. You must give them a
piece of gold at the end of every day. If you are only allowed to make two
breaks in the gold bar, how do you pay your worker?
* One train leaves Los Angeles at 15mph heading for New York. Another train
leaves from New York at 20mph heading for Los Angeles on the same track. If a
bird, flying at 25mph, leaves from Los Angeles at the same time as the train
and flies back and forth between the two trains until they collide, how far
will the bird have traveled?
* Imagine a disk spinning like a record player turn table. Half of the disk is
black and the other is white. Assume you have an unlimited number of color
sensors. How many sensors would you have to place around the disk to determine
the direction the disk is spinning? Where would they be placed?
* Imagine an analog clock set to 12 o'clock. Note that the hour and minute hands
overlap. How many times each day do both the hour and minute hands overlap? How
would you determine the exact times of the day that this occurs?
* You have two jars, 50 red marbles and 50 blue marbles. A jar will be picked at
random, and then a marble will be picked from the jar. Placing all of
the marbles in the jars, how can you maximize the chances of a red marble being
picked? What are the exact odds of getting a red marble using your scheme?
* Pairs of primes separated by a single number are called prime pairs. Examples
are 17 and 19. Prove that the number between a prime pair is always divisible
by 6 (assuming both numbers in the pair are greater than 6). Now prove that
there are no 'prime triples.'
* There is a room with a door (closed) and three light bulbs. Outside the room
there are three switches, connected to the bulbs. You may manipulate the
switches as you wish, but once you open the door you can't change them.
Identify each switch with its bulb.
* Suppose you had 8 billiard balls, and one of them was slightly heavier, but the
only way to tell was by putting it on a scale against another. What's the
fewest number of times you'd have to use the scale to find the heavier ball?
* Imagine you are standing in front of a mirror, facing it. Raise your left hand.
Raise your right hand. Look at your reflection. When you raise your left hand
your reflection raises what appears to be his right hand. But when you tilt
your head up, your reflection does too, and does not appear to tilt his/her
head down. Why is it that the mirror appears to reverse left and right, but not
up and down?
* You have 4 jars of pills. Each pill is a certain weight, except for
contaminated pills contained in one jar, where each pill is weight + 1. How
could you tell which jar had the contaminated pills in just one measurement?
* The SF Chronicle has a word game where all the letters are scrambled up and you
have to figure out what the word is. Imagine that a scrambled word is 5
characters long:
1. How many possible solutions are there?
2. What if we know which 5 letters are being used?
3. Develop an algorithm to solve the word.
* There are 4 women who want to cross a bridge. They all begin on the same side.
You have 17 minutes to get all of them across to the other side. It is night.
There is one flashlight. A maximum of two people can cross at one time. Any
party who crosses, either 1 or 2 people, must have the flashlight with them.
The flashlight must be walked back and forth, it cannot be thrown, etc. Each
woman walks at a different speed. A pair must walk together at the rate of the
slower woman's pace.

Woman 1: 1 minute to cross


Woman 2: 2 minutes to cross


Woman 3: 5 minutes to cross


Woman 4: 10 minutes to cross

For example if Woman 1 and Woman 4 walk across first, 10 minutes have elapsed
when they get to the other side of the bridge. If Woman 4 then returns with the
flashlight, a total of 20 minutes have passed and you have failed the mission.
What is the order required to get all women across in 17 minutes? Now, what's
the other way?
* If you had an infinite supply of water and a 5 quart and 3 quart pail, how
would you measure exactly 4 quarts?
* You have a bucket of jelly beans. Some are red, some are blue, and some green.
With your eyes closed, pick out 2 of a like color. How many do you have to grab
to be sure you have 2 of the same?
* If you have two buckets, one with red paint and the other with blue paint, and
you take one cup from the blue bucket and poor it into the red bucket. Then you
take one cup from the red bucket and poor it into the blue bucket. Which bucket
has the highest ratio between red and blue? Prove it mathematically.

What is pickling and unpickling in Python

Python has a standard module known as Pickle which enables you to store a specific object at some destination and then you can call the object back at later stage. While you are retrieving the object this process is known as unpickling. By specifying the dump function you can store the data into a specific file and this is known as pickling.

Explain about repr function in Python

This function is used to obtain a string representation of an object. This function helps you in obtaining a printable representation of the object. This function also makes it possible to obtain specific return from the object. This can be made possible by specifying the repr method in the class.

Explain about assert statement in python

Assert statement is used to assert whether something is true or false. This statement is very useful when you want to check the items in the list for true or false function. This statement should be predefined because it interacts with the user and raises an error if something goes wrong.

What is a Lambda form in Python

What is a Lambda form in Python
This lambda statement is used to create a new function which can be later used during the run time. Make_repeater is used to create a function during the run time and it is later called at run time. Lambda function takes expressions only in order to return them during the run time.

Explain about raising error exceptions in Python

In python programmer can raise exceptions using the raise statement. When you are using exception statement you should also specify about error and exception object. This error should be related to the derived class of the Error. We can use this to specify about the length of the user name, password field, etc.

Explain about indexing and slicing operation in sequences in Python

Explain about indexing and slicing operation in sequences in Python
Tuples, lists and strings are some examples about sequence. Python supports two main operations which are indexing and slicing. Indexing operation allows you to fetch a particular item in the sequence and slicing operation allows you to retrieve an item from the list of sequence. Python starts from the beginning and if successive numbers are not specified it starts at the last. In python the start position is included but it stops before the end statement.

Explain about the dictionary function in Python?

Explain about the dictionary function in Python?
A dictionary is a place where you will find and store information on address, contact details, etc. In python you need to associate keys with values. This key should be unique because it is useful for retrieving information. Also note that strings should be passed as keys in python. Notice that keys are to be separated by a colon and the pairs are separated themselves by commas. The whole statement is enclosed in curly brackets.

Libraries of Python?

Python library is very huge and has some extensive libraries. These libraries help you do various things involving CGI, documentation generation, web browsers, XML, HTML, cryptography, Tk, threading, web browsing, etc. Besides the standard libraries of python there are many other libraries such as Twisted, wx python, python imaging library, etc.

Does python support object oriented scripting?

Does python support object oriented scripting?
Python supports object oriented programming as well as procedure oriented programming. It has features which make you to use the program code for many functions other than Python. It has useful objects when it comes to data and functionality. It is very powerful in object and procedure oriented programming when compared to powerful languages like C or Java.

How is python interpreted?

How is python interpreted?
Python has an internal software mechanism which makes your programming easy. Program can run directly from the source code. Python translates the source code written by the programmer into intermediate language which is again translated it into the native language of computer. This makes it easy for a programmer to use python.

Some features of Python?

Some features of Python?
Python supports many features and is used for cutting edge technology.
Some of them are
1) A huge pool of data types such as lists, numbers and dictionaries.
2) Supports notable features such as classes and multiple inheritance.
3) Code can be split into modules and packages which assists in flexibility.
4) It has good support for raising and catching which assists in error handling.
5) Incompatible mixing of functions, strings, and numbers triggers an error which also helps in good programming practices.
6) It has some advanced features such as generators and list comprehensions.
7) This programming language has automatic memory management system which helps in greater memory management.

Explain about the use of python for web programming?

Explain about the use of python for web programming?
Python can be very well used for web programming and it also has some special features which make you to write the programming language very easily. Some of the features which it supports are Web frame works, Cgi scripts, Webservers, Content Management systems, Web services, Webclient programming, Webservices, etc. Many high end applications can be created with Python because of the flexibility it offers.

Explain about the getElementsByTagName and parseResults function in Ajax

Explain about the getElementsByTagName and parseResults function in Ajax
You use the tag method to retrieve all the property elements in the XML document as an array and assign the array to the local variable properties. Once you have the array of property elements you can iterate over each element in the array and retrieve the data. With parseResultsfunction you can get the next element in the array and assign it to the local property.

Explain about clearPreviousResults in Ajax

Explain about clearPreviousResults in Ajax
The clearPreviousResults function performs two tasks removing the results header task that appears at the top and clearing any rows from the results table. The nest task is to clearPreviousResults is to delete any rows that may already be in the table displaying the search results. Any results rows are child nodes of the tbody node.

Explain about security of the Ajax based web applications?

Explain about security of the Ajax based web applications?
The XMLHttpRequest object is subjected to the browsers security sandbox. Any resources requested by the XMLHttpRequest object must reside within the same domain from which the calling script originated from which the calling script requested. XMLHttpRequest cannot request services due to security restriction, outside the domain from which the script was originally served.

Difference between GET and POST in ajax

Difference between GET and POST in ajax
You would use GET when the request is idempotent, meaning that multiple requests generate the same result. In general use GET to retrieve data from the server, in other words try to change the state on the server with a GET call. Use POST methods anytime you are changing the state on the server with a GET call. In POST you are required to set the content-Type header on the XMLHttpRequest.

Disadvantage of ajax related to browser integration?

Disadvantage of ajax related to browser integration?
Dynamically created pages created by ajax does not support back button which takes the user to the previous pages. There are various solutions to this problem out of which one solution is to use iframes. Also users can bookmark a certain application in its state. User can maintain the applications as the state of the application changes

What does an ajax component frameworks provides?

The following features are provided for ajax component frameworks. They are
Cusomization Applications, skinning facilities, extensibility and programmatic control.
These functions are very rich in application but they are a bit slower in execution with less control.

Explain about direct ajax frameworks?

Explain about direct ajax frameworks?
Direct ajax frameworks require CSS, HTML and ajax expertise. Authoring should be done in HTML and framework directly deals with HTML elements. Many of the frameworks and API`s are provided are many purposes such as commonly including functions (COM), event handling, DOM, and altering graphic rich elements. These frameworks are used for shopping frameworks but not for web based applications.

Multimedia functions of Ajax

Multimedia functions of Ajax
Ajax lacks built in multimedia functions. It is not so supportive of inbuilt applications but uses other browser functionalities and plugin`s such as SVG, Quicktime and flash pugin. General multimedia for ajax is achieved through mashup and hack. These multimedia functions can be obtained from outside which helps in building excellent applications.

Explain about web analytics problem with Java?

Explain about web analytics problem with Java?
Many search engines load a new page whenever new or updated content is loaded in the website. Whenever there is a check out or content updation websites load giving the scope for search engines to index the new content or updation. Ajax alters the process of indexing because it is unable to track new content addition.

How friendly Ajax is with SEO?

How friendly Ajax is with SEO?
Ajax is a combination of many languages and it is not so friendly with search engine indexing because it uses Javascript for much part of its code. This problem occurs with websites which have dynamic data present in it. Search engines generally do not index Javascript present in web pages. Careful indexing should be done where there is dynamic data and presence of javascript.

If there is an input in the text field what are all the functions which get executed in Ajax

If there is an input in the text field what are all the functions which get executed in Ajax
The following functions are executed when there is an input in the text field.
1) Defines the url which we should be sent to the server
2) A parameter is added to the content of the input field.
3) A parameter is added to prevent the server from the cache.
4) When a change is triggered statechange is executed
5) An XMLHTTP object with a given URL gets executed
6) A request to the server is sent through HTTP.

Explain about sending a request to the server in ajax

Explain about sending a request to the server in ajax
To send a request to the server we should use the open () and send () method. Open() method has three arguments of which the first one defines which method to use which would help in sending the request. The second argument explains about the URL of the server side script. The third argument or request determines how the request should be handled whether asynchronously or not. Send () method is useful to send a request to the server to determine functionality.

Readystate property in Ajax

Readystate property in Ajax
Readystate property holds the response of the server to the query generated from the client side. Each time the readystate property changes onreadystatechange function will be executed. Some of the values for the readystate property are as follows if the status is zero the request is not initialized, 1 the request has been set up, 2 the request has been sent, 3 the request is in process, 4 the request is complete.

Onreadystatechange property in Ajax

Onreadystatechange property in Ajax
Onreadystatechange property is very useful in Ajax. It stores information received from the client. It stores the function which can process the request generated from the client side in the server thereby reducing the time lag and increasing the efficiency of the process.

Response time when we are using Ajax?

Response time when we are using Ajax?
Response time is also known as latency which can be described as the time taken or interval between the time taken to process the request generated from the client on the server. Proper handling of the XMLHttprequestobject might be the cause for some delays between the client and server request.

Explain a bout Web page?And Different Web languages and Purpose -Ajax interview

Explain a bout Web page?And Different Web languages and Purpose -Ajax interview
Some of the languages which are used in the combination of the webpage are.
1) Javascript will be present on the client browser
2) For client to server combinations following languages are used such as standard HTTP and XMLHTTP.
3) Server side scripting is used whenever there is a request from the client side. This server side scripting can use any preferred language for working in the back end.
4) Different languages and features are present which can help the client and solve the problem.

What is Ajax?

What is Ajax?
Ajax has culmination of languages such as asynchronous java script and XML. This has interrelated web development languages which help in creating outstanding web pages. This language is used in increasing server’s responsiveness due to client side responsiveness. This increases the speed, functionality, responsiveness, and usability. This technology helps in loading the content behind the scene which will not affect the front side of the language.

MySQL Interview Faqs,My sql interview questions and answers

MySQL Interview questions and answers
What is MySQL ?
MySQL (pronounced "my ess cue el") is an open source relational database management system (RDBMS) that uses Structured Query Language (SQL), the most popular language for adding, accessing, and processing data in a database. Because it is open source, anyone can download MySQL and tailor it to their needs in accordance with the general public license. MySQL is noted mainly for its speed, reliability, and flexibility. ...

What is DDL, DML and DCL ?

If you look at the large variety of SQL commands, they can be divided into three large subgroups. Data Definition Language deals with database schemas and descriptions of how the data should reside in the database, therefore language statements like CREATE TABLE or ALTER TABLE belong to DDL. DML deals with data manipulation, and therefore includes most common SQL statements such SELECT, INSERT, etc. Data Control Language includes commands such as GRANT, and mostly concerns with rights, permissions and other controls of the database system.

How do you get the number of rows affected by query?
SELECT COUNT (user_id) FROM users would only return the number of user_id’s.

If the value in the column is repeatable, how do you find out the unique values?

Use DISTINCT in the query, such as SELECT DISTINCT user_firstname FROM users; You can also ask for a number of distinct values by saying SELECT COUNT (DISTINCT user_firstname) FROM users;

How do you return the a hundred books starting from 25th?
SELECT book_title FROM books LIMIT 25, 100. The first number in LIMIT is the offset, the second is the number.

You wrote a search engine that should retrieve 10 results at a time, but at the same time you’d like to know how many rows there’re total. How do you display that to the user?

SELECT SQL_CALC_FOUND_ROWS page_title FROM web_pages LIMIT 1,10; SELECT FOUND_ROWS(); The second query (not that COUNT() is never used) will tell you how many results there’re total, so you can display a phrase "Found 13,450,600 results, displaying 1-10". Note that FOUND_ROWS does not pay attention to the LIMITs you specified and always returns the total number of rows affected by query.

How would you write a query to select all teams that won either 2, 4, 6 or 8 games?
SELECT team_name FROM teams WHERE team_won IN (2, 4, 6, 8)

How would you select all the users, whose phone number is null?

SELECT user_name FROM users WHERE ISNULL(user_phonenumber);

What does this query mean: SELECT user_name, user_isp FROM users LEFT JOIN isps USING (user_id) ?

It’s equivalent to saying SELECT user_name, user_isp FROM users LEFT JOIN isps WHERE users.user_id=isps.user_id

How do you find out which auto increment was assigned on the last insert?

SELECT LAST_INSERT_ID() will return the last value assigned by the auto_increment function. Note that you don’t have to specify the table name.

What does –i-am-a-dummy flag to do when starting MySQL?

Makes the MySQL engine refuse UPDATE and DELETE commands where the WHERE clause is not present.

On executing the DELETE statement I keep getting the error about foreign key constraint failing. What do I do?

What it means is that so of the data that you’re trying to delete is still alive in another table. Like if you have a table for universities and a table for students, which contains the ID of the university they go to, running a delete on a university table will fail if the students table still contains people enrolled at that university. Proper way to do it would be to delete the offending data first, and then delete the university in question. Quick way would involve running SET foreign_key_checks=0 before the DELETE command, and setting the parameter back to 1 after the DELETE is done. If your foreign key was formulated with ON DELETE CASCADE, the data in dependent tables will be removed automatically.

When would you use ORDER BY in DELETE statement?

When you’re not deleting by row ID. Such as in DELETE FROM techpreparation_com_questions ORDER BY timestamp LIMIT 1. This will delete the most recently posted question in the table techpreparation_com_questions.

How can you see all indexes defined for a table?

SHOW INDEX FROM techpreparation_questions;

How would you change a column from VARCHAR(10) to VARCHAR(50)?
ALTER TABLE techpreparation_questions CHANGE techpreparation_content techpreparation_CONTENT VARCHAR(50).

How would you delete a column?
ALTER TABLE techpreparation_answers DROP answer_user_id.

Advantages of VIEW? -DBA interview

Advantages of Views
Answer :- To protect some of the columns of a table from other users. - To hide complexity of a query. - To hide complexity of calculations.

Can we update/insert/delete a view? If Yes - under what conditions?-DBA

Can we update/insert/delete a view? If Yes - under what conditions?
Answer :A View can be updated/deleted/inserted if it has only one base table if the view is based on columns from one or more tables then insert, update and delete is not possible.

Naming Conventions for symbian

Correct Symbian vaiable naming:
i-prefix for member variables
a-prefix for method parameters.
C-prefix for classes that should be constructed on the heap.
T-prefix for classes that can fit on the stack.
L-postfix for methods that can leave.

Describe some common design patterns

Describe some common design patterns
Creational Patterns
Abstract Factory Creates an instance of several families of classes
Builder Separates object construction from its representation
Factory Method Creates an instance of several derived classes
Prototype A fully initialized instance to be copied or cloned
Singleton A class of which only a single instance can exist
Structural Patterns
Adapter Match interfaces of different classes
Bridge Separates an object’s interface from its implementation
Composite A tree structure of simple and composite objects
Decorator Add responsibilities to objects dynamically
Façade A single class that represents an entire subsystem
Flyweight A fine-grained instance used for efficient sharing
Proxy An object representing another object
Behavioral Patterns
Chain of Resp. A way of passing a request between a chain of objects
Command Encapsulate a command request as an object
Interpreter A way to include language elements in a program
Iterator Sequentially access the elements of a collection
Mediator Defines simplified communication between classes
Memento Capture and restore an object's internal state
Observer A way of notifying change to a number of classes
State Alter an object's behavior when its state changes
Strategy Encapsulates an algorithm inside a class
Template Method Defer the exact steps of an algorithm to a subclass
Visitor Defines a new operation to a class without change

What are the different diagrams in UML? What are they used for?

What are the different diagrams in UML? What are they used for?
Use case diagram: The use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as "actors" and the processes are called "use cases." The use case diagram shows which actors interact with each use case.
Class diagram: The class diagram is used to refine the use case diagram and define a detailed design of the system. The class diagram classifies the actors defined in the use case diagram into a set of interrelated classes. The relationship or association between the classes can be either an "is-a" or "has-a" relationship. Each class in the class diagram may be capable of providing certain functionalities. These functionalities provided by the class are termed "methods" of the class. Apart from this, each class may have certain "attributes" that uniquely identify the class.
Object diagram: The object diagram is a special kind of class diagram. An object is an instance of a class. This essentially means that an object represents the state of a class at a given point of time while the system is running. The object diagram captures the state of different classes in the system and their relationships or associations at a given point of time.
State diagram: A state diagram, as the name suggests, represents the different states that objects in the system undergo during their life cycle. Objects in the system change states in response to events. In addition to this, a state diagram also captures the transition of the object's state from an initial state to a final state in response to events affecting the system.
Activity diagram: The process flows in the system are captured in the activity diagram. Similar to a state diagram, an activity diagram also consists of activities, actions, transitions, initial and final states, and guard conditions.
Sequence diagram: A sequence diagram represents the interaction between different objects in the system. The important aspect of a sequence diagram is that it is time-ordered. This means that the exact sequence of the interactions between the objects is represented step by step. Different objects in the sequence diagram interact with each other by passing "messages".
Collaboration diagram: A collaboration diagram groups together the interactions between different objects. The interactions are listed as numbered interactions that help to trace the sequence of the interactions. The collaboration diagram helps to identify all the possible interactions that each object has with other objects.
Component diagram: The component diagram represents the high-level parts that make up the system. This diagram depicts, at a high level, what components form part of the system and how they are interrelated. A component diagram depicts the components culled after the system has undergone the development or construction phase.
Deployment diagram: The deployment diagram captures the configuration of the runtime elements of the application. This diagram is by far most useful when a system is built and ready to be deployed.”

Google Interview Questions for AdWords Associate

Google Interview Questions for AdWords Associate
1)How would you work with an advertiser who was not seeing the benefits of the AdWords relationship due to poor conversions?
2)How would you deal with an angry or frustrated advertisers on the phone?

Google Interview Questions for Engineering Manager

Google Interview: Engineering Manager

1)You're the captain of a pirate ship, and your crew gets to vote on how the gold is divided up. If fewer than half of the pirates agree with you, you die. How do you recommend apportioning the gold in such a way that you get a good share of the booty, but still survive?

How to avoid slack byte Problem? Padding problem in structure

How to avoid slack problem?Padding problem
Example:-
If structure is like this below
struct word1
{
char a;
int b;
char c;
};

it has slack(padding) byte as below


To avoid it structure should be rearranged as example 2
strcut word2
{
char a;
char b;
int c;

};

First of all char a will reserve two byte and store the data in only first byte .Now char b will search one byte and one byte is available so it will store the data in that byte. Now int c will reserve two byte and store the data in both two bytes. Now there is not any slack byte and we have saved wastage of memory and structure word2 is balance.

(Before executing this program first go to option menu then compiler then code generation then select word alignment then press OK)

Program:

void main()
{
struct word1
{
char a;
int b;
char c;
} ;
struct word2
{
char a;
char b;
int c;
};
clrscr();
printf("%d\t%d",sizeof(struct word1),sizeof(struct word2));

getch();
}
Output: 6 4

What is slack byte?

What is slack byte?
Ans:
To store any type of data in structure there is minimum fixed byte which must be reserved by memory. This minimum byte is known as word boundary. Word boundary depends upon machine. TURBO C is based on 8086 microprocessor which has two byte word boundary. So any data type reserves at least two byte space.
Suppose a structure word1:

struct word1
{
char a;
int b;
char c;
};

We cannot assign diffrent type structure to other structure ?Why?

Structure Assignment to other of different type
If there are two variable of same structure then we can assign value of one structure variable to another structure variable like normal variable but if there is two structure variable of two similar type of structure then we cannot assign one variable to another variable.
Example:
void main()
{
int i,j;
struct book
{
char *title;
float price;
};
struct magazine
{
char *title;
float price;
};
struct book book1={"Programming",40.50},book2;
struct magazine magazine1;
book2=book1;
clrscr();
printf("%s\t%f",book2.title,book2.price);

/* magazine1=book1; // It is wrong
printf("%s\t%f",magazine1.title,magazine1.price); */
getch();
}
Output: Programming 40.500000

Program:
void main()
{
int i,j;
struct book
{
char *title;
float price;
};
struct book book1={"Programming",40.50},book2;
book2=book1;
if(book1==book2)
prinf("I Don't know structure");
else
printf("I Know structure");
getch();
}
Output: Compiler error

How to access the structure members?

How to access the structure members?
Ans:We can access the structure member with the help of . or -> operator.
First declare any structure variable:
struct book list;
Now to access any member variable write :
Structure.variable .member_variable

Example
list.title=”C programming”;
list.price=300.0;
If structure variable is pointer type then use ->
Example:
struct *list;
list->title=”C programming”;
list->price=300.0;
note : -> is similar to (*) . so you can write (*list).price=300.0;
Instead of writing srtuct book we can give a simple name by typedef keyword
e.g

typedef struct book BOOK;
BOOK *list;
list->page=400;
Or
(*list).page=400;
Member of structure are bounded to each other i.e if we sort only one member like year then automatically other member variable like title, price etc will sort.
Program:
void main()
{
int i,j;
struct book
{
char *title;
int page;
int pub_year;
float price;
};
struct book list[3],k;
//inserting the data
list[0].title="C programming";
list[0].page=300;
list[0].pub_year=1965;
list[0].price=410;
list[1].title="C coding";
list[1].page=270;
list[1].pub_year=1802;
list[1].price=200;
list[2].title="Advance c";
list[2].page=410;
list[2].pub_year=1993;
list[2].price=600;
//output before sorting
clrscr();
printf("TITLE\t\tPAGE\tPUB.\tPRICE\n\n");
for(i=0;i<3;i++)>//only sorting of page
for(i=0;i<3;i++) j="0;jlist[j+1].page)
{
k=list[j];
list[j]=list[j+1];
list[j+1]=k;
}
}
}
printf("After sorting of only page\n\n\n");
for(i=0;i<3;i++)>
Output:

What is structure in C programming?

Structure
Structure is user defined data type .It is tool by which we can store the data of different type like int ,float, char etc in single record. In array we can store only same type of data but structure encapsulates different data type variable in single record.
Syntax:
Struct [struct_type_name]
{
[type variable_name [,variable_name, …]];
[type variable_name [,variable_name, …]];
[type variable_name [,variable_name, …]];
………………………………………………….
………………………………………………….
} [structure_variable_name];
Here label which has written inside the [ ] are optional.
Example:
struct book
{
char *title;
int page;
int pub_year;
float price;
}book1,book2;

Aptitude test on Ratio and Proportion-Written test interview questions

Ratio and Proportion Questions
QUESTION:
A bag contains an equal number of one rupee, 50 paise and 25 paise coins respectively. If the total value is Rs35, how many coins of each type are there?


QUESTION:
A bag contains rupee, 50-paise and 25-paise coins in the ratio 5:7:9. If the total amount in the bag is Rs430, find the number of coins of each kind.


QUESTION:
One man adds 5litres of water to 15litres of milk and another 6litres of water to 12litres of milk. What is the ratio of the strength of milk in the two mixtures?


QUESTION:
Two vessels contain equal quantity of mixtures of milk and water in the ratio 3:2 and 4:1 respectively. Both the mixtures are now mixed thoroughly. Find the ratio of milk to water in the new mixture so obtained.


QUESTION:
The contents of two vessels containing water and milk are in the ratio 1:2 and 2:5 are mixed in the ratio 1:4. The resulting mixture will have water and milk in the ratio-



QUESTION:
The sum of three numbers is 98. If the ratio between the first and second be 2:3 and that between the second and third be 5: 8, then find the second number.


QUESTION:
In 44litres of milk and water the ratio of milk and water is 6:5. How much water should be added to the mixture so that the ratio of milk to water becomes 2:3?



QUESTION:
A mixture contains milk and water in the ratio of 9:4. On adding 4litres of water, the ratio of milk to water becomes 3:2. Find the total quantity of the original mixture.


QUESTION:
The ratio between two numbers is 3:4. If each number be increased by 4, the ratio becomes 5:6. Find the numbers.


Instead of walking along two adjacent sides of a rectangular field, a boy took a short cut along the diagonal and saved a distance equal to half of the longer side. Then the ratio of the shorter side to the longer side is:
(a) ½
(b) 2/3
(c) ¼
(d) ¾

Ajay, Bijay, Chinmaya and Dhananjaya bought a motor bike for Rs60,000. Ajay paid half of the sum of the amounts paid by the other boys, Bijay paid one-third of the sum of the amount paid by the other boys; and Chinmaya paid one-fourth of the sum of the amounts paid by one the other boys. How much did Dhananjaya has to pay?
15000
13000
17000
None of these

A piece of string is 40 centimeters long. It is cut in to three pieces. The longest piece is 3 times as long as the middle sized and the shortest piece is 23 centimeters shorter than the longest piece. Find the length of the shortest piece.(in cm)
(a)27
(b) 5
(c) 4
(d) 9

Fresh grapes contain 90% water by weight while dried grapes contain 20% water by weight. What is the weight of the dry grapes available from 20kg of fresh grapes?
(a)2kg
(b) 2.4kg
(c) 2.5kg
(d) None of these

You can collect rubies & emeralds as many as you can. Each ruby is of Rs4 crore & each emerald is of Rs5crore. Each ruby weighs 0.3 kg and each emerald weighs 0.4kg. Your bag can carry at the most 12kg. What you should collect to get the maximum wealth?
(a) 20 rubies & 15 emeralds
(b) 40 rubies
(c) 28 rubies 9 emeralds
(d) None of these

A student gets an aggregate of 60% marks in five subjects in the ratio 10:9:8:7:6. If the passing marks are 50% of the maximum marks and each subject has the same maximum marks, in how many subjects did he pass the examination?
(a) 2
(b) 3
(c) 4
(d) 5

A dealer buys dry fruits at Rs100, Rs80 & Rs60 per kilogram. He mixes them in the ratio 3:4:5 by weight, and sells at a profit of 50%. At what price per kilogram does he sell the dry fruit?
(a) Rs80
(b) Rs100
(c) Rs95
(d) None of these

The cost of diamond varies directly as the square of its weight. Once, this diamond broke in to four pieces with weights in the ratio 1:2:3:4. When the pieces were sold, the merchant got Rs70,000 less. Find the original price of the diamond.
(a)1.4lakh
(b) Rs2lakh
(c) Rs1lakh
(d) Rs2.1lakh

A man buys spirit at Rs60 per litre, adds water to it and then sells it at Rs75 per litre. What is the ratio of spirit to water if his profit in the deal is 37.5%?
(a) 9:1
(b) 10:1
(c) 11:1
(d) None of these

From each of two given numbers, half the smaller number is subtracted. Of the resulting numbers the larger one is three times as large as the smaller. What is the ratio of the two numbers?
(a)2:1
(b) 3:1
(c)3:2
(d) None of these

Aptitude test on profit and loss-Written test questions

Profit and Loss Test
QUESTION:
A person bought an article for Rs250.For how much should he sell it so as to gain 10%?
(A) Rs275
(B) Rs280
(C) Rs300
(D) None of these
QUESTION:
If by selling an article for Rs390 a shopkeeper gains 20%, find his cost price.
(A) Rs325
(B) Rs350
(C) Rs400
(D) None of these
QUESTION:
A machine is sold for Rs5060 at a gain of 10%.What would have been the gain or loss percent if it had been sold for Rs4370?
(A)
QUESTION:
I sold a book at a profit of 12%. Had I sold it for Rs18 more,18% profit would have been gained. Find the cost price.
QUESTION:
A person sells an article at a profit of 10%. If he had bought it at 10% less and sold it for Rs3 more, he would have gained 25%.Find the cost price.
QUESTION:
A person purchased a certain number of articles at 11 for Rs10 and sold them at 10 for Rs11. Find his profit or loss%.
QUESTION:
A person purchased a certain number of articles at 4 for a rupee and the same number of article for 5 for a rupee. He mixed them together and sold them at 4 for a rupee. Find his profit or loss%.
QUESTION:
A dishonest dealer professes to sell his goods at the cost price, but uses a false weight of 800gms for a kg weight. Find his profit%.
QUESTION:
A dishonest dealer professes to sell his goods at 10% less on cost price but uses a false weight of 800gms for a kg weight. Find his profit or loss%.
QUESTION:
A dishonest dealer professes to sell his goods at 25% above on cost price but uses a false weight of 1200gms for a kg weight. Find his profit or loss%.
QUESTION:
A person sold an article for Rs144 and got a profit percentage equal to the cost price. Find the cost price.
QUESTION:
A dealer sold an article at a loss of 2.5%. Had he sold it for Rs100 more, he would have gained 7.5%? For what value should he sell it in order to gain 12.5%?
QUESTION:
The cost price of 20 articles is equal to the selling price of 15 articles. Find the profit or loss percent.
QUESTION:
By selling 80metres of cloth a merchant gets the profit of the selling price of 20metres of cloth. Find his profit%.
QUESTION:
A whole seller sells 30 pens for the price of 27 pens to a retailer. The retailer sells the pens at the marked price. Find the percent of profit of the retailer.
QUESTION:
If goods are purchased for Rs840 and one-fourth is sold at a loss of 20%, at what gain percent should the remainder be sold so as to gain 20% on the whole transaction?
QUESTION:
2/3 of a consignment was sold at 6% profit and the rest at a loss of 3%. If there was an overall profit of Rs540, find the value of the consignment.
QUESTION:
A reduction of 10% in the price of sugar enables a person to obtain 25kg more for Rs5000. What is the reduction price per kg? Find also the original price per kg.
QUESTION:
A tradesman marks his goods at 25% above his cost price and allows purchasers a discount of 12.5% for cash payment. What profit % does he make?
QUESTION:
A trader allows a discount of 5% for cash payment. How much % above the cost price must he marks his goods to make a profit of 10%?
QUESTION:
A man buys two horses for Rs1350. He sells one so as to lose 6% and the other so as to gain 7.5%. On the whole he neither gains nor loses. What does each horse cost?
QUESTION:
If a person sells two watches for Rs1000 each, gaining 15% on one and losing 15% on the other, find his total gain or loss.
QUESTION:
A hawker sells oranges at a profit of 25 per cent. If he increases the selling price of each orange by 30 paisa, he earns a profit of 40%. Find the cost price and the initial selling price of each orange.
A.Rs2.00, Rs3.00
B.Rs2.00, Rs2.50
C.Rs2.00, Rs4.00
D.Rs2.50, Rs3.00

Solution
Let cost price = 100/-
Profit of 25% = Rs.125
After increasing the S.P of each orange, he earns a profit of 40%
So, profit = 140 /-
Initially profit is Rs.125/-
Different between the profits = 15
For 15 = 30 times
For 1 = 2 times
So initial S.P = Rs.125 * 2 = Rs.250
And C.P = Rs.100 * 2 = Rs.200

QUESTION:
A person bought two watches for Rs.480. He sold one at a loss of 15% and the other at a gain of 19% and he found that each watch was sold at the same price. Find the cost price of the two watches.
Rs400, Rs280
Rs420, Rs200
Rs280, Rs200
None of the above

Solution
Let the 2 watches are A and B.
So, 85% of A = 119% of B
Ratio between A and B is = 7:5
The whole parts is 12 parts
For 12 parts = Rs.480
Or, 1 part = Rs.40
Or, 7 parts = Rs.280 and 5 parts = Rs.200.

QUESTION:
A sells a horse to B at a loss of 20% and B sells it to C at a loss of 25%. If C pays Rs.900 for it, at what price did A buy?
1000/-
1200/-
7000/-
1500/-

Solution
Let A buy it at Rs.100/-
A sells a horse to B at a loss of 20%
So, B buy at Rs.80/-
B sells to C at a loss of 25%
So, C buy at Rs.60
And, C pays Rs.900 for it
For 60 parts it is 900/-
For 100 parts it is 1500/-
So, A buy it for Rs.1500.
What profit percent is made by selling an article at a certain price, if by selling at 2/3 of that price there would be a loss of 20%?
Two persons calculate their profit percent in two different ways. One of them calculates a profit of 25% on the cost price and another a profit of 25% on the selling price. If the selling price of both of them are the same, find their cost price and selling price.
If a discount of 10% is given on the marked price of an article, the shopkeeper gets a profit of 20%. Find his profit % if he offers a discount of 20% on the same article.
I bought two watches for Rs480. I sold one at a loss of 15% and the other at a gain of 19% and then I found that each watch is sold at the same price. Find the cost price of two watches.

Aptitude test on Percentages -quantitative analysis

INTRODUCTION:
Percent means out of 100.
We can find any of the asking value by comparing on this 100 with the given value.
N:B: IF we can remember the percent value in terms of fractional value and vice versa, we can find the answer easily & quickly.

CONVERT OF PERCENT To FRACTIONAL VALUE :

10%=1/10
20%=1/5
25%=1/4
40%=2/5
50%=1/2
60%=3/5
75%=3/4
80%=4/5
Similarly we can convert fraction in to percentage.

The price of a Maruti car rises by 30% while the sales of the car comes down by 20%.What is the percentage change in the total revenue?
(a) -4%
(b) -2%
(c) +4%
(d) +2%

. A person who has a certain amount with him goes to market. He can buy 50 oranges or 40 mangoes. He retains 10% of the amount for taxi fare and buys 20 mangoes and the balance, he purchases oranges. Number of oranges he can purchase is:

(a) 36
(b) 40
(c) 15
(d) 20

I bought 5 pens, 7 pencils and 4 erasers. Rajesh bought 6 pens, 8 erasers and 14 pencils for an amount which has half more what I had paid. What percent of the total amount paid by me was paid for the pens?
(a) 37.5%
(b) 62.5%
(c) 50%
(d) None of these

One bacteria splits in to eight bacteria of the next generation. But due to environment, only 50% of one generation can produce the next generation. If the seventh generation number is 4096 million, what is the number in the first generation?
(a) 1 million
(b) 2 million
(c) 4 million
(d) 8 million

. 2/5 of the voters promise to vote for P and the rest promised to vote for Q. Of these, on the last day 15% of the voters went back of their promise to vote for P and 25% of voters went back of their promise to vote for Q, and P lost by 2 votes. Then, the total number of voters is:
(a) 100
(b) 110
(c) 90
(d) 95

A report consists of 20 sheets each of 55 lines and each such line consists of 65 characters. This report is reduced on to sheets each of 65 lines such that each line consists of 70 characters. The percentage reduction in the number of sheets closet to:
(a) 20
(b) 5
(c) 30
(d) 35

The rate of increase of the price of sugar is observed to be two percent more than the inflation rate expressed in percentage. The price of sugar, on January 1, 1994 is Rs20 per kg. The inflation rates of the years 1994 and 1995 are expected to be 8% each. The expected price of sugar on January 1, 1996 would be:
(a)Rs23.60
(b) Rs24.00
(c) Rs24.20
(d) Rs24.60

A trader makes a profit equal to the selling price of 75 articles when he sold 100 of the articles. What % profit did he make in the transaction?

33.33%
75%
300%
150%

A merchant buys two articles for Rs.600. He sells one of them at a profit of 22% and the other at a loss of 8% and makes no profit or loss in the end. What is the selling price of the article that he sold at a loss?
Rs. 404.80
Rs. 440
Rs. 536.80
Rs. 160


A trader professes to sell his goods at a loss of 8% but weights 900 grams in place of a kg weight. Find his real loss or gain per cent.
2% loss
2.22% gain
2% gain
None of these


Rajiv sold an article for Rs.56 which cost him Rs.x. If he had gained x% on his outlay, what was his cost?

Rs. 40
Rs. 45
Rs. 36
Rs. 28


A trader buys goods at a 19% Amount on the label price. If he wants to make a profit of 20% after allowing a Amount of 10%, by what % should his marked price be greater than the original label price?
+8%
-3.8%
+33.33%
None of these


If apples are bought at the rate of 30 for a rupee. How many apples must be sold for a rupee so as to gain 20%?
28
25
20
22


One year payment to the servant is Rs. 200 plus one shirt. The servant leaves after 9 months and receives Rs. 120 and a shirt. Then find the price of the shirt.
Rs. 80
Rs. 100
Rs. 120
Cannot be determined


Two merchants sell, each an article for Rs.1000. If Merchant A computes his profit on cost price, while Merchant B computes his profit on selling price, they end up making profits of 25% respectively. By how much is the profit made by Merchant B greater than that of Merchant A?
Rs.66.67
Rs. 50
Rs.125
Rs.200


A merchant marks his goods in such a way that the profit on sale of 50 articles is equal to the selling price of 25 articles. What is his profit margin?
25%
50%
100%
66.67%


A merchant marks his goods up by 75% above his cost price. What is the maximum % Amount that he can offer so that he ends up selling at no profit or loss?
75%
46.67%
300%
42.85%

Quantitative analysis aptitude test on trains

INTRODUCTION:
The problems on Trains are same to Time & Distance. But incase of train, when it passes a stationary man or stationary pole , it passes the distance which is its own length.
And when it passes another train or plat form or a bridge, it passes the length of its own with the length of other train or the length of platform or bridge.


QUESTION 1:
How many seconds will a train200metres long running at the rate of 36 km an hour take to pass a certain telegraph post?
A.10 seconds.
B. 15 seconds.
C.20 seconds.
D. 25 seconds.
.


Sol: The speed of train is 36 km/h =36*5/18=20 m/sec.
Required time to pass the post =200/10=20 seconds

QUESTION 2:
How long does a train 240metres long running @ 72km/h take to pass a bridge 120metres in length?

A.15 seconds.
B. 18 seconds.
C.20seconds.
D. 25seconds.


Sol: Total distance to be cover is 240 +120 =360 metres and the speed of train is 72 km/h=72*5/18=20 m/sec.
So, required time is 360/20=18 seconds.




QUESTION 3:
Two trains 360metres &240metres in length are running in opposite directions, one @50km/h and the other @22km/h. In what time will they be completely clear each other from the moment they meet?
A.20 seconds.
B. 25 seconds.
C.30 seconds.
D.40 seconds.


Sol: Total distance to be covered is 360+240=600metres & the relative speed is 50+22=72km/h or 20 m/sec.
So, required time =600/20=30 seconds

QUESTION 4:
Two trains start their journey from Delhi & Hyderabad and proceed towards each other @ 80 & 95 km/h respectively. When they meet, it is found that one train has covered 180 km more than the other. Find the distance between Delhi & Hyderabad.
A.2000km.
B.2100km.
C.2200km.
D. 2400km.

Sol: One train covers 15 km more than other in 1 hour in a distance of 80+95=175 km.
So, One train covers 180km more than other in 12 hours in a distance of 2100km.


QUESTION 5:
A train over takes two persons who are walking in the same directions as the train is moving, @ 2km/h and 4km/h and passes them completely in 9 and 10 seconds respectively. Find the speed & the length of the train.
A.20 km/h,50m.
B. 22 km/h,50m.
C.20 km/h,60m.
D.30 km/h,50m.


Sol: The ratio between time taken by train to pass the persons is 9:10.
So, the ratio between the relative speed is 10:9.
1 part of difference is due to 4-2=2km/h.So in first case 10 parts is 20km/h.So speed of train=20+2=22km/h.
And the length of train =Relative speed with first man *time =20*5/18*9=50metres

QUESTION 6: Two trains can run @ 54km/h & 36km/h respectively on parallel tracks. When they are running in opposite directions they pass each other in 10 sec. When they are running in the same direction, a person sitting in the faster train observes that he passes the other train in 30 seconds. Find the length of the slower train.
A.100metres.
B.150metres.
C.200metres.
D.300metres.


QUESTION 7:
A train after traveling 50 km meets with an accident and then proceeds at ¾ of it’s former speed and arrives at it’s destination35 min late. Had the accident occurred 24 km further, it would have reached the destination only 25min late. Find the speed of the train.
A.48 km/h.
B.36 km/h.
C.50 km/h. D.72 km/h.



QUESTION 8:
A train covers a distance between stations A & B in 45 min. If the speed is reduced by 5 km/h, it will cover the same distance in 48 min. Find the distance between the two stations A & B , also the speed of the train.
A.80km/h,60km. B.60km/h,80km.
C.80km/h,80km. D.60km/h,80km

QUESTION 9:
Two trains A & B start from Delhi & Patna towards Patna & Delhi respectively. After passing each other they take 4 hours 48 min and 3 hours 20 min to reach Patna & Delhi respectively. If the train from Delhi is moving at 45 km/h then find the speed of the other train.
A.45km/h. B.54km/h.
C.60km/h. D.64km/h.

Quantitative analysis Time and Distance

INTRODUCTION:
The problems based on time & distances are based on speed, time & distance. The general process to find out distance is as follows:
DISTANCE= SPEED*TIME.
Where S is the speed of the moving object, T is the time period & D is the distance covered.
Process to convert km/h in to m/s or vice versa is as follows:
1km/ h = 5/18 m/s
1 m/s = 18/5 km/h

Relative speed: The different between the speeds of two moving object with respect to their direction is known as relative speed. The relative speed according to the two different directions is as follows:
Case I: In case of same direction it is the difference between the speeds of the two moving objects.
Case II: In case of opposite direction it is the sum of the speeds of the two moving objects.
Example: Two objects are moving @ 30 km/h & 50 km/h. then the relative speed between them in two different cases are as follows:
Case I: In the same direction it is (50-30) i.e. 20 km/h
Case II: In case of opposite direction it is (50+30) i.e.80 km/h.

QUESTION:
A boy goes to school @ 10 km/h & returns to his home @ 12 km/h respectively. If he takes 5 ½ hrs in all, find the distance between school & his home.
A.20km.
B.25 km.
C.30 km .
D.30 km.

Sol:
The L.C.M of two different speeds of 10 &12 is 60.
If 60 km is the distance, then at the rate of two different speeds the times are 6 & 5 hrs respectively.
When the total time is 6+5 i.e. 11hrs, the distance between the two points is 60 km.
So when the total time is 5 ½ hrs, the distance between school & home is 30 km.


QUESTION:
A person covers half of his journey @ 21 km/h, & the rest half @ 24 km/h respectively. If he takes 15 hrs in all, find the distance covered by the person.
A.168 km.
B.224 km.
C.336 km.
D.280 km.

Sol:
The L.C.M of 21 &24 i.e. 168.
If 168 km is the distance, then the person covers ½ of it i.e. 84 km @ 21 km/h in 4 hrs and the rest half @ 24 km/h in 3 ½ hrs.
So when the total time is 7 ½ hrs, the distance is 168 km.
And if the total time is 15 hrs, the distance is 336 km.


QUESTION:
A person goes a certain distance @ 48 km/h & returns to the starting point @ 96 km/h respectively. Find his average speed during the whole journey.

A.60 km/h.
B.64 km/h
C.68 km/h
D.72 km/h

Sol:
The L.C.M of 48 @ 96 is 96.
If the distance is 96 km, then @ two different speeds the required time are 2 &1 hr respectively.
Average speed= Total distance/Total time
So the average speed i.e.(96+96)/2+1=64 km/h.



QUESTION:
A person covers a certain distance between his house & office on scooter. Having an average speed of 45 km/h, he is late by 15 minutes. How ever, with a speed of 60 km/h, he reaches his office 7 ½ min earlier. Find the distance between his house & office.
A.67.5 km.
B.60 km.
C.75 km.
D.120 km.
Sol: Let the L.C.M of the two different speeds i.e. the L.C.M of 45 & 60 =180 is the distance.
So @ 45km/h, it will take him 4 hrs & @ 60 km/h, it will take him 3 hours.
In this case the difference between the two times is 1hr for a distance of 180 km.
So when difference between the two time i.e. [15-(-7 ½)], the distance is 67.5 km.


QUESTION:
A boy walking at a speed of 15 km/h reaches his school 20 minutes late. Next time he increases his speed 5km/h, but still he is late by 10 minutes. Find the distance of his school from his house.
A.10 km.
B.12 km.
C.15 km.
D.20 km.
Sol: In this case the two different speeds are 15 & 20 km/h of which the L.C.M is 60.
If the distance is 60 km, then @ 15km/h it will take him 4 hours where as @ 20 km/h it will take him 3 hours. So the difference between two times is 1 hr.
When the difference is 1 hr, the distance is 60 km.
So when the difference is (20-10) i.e. 10 minutes or 1/6 hr, the distance is 10 km.


QUESTION:
: The distance between two stations is 900 km. A train starts from A and moves towards B at an average speed of 30 km/h. Another train starts from B, 20 minutes earlier than the train A, and moves towards A at an average speed of 40 km/h. How far from A will the two trains meet?

Sol: If the train B starts 20minutes earlier than the train A, it must have covered (1/3*40) i.e.40/3 km. So at the time of the starting of A, the difference between the distances between them is (900-40/3) i.e.2660/3 km.
The ratio between the speeds of the two trains is 30: 40 i.e.3:4.So at the same time the difference between the two train is 3+4 i.e. 7 parts which is 2660/3
The distance from A at which they will meet i.e. 3 parts =380 km.


QUESTION:
Walking ¾ of his usual speed, a person is 15 minutes late to reach his office. Find his usual time to cover the distance.
A.30 min.
B.45 min.
C.60 min.
D.75 min.
Sol:
If the usual speed is 1 part, then the new speed is ¾.
So the ratio between the speed of usual & new is 4:3.
There fore the ratio between usual time & new time is 3:4. (As speed α 1/Time)
Due to 1 part more time in case of new time it takes 15 minutes more.
In this case the usual time is 3 parts i.e. 45 minutes.


QUESTION:
Walking 5/3 of his usual speed, a person is 20 minutes earlier to reach his office. Find his usual time to cover the distance.
A.25 min.
B.50 min.
C.60 min.
D.100min.
Sol:
The ratio between the usual & new speed is 3:5, so that the ratio between the time between usual & new is 5:3.
New time is less than the usual time by 2 parts, so it takes 20 minutes earlier.
Usual time is 5 parts i.e. 50 minutes.

QUESTION:
A train leaves from kolkata at 7.30 am and travels @ 40 km/h; another train leaves kolkata at noon and travels @ 64 km/h, when and where the second train overtakes the first?
A.400 km.
B.460 km.
C.480 km.
D.500 km.
Sol:
The first train starts its journey 4 hrs 30 minutes before the second train in which it must have covered 180 km.
When the second train starts its journey, the difference between the distances from the first train is 180 km.
So the second train meets the first train after (180/24) i.e.7 hrs 30 minutes. (As required time to meet= difference between the distance/ relative speed)
And the distance after which the second train meets i.e. 64*7 ½ =480 km.


QUESTION:
One man takes 150 steps a minute, each 4 decimeters long, another walks 4 km/h, if they start together, how soon will one of them be 60 meters ahead to the other?
A.3 min.
B.6 min.
C.9 min.
D.10min.
Sol:
The speed of the first man is 150* 4/10 m i.e.60 meters/min & the second man it is 200/3 meters/min.
The difference between them is 20/3 meter in 1minute.
So one will be ahead of 60 meters to the other in 9 minutes.

QUESTION:
Two men A & B start from a place P walking @ 5.5 & 6.5 km/h respectively. How many km will they be apart at the end of 5 hrs, if they walk in the opposite direction?
A.20km.
B.30 km.
C.40km.
D.60 km.
Sol: In 1 hr, they are 12 km apart.
So in 5 hrs, they are 60 km apart.


QUESTION:
Two men A & B start their journey from P to Q, a distance of 36 km, at 4 & 5 km/h respectively. B reaches Q and returns immediately and meets A at the point R.
(i) Find the distance from P to R.
(ii) And also find the distance covered by B.
(iii) the difference between the distances covered by B & A.

Sol: The ratio between the speeds of A & B is 4:5, so that the ratio between the distance covered by A & B is also 4: 5. (As speed α Distance)
So that the total distance covered by A & B by both i.e. 9 parts. And also the total distance covered by A & B by both i.e. twice of 36km

So 9parts = 72 km.
The distance from P to R is 4 parts = 32 km.
Similarly, the distance traveled by B is 5 parts i.e.40 km.
And the difference between the distances covered by B & A is 1 part i.e. 8 km.

QUESTION:
A man sets out to cycle from Mumbai to kolkata, and at the same time another man starts from Kolkata to Mumbai. After passing each other they complete their journey in 4 & 9 hrs respectively. At what rate does the second man cycle if the first cycle at 9 km/h?
A.4 km/h.
B.5 km/h.
C.6 km/h.
D.8 km/h.

Sol: According to the method
A’s speed : B’s speed=√B’s time :√A’s time.
Speed of second man= 6 km/h.


QUESTION:
Two bullets were fired at a place at an interval of 38 minutes. A person approaching the firing point in his car hears the two sounds at an interval of 36 minutes. If the speed of the sound is 330 m/sec, what is the speed of the car?
A.60km/h.
B. 66km/h.
C.72km/h.
D.76km/h.
Sol: The speed of car in 36 min could be traveled by sound in (38-36) i.e. in 2 min.
The speed of the car in 36 min=330*120 m/sec.
So the speed of car per hour =66 km/h.


QUESTION:
Two persons do the same journey by traveling respectively @ 9 & 10 km/h. Find the length of the journey when one takes 32 minutes longer than the other.
A.36km.
B.40km.
C.48km.
D.50km.



Sol: If the total distance is the L.C.M of 9 & 10i.e.90 km, then @ 9 km/h, it will take 10 hrs & @ 10 km/h, it will take 9 hrs.
When the difference between two timing is 1 hr, the distance is 90km.
So when the difference between two timing is 32min, the distance is 48km.

QUESTION:
A carriage driving in a fog passed a man who was walking @ 5km/h in the same direction. He could see the carriage for 6 minutes and it was visible to him up to a distance of 120metres. What was the speed of the carriage?
A.5km/h.
B.6 km/h.
C.6.2km/h.
D.7.2 km/h.
Sol: The speed of carriage in 6 min = The speed of man in 6 min @ 5km/h + 120metres.
So, the speed of carriage per hour=6.2 km/h.


QUESTION:
A man takes 6 hrs 30 min in walking to a certain place and riding back. He would have gained 2hrs 10 min by riding both ways. How long would he take to walk both ways? And also find how long would he take to ride both ways?


Sol: Required time to walk both ways= Required time to walk + riding back +Time of Gain.
=6 hrs 30min+2 hrs 10 min=8 hrs 40 min.
Required time to ride both ways= Required time to walk + riding back -Time of Gain.
=6 hrs 30min-2 hrs 10 min=4 hrs 20 min.

QUESTION:
A man leaves a point P and reaches the point Q in 4 hrs. Another man leaves the point Q, 2 hrs later and reaches the point P in 4 hours. Find the time in which first man meets to the second man.


QUESTION:
A person covers a certain distance in 24 minutes if he runs at a speed of 27 km/h on an average. Find the speed at which he must run to reduce the time of journey to 18minutes.
A.36 km/h.
B.40.5km/h.
C.44km/h.
D.48km/h.
Sol: The ratio between two time =24:18 i.e.4:3.
The ratio between two speeds =3:4.
( As time α1/speed)
So if 3 parts of speed = 27 km/h.
Then 4 parts of speed = 36 km/h.


QUESTION:
Without any stoppage a person travels a certain distance at an average speed of 15 km/h, and with stoppage he covers the same distance at an average speed of 12 km/h. How many minutes per hour does he stop?
A.10min.
B.12min.
C.15min.
D.20min.

Sol: The ratio between speed without stoppage & with stoppage =15:12 i.e.5:4.
So, the ratio between time without stoppage & with stoppage =4:5.
Therefore, in 5 parts there is a rest of 1 part .
So, in 60 parts or 60 min, there is a rest of 12 part or12min..

QUESTION:
A person has to cover a distance of 100km in 10 hrs. If he covers half of the journey in 3/5 of the time, what should be his speed to cover the remaining distance in the time left?


QUESTION:
A man travels 480 km in 6 hrs, partly by air and partly by train. If he had traveled all the way by air, he would have saved3/4 of the time he was in train and would have arrived at his destination 3hrs early .Find the distance traveled by the train.

QUESTION:
One aeroplane started 1 hr later than the scheduled time from a place 3000 km away from its destination. To reach the destination at the scheduled time the pilot had to increase the speed by500 km/h. What was the speed of the aeroplane per hour during the journey?


QUESTION:
A train leaves the station 1 hour before the scheduled time. The driver decreases its speed by 50 km/h. At the next station 300 km away, the train reached on time .Find the original speed of the train.


QUESTION:
When a person travels equal distance at speeds V1 and V2 km/h, his average speed is 8 km/h. But when he travels at these speeds for equal times his average speed is 9 km/h. find the difference of the two speeds.

QUESTION:
A person covers a certain distance on scooter. Had he moved 6 km/h faster, he would have taken 30 minutes less. If he had moved 4 km/hr slower, he would have taken 1 hr 30 min more.Find the original speed.


QUESTION:
A train does a journey without stopping in 9 hrs. If it had traveled 8 km/h faster, it would have done the journey in 6 hours. What is its original speed?


QUESTION:
A car travels a distance of 80 km in 3 hrs partly at a speed of 45 km/h & partly at 20 km/h. Find the distance traveled at a speed of 45 km/h.
.

QUESTION:
A distance is covered by a person in 6 hrs. He covers ¾ of it at 12 km/h and the remaining at 16 km/h. Find the total distance

QUESTION:
The ratio between the speeds of Ajay & Bijay is 6:7. If Ajay takes 30 minutes more than Bijay to cover a distance, then find the actual time taken by Ajay and Bijay.


QUESTION:
A person covers 2/3 rd of his journey at 30 km/h and remaining journey at 60 km/h. If the total journey is of 270 km, what is his average speed for the whole journey?


QUESTION:
A hare sees a dog 200 meters away from her and scuds off in the opposite direction at a speed of 24 km/h. Two minutes later the dog perceives her and gives chase at a speed of 32 km/h. How soon will the dog overtake the hare, and at what distance from the spot whence the hare took flight?

QUESTION:
Train A traveling at 60 km/hr leaves Mumbai for Delhi at 6 P.M. Train B traveling at 90 km/hr also leaves Mumbai for Delhi at 9 P.M. Train C leaves Delhi for Mumbai at 9 P.M. If all three trains meet at the same time between Mumbai and Delhi, what is the speed of Train C if the distance between Delhi and Mumbai is 1260kms?
A.60 km/hr
B.90 km/hr
C.120 km/hr
D.135 km/hr

QUESTION:
A man moves from A to B at the rate of 4 km/hr. Had he moved at the rate of 3.67 km/hr, he would have taken 3 hours more to reach the destination. What is the distance between A and B?
33 kms
132 kms
36 kms
144 kms

Quantitative analysis Time and work aptitude test

INTRODUCTION:
The questions are based on the following factors.
The number of days taken by different persons
The efficiencies of different persons.
The work schedule.

SOME IMPORTANT POINTS:
(i) Number of days α 1/Efficiency.
(ii) Ratio between efficiency α 1/ Ratio of number of days.


METHOD :

Take the L.C.M of the number of days taken by different persons and consider it as the total part of the work.
By taking the L.C.M as the total part of the work, find out ,in 1 day they can do how many parts.
Then find out, the given work will be completed in how many number of days

QUESTIONs:
A can do a piece of work in 45 days & B in 40 days respectively. They worked together for some days & then A left the work & B completed the remaining work in 23 more days. After how many days, did A leave the work?
(a) 9 days.
(b) 10 days.
(c)11 days.
(d) 12 days.


QUESTION 1:
A can do a piece of work in 48 days & B in 96 days respectively. If they work together, the work will be completed in how many days?
(a) 30 days
(b) 32 days
(c) 33 days
(d)36 days


SOLUTION:
The total work is the L.C.M of 48 &96 i.e.96 parts.
In 1 day , A can do 2 parts & B 1part respectively.
Both can do 3 parts in 1day.
So, both can do 96 parts in 32 days.


QUESTION 2:
A can do a piece of work in 18 days, B in 24 days & C in 36 days respectively. If they work together , the work will be completed in how many days?
(a) 8 days
(b) 9 days
(c) 10 days
(d)12 days


SOLUTION:
The total part of the work is the L.C.M of 18,24 &36 i.e. 72 parts.
In 1 day A can do 4 parts ,B 3 parts & C 2 parts respectively.
So all together they can complete 9 parts in 1 day & total 72 parts in 8 days.

QUESTION 3:
A& B can do a piece of work in 20 days, B & C in 30 days and C & A in 40 days respectively. If they work together, the work will be completed in how many days?
(a) 17 6/13 days.
(b) 18 6/13 days.
(c) 18 ½ days.
(d) 19 days.


SOLUTION:
The total work is the L.C.M of 20,30 & 40 i.e. 120 part.
In 1 day A & B can do 6 parts &C can do 4 parts and C & A can do 3 parts respectively.
When 2 ( A + B+ C) work , they can do 6 + 4+3 i.e.13 parts in 1 day.
So, A +B +C can do 6.5 parts in 1 day & 120 parts in …
18 6/13 days.


QUESTION 4:
In the above question, If they work separately, the work will be completed in how many days?
(a) 48,34 2/7,240 days.
(b) 36,48,72 days.
(c) 48,72,120 days.
(d) 72,120,240 days.


SOLUTION:
A +B+C can do 6.5 parts in 1 day.
A+B can do 6 parts, B+C can do 4 parts C+A can do 3 parts.
So A can do 6.5-4=2.5 parts in 1 day & 120 parts in 48 days.
B can do6.5-3=3.5 parts in 1 day & 120 parts in 34 2/7 days.
Similarly, C can do 6.5-6 =.5 part in 1 day & 120 parts in 240 days.


QUESTION 5:
A can do a piece of work in 12 days & B in 15 days and they work on alternate days. The work will be completed in how many days:
(i) If A starts the work?
(ii) If B start the work?
(a) 13 ¼ & 13 2/5 days.
(b) 13 ¼ &13 ½ days.
(c) 12 & 13 days.
(d) !2 ½ &13 ½ days.


SOLUTION:
The total work is the L.C.M of 12 & 15 i.e.60 parts.
In1 day A can do 5 parts & B 4 parts.
So they can do 9 parts in 2 days.
And 54 parts in 12 days.
Then (i) if A starts, he can complete 5 parts out of the rest 6 parts in 1 day & then B can complete the rest 1 part in ¼ day.
So the work will be completed in 12 +1+1/4 i.e.13 ¼ days.
(ii) If B starts, He can complete 4 parts out of rest 6 parts in 1 day & then A can complete the rest 2 parts in 2/5 days.
So the work will be completed in 12+1+2/5 i.e.13 2/5 days.


SOLUTION:
The total work is the L.C.M of 45 & 40 i.e. 360 parts.
In 1 day A can do 8 parts & B 9 parts respectively.
In the last 23 days B can complete 23*( i.e. 207 parts.
So the rest work must have been completed by them.
A & B can do 8 +9 i.e.17 parts in 1 day.
So they have done 153 parts in 9 days and then A left the work.


QUESTION 7:
A &B can do a piece of work in 12 days, B&C in 16 days respectively. After A has been working for 5 days and B for 7 days, C takes up and finishes it alone in 13 days. In how many days they can do it separately/
(a) 12,16,18 days.
(b) 16,48 & 24 days.
(c) 16, 18& 24 days.
(d) 24,36 & 48 days.


SOLUTION:
The total work is the L.C.M of 12 &16 i.e.48 parts.
In 1 day A & B can do 5 parts and B & C can do 3 parts.
According to question, 5 days work of A + 7 days work of B + 13 days work of C is the total work.
We can not take their individual work , so we can convert the above work as 5 days work of A & B + 2 days work of B & C + 11 days work of C .
In 5 days A & B can do 20 parts ,In 2 days B & C can do 6 parts . So C can do the rest 22 parts in 11 days.
From the above C can do 2 parts in 1 day & 48 parts in 24 days.
And B can do 3-2 i.e. 1 part in 1 day & 48 parts in 48 days.
Similarly A can do 4-1 i.e.3 parts in 1 day & 48 parts in 16 days.


QUESTION 8:
If 2 men or 3 women or 4 boys can do a piece of work in 49 days, then 3 men,4 women & 5 boys can do it in how many days?
(a) 10 days.
(b) 12 days.
(c) 15 days.
(d) 18 days.


SOLUTION:
Take the product of the number of men,women,boys & number of days as the total part of the work i.e.2*3*4*49.
Then 3 men can do 3*3*4 i.e. 36 parts,4 women 4*2*4 i.e.32 parts & 5 boys can do 5*2*3 i.e.30 parts in 1 day.
So 3 men, 4 women % boys can do 98 parts in 1 day & 2*3*4*49 parts in 12 days.



QUESTION 9:
A is thrice as fast as B, and is there fore able to do a work in 60 days less than B. If they work together, the work will be completed in how many days?
(a) 20 days.
(b) 22.5 days.
(c)24 days.
(d) 25 days.


SOLUTION:
The ratio between efficiency between A & B is 3:1.
So the ratio between number of days taken by A & B is 1:3.(As number of days α1/efficiency)
A takes 2 parts less days than B i.e.60 days.
So 1 part days i.e.30 which A takes &3 parts days i.e.90 which B takes.
The total work is the L.C.M of30 & 90 i.e.90parts.
A & B can do 4 parts in 1 day, So total work 90 parts in 22.5 days.



QUESTION 10:
A is twice as a good work man as B & together can complete a piece of work in 21 days. If they work separately, the work will be completed in how many days?
(a)31.5 & 63 days.
(b) 32 & 63 days.
(c)21 & 63 days.
(d) None of these.


SOLUTION:
If the efficiency of B is 1 part, the efficiency of A is 2 parts.
So, in 1 day both can do3 parts & in 21 days the total work 63 parts.
A can do 2 parts in 1 day, so 63 parts in 31.5 days.
B can do 1 part in 1 day, so 63 parts in 63 days.


QUESTION 11:
A builder decided to build a farmhouse in 40 days. He employed 100 men in the beginning and 100 more after 35 days and completed the construction in stipulated time. If he had not employed the additional men, how many days behind the schedule would it have been finished?
(a) 3 days.
(b) 4 days.
(c) 5 days.
(d) 6 days.


SOLUTION:
The contractor has employed 100 men for 35 days and 200 men for the last 5 days.
The working capacity of 200 men in 5 days=The working capacity of 100 men in 10 days.
So if he had not employed another 100 men, the work would have been completed 5 days behind the schedule

QUESTION 12:
A,B and C can do a work in 8,16 and 24 days respectively. They all begin together, A continues to work till it is finished, C leaving off 2 days and B one day before its completion. In what time is the work finished?
(a) 5 days.
(b) 6 days.
(c)8 days.
(d) 9 days.


SOLUTION:
The total work is the L.C.M of 8,16,24 i.e.48 parts.
In1 day, A can do6 parts, B 3 parts & C 2 parts.
The working schedule is as follows:
(A,B & C )’s work for same days +(A &B)’ s work for 1 day + A’s work for 1 day.
So in the last 2 days , the extra work done by A+B & A is 9+6=15 parts.
That means all have done the rest part i.e. 33 parts.
A,B & C can do 11 parts in 1 day, So they have done 33 parts in 3 days.
So the total number of days=3+2=5 days.


QUESTION 13:
There is sufficient food for 400 men for 31 days. After 28 days 280 men leave the place. For how many days will the rest food last for the rest of the men?
(a) 8 days.
(b) 10 days.
(c)12 days.
(d) 15 days.


SOLUTION:
After 28 days ,the rest food is sufficient for400 men for the next 3 days.
If 280 men leave, then the rest food is sufficient for the rest 120 men for 10 days.



QUESTION 14:
A contractor under took to build a road of 15 km in 12 days. He employed 100 men in the beginning and after 6 days, he observed that only 6 km of road has been completed. In order to complete the work in the stipulated time, how many extra men are needed?
(a) 50.
(b) 75.
(c)100.
(d) None of these.


SOLUTION:
After 6 days, the rest work of 9 km has to be completed in the last 6 days.
If 100 men can complete 6 km in 6 days, then they can complete 9 km in9 days.
But, the rest work of 9 km has to be completed in 6 days by 150 men.
So, the extra number of men are:
150-100=50.



QUESTION 15:
A and B working together can finish a job in T days. If A works alone and completes the job, he will take T + 5 days. If B works alone and completes the same job, he will take T + 45 days. What is T?

A.25
nB.60
nC.15
nD .None of these


SOLUTION

A+B can finish a job in T days
A works alone to finish the job in T+5 days.
Similarly B takes to finish the job in T+45 days.
In 1 day A+B will finish 1/T parts of the work. And A will finish 1/(T+5) parts B will finish 1/(T+45) parts.
Therefore
1/T = 1/(T+5) + 1/(T+45)
Solving the above equation we get
=> T2 =225 , => T = (225)1/2
Therefore T = 15


QUESTION16:
A certain number of men can do a piece of work in 45 days. If there were 12 men less it could be completed in 15 days more. How many men were originally there.
A.36 men.
B.40 men.
C.44 men.
D.48 men.


SOLUTION
The ratio between the number of days taken by original number of men and new men is 45:60 i.e.3:4.
So the ratio between the number of persons is 4:3.(As number of days α1/number of persons.)
Due to 12 men less, the number of person decreases by 1 parts.
So 1 part =12 men
And original number of men is 4 parts i.e.48.


QUESTION 17:
A, B and C can do a work in 5 days, 10 days and 15 days respectively. They started together to do the work but after 2 days A and B left. C did the remaining work (in days) ?

A.1
nB.2
nC.3
nD.4


SOLUTION:
Total work i.e. L.C.M of 5,10,15 = 30 parts
In 1 day A can do 6 parts, B can do 3 parts, C can do 2 parts of the work,
In 1 day (A+B+C) can do (6+3+2) = 11 parts
In 2 days (A+B+C) can do 22 parts
The rest part of the work = (30-22)=8 parts
C can do 2 parts in 1 day => C can do 8 parts in 4 days.


QUESTION 18:
X alone can do a piece of work in 15 days and Y alone can do it in 10 days. X and Y undertook to do it for Rs.720. With the help of Z they finished it in 5 days. How much is paid to Z?

–Rs.360
–Rs.120
–Rs.240
–Rs.300


SOLUTION:
The total part of work is L.C.M of 15,10,5 = 30
In 1 day X can do 2 parts, Y can do 3 parts, (X+Y+Z) can do 6 parts.
Z can do 6-(2+3) = 1 part in 1 day.
Ratio of efficiency between X, Y and Z is 2:3:1
According to the ratio of 2:3:1 the total wage Rs270 will be divided among them
Total 6 parts = Rs720
So Share of Z i.e. 1 part = Rs120


QUESTION 19:
Ram starts working on a job and works on it for 12 days and completes 40% of the work. To help him complete the work, he employs Ravi and together they work for another 12 days and the work gets completed. How much more efficient is Ram than Ravi?
A.50%.
B.60%.
C.100%.
D.125%.

SOLUTION:

Ram can do 40% of the work in 12 days
Ram can do 100% of the work in (12/40) * 100 = 30 days
Ram + Ravi can do 60% of the work in 12 days
Ram + Ravi can do 100% of the work in 20 days
L.C.M of 20 and 30 = 60, So total work = 60 parts
In 1 day Ram + Ravi can do 3 parts of the work while Ram can do 2 parts
Ram can do 1 part of the work in 1 day
And So Ram is 100% more efficient than Ravi

QUESTION 20:

A red light flashes 3 times per minute and a green light flashes 5 times in two minutes at regular intervals. If both lights start flashing at the same time, how many times do they flash together in each hour?
A.20.
B.24.
C.30.
D.32.




SOLUTION:

A red light flashes 3 times per minute
A green light flashes 5 times in two minutes
In 1 hr red light flashes 180 times and green light 150 times
In 1 hr both flash for the H.C.F of (150,180) = 30 times.


QUESTION 21:

A and B can do a piece of work in 21 and 24 days respectively. They started the work together and after some days A leaves the work and B completes the remaining work in 9 days. After how many days did A leave?

–5
–7
–8
–6


SOLUTION:

Total work i.e. L.C.M of 21 and 24 = 168 parts
A can do 8 parts and B can do 7 parts in 1 day
B has done some part of the work alone i.e. 7*9= 63 parts in the last 9 days.
Before the 63 parts , they both have done (168-63) parts= 105 parts
A and B can do 15 parts of work i.e. (8+7) parts in 1 day
Therefore A+B can do 105 parts in (105/15)= 7 days.


QUESTION 22:
Ram, who is half as efficient as Krish, will take 24 days to complete a work if he worked alone. If Ram and Krish worked together, how long will they take to complete the work?

–16 days
–12 days
–8 days
–18 days


SOLUTION:

The ratio between the efficiency of Ram and Krish = 1:2
By working 1 part in 1 day Ram completed the work in 24 days
By working 3 parts in 1 day Ram and Krish can complete the work in
24/3= 8 days.


QUESTION 23:
A can do a piece of work in 20 days in 30 days & C in 40 days respectively. If they work on alternate days & A starts the work, the work will be completed in how many days?
A.27 days.
B.27 ½ days.
C.28 days.
D.30 days.



SOLUTION:
The total work is the L.C.M. of 20,30,40 i.e.120 parts.
So, in I day A can do 6 parts, B 4 parts & C 3 parts.
If they work on alternate days, they can do 13 parts in 3 days.
So ,they can do 117 parts in 27 days.
If A starts, after 27 days he will complete the rest parts i.e.120-117=3 parts in ½ days.
So, the work will be completed in 27 ½ days.


QUESTION 24:
A can do a piece of work in 18 days, B in 24 days & C in 36 days respectively. If they work together the work will be completed in how many numbers of days?
A.8 days
B.9 days.
C.10 days.
D.12 days.


SOLUTION:

Total part of the work is the L.C.M of 18, 24, 36 i.e. 72 & in 1 day A can do 4 parts, B can do 3 parts & C can do 2 parts respectively.
So, altogether A, B, C can do 9 parts in 1 day.
That’s why they can do total work 72 parts in 8 days.


QUESTION 25:
A & B can do a piece of work in 20 days, B & C in 30 days & C& A in 40 days respectively. If they work together, the work will be completed in how many numbers of days?
A.18 days.
B.18 ½ days.
C.18 6/13 days.
D.18 7/13 days.


SOLUTION:
Total part of the work is the L.C.M of 20,30 & 40 is 120.
So in 1 day A & B can do 6 parts, B & C can do 4 parts, C and A can do 3 parts respectively.
When all these persons work together i.e., 2(A+B+C) they can do 13 parts in 1day.
So (A+B+C) they can do 6.5 parts in 1 day &120 parts in 18 6/13 days .


QUESTION 26:

If A & B can do a piece of work in 10 days & A can do it in 30 days, then B can do it in how many days?
A.12 days.
B.15 days.
C.18 days.
D.20 days.


SOLUTION:

Total part of the work is the L.C.M of 10 & 30 i.e. 30 parts.
So in 1 day A & B can do 3 parts & A can do 1 part respectively.
There fore B can do 2 parts in 1 day
That’s why B can do 30 parts in 15 days


QUESTION 27:
A certain number of men can do a piece of work in 45 days. But if there were 10 men less, it could be completed in 15 days more. How many men were there originally?
A.36
B.40
C.48
D.50


SOLUTION:
The number of days taken by the original number of men is 45 & due to 10 men less it is 60 days.
That means the ratio between the numbers of days is 3: 4.
So that the ratio between the numbers of persons is just reverse of it i.e. 4:3 (As number of days & number of persons are inversely proportional to each other)
In this case there is a decrease of 1 part in number of persons due to 10 men less. So the number of men originally which is 4 parts i.e. 40.


QUESTION 28:

If 3 men or 4 boys can do a piece of work in 19 days, then 5 men & 6 women can do it in how many days?
A.5 days.
B.6 days.
C.8 days.
D.9 days.


SOLUTION:
The total part of the work is the L.C.M of the no of men, boys & days from the first case i.e. 3 *4*19 parts. (Don’t multiply them just keep like this.)
In 1 day 5 men can do 5*4 = 20 parts (which is the product of this 5 men with the number of boys from the first case ) & 6 boys can do 6*3=18 parts (which is the product of this 6 boys with the number of men from the first case) .
So that 5 men & 6 boys can do 20+18=38 parts in 1 day. There fore they can do 3 *4*19 parts in 6 days.


QUESTION 29:
To do a piece of work, B takes 3 times as long as A & C together, and C twice as long as A & B together. If the three together can complete the work in 10 days, how long would A take by him self?
A.20 days.
B.24 days.
C.25 days.
D.30 days.


SOLUTION:
3 times B's daily work=(A+C) 's daily work.
So 4 times of B's daily work = (A+B+C) 's daily work. That’s why if (A+B+C) can do a piece of work in 10 days, then B can do it in 40 days.
Similarly , 2 times C's daily work =(A+B) 's daily work
=> 3 times C’s daily work = (A+B+C) 's daily work .
=> C can do the work in 30 days
From the above (A+B+C) can do the work in 10 days , B can do it in 40 days & C can do it in 30 days.
=> Total parts of the work is the L.C.M of 10, 40, 30 i.e. 120 parts. So (A+B+C) can do 12 parts, B can do 3 parts & C can do 4 parts in 14 day.
=> A can do 5 parts in 1 day. So A can do the whole work i.e. 120 parts in 24 days


QUESTION 30:
10 men can finish a piece of work in 10 days, where as it takes 12 women to finish it in 10 days. If 15 men and 6 women undertake to complete the work, how many days will they take to complete it?
A.4 days.
B. 5 days.
C. 6 days.
D. 9 days



SOLUTION:
The working capacity of 10 men=12 women.
Take the product of the number of men, women& days from the first case & consider it as the total part of the work.
So, the total work is 10*12*10 parts.
In this case,15 men can do15*12i.e.180 parts & 6 women can do6*10 i.e.60 parts in 1 day.
So, they can do 10*12*10 parts in 5 days.



QUESTION 31:
3 men and 4 boys do a piece of work in 8 days, while 4 men and 4 boys do the same work in 6 days. In how many days will 2 men and 4 boys finish the work?
A.10 days.
B.12 days.
C.15 days.
D.24 days.


SOLUTION:
If the L.C.M of 8 & 6 i.e.. the total part of the work is 24 parts.
In 1 day,3 men & 4 boys can do 3 parts & 4 men and 4 boys can do 4 parts.
So, 1 man can do 1 part in and 1 boy can do nothing in 1 day.
That’s why 2 men & 4 boys can do 24 parts in 12 days.



QUESTION 32:
A can do a work in 30 days and B can do the same work in 40 days. They work together for 5 days and then B goes away. In how many days will A finish the remaining work?
A.21 ¼ days.
B.21 ½ days.
C.21 1/3 days
D.24 days.


SOLUTION:
The total work is the L.C.M of 30 & 40 i.e.120 parts.
In 1 day A can do 4 parts & B 3 parts.
In 1 day, both can do 7 parts & in 5 days 35 parts.
When B goes away, the rest part of work is 85 parts.
A can do 4 parts in 1 day, so 85 parts in 21 ¼ days.



QUESTION 33:
A takes as much time as B & C together take to finish the job. A & B working together finish the job in 10 days. C alone can do the same job in 15 days. In how many days can B alone do the same work?
A.40 days
B.50 days.
C.60 days.
D.80 days.


QUESTION 34:
A started a work and left after working for 2 days. Then B was called and he finished the work in 9 days. Had A left the work after working for 3 days, B would have finished in 6 days. In how many days can each of them, working alone, finish the whole work?
A.6 & 12 days.
B.5 & 15 days.
C.6 & 18 days.
D.5 & 12 days.


QUESTION 35:
One man, 3 women and 4 boys can do a work in 96 hours; 2 men and 8 boys can do it in 80 hours; and 2 men and 3 women can do it in 120 hours. In how many hours can it be done by 5 men and 12 boys?
A.42 hours
B.43 ½ hours.
C.43 7/11 hours.
D.45 hours.


SOLUTION:
1 man +3 women + 4 boys can do a work in 96 hrs,so 2 men + 6 women+8 boys can do the work in 48 hrs.
Again, 2 men +8 boys can do the work in 80 hrs.
And also,2 men+4 women can do the work in 120 hrs.
So if we take the L.C.M of 48, 80 & 120 i.e.240 parts as the total work, then 2 men+6 women+8 boys can do 5 parts,2 men+8 boys 3 parts & 2 men+4 women 2 parts in 1 hr.
From the above 1 man can do 1/3 parts & 1 woman can do1/3 part & 1 boy can do 7/24 parts in 1 day.
So 5 men & 12 boys can do……..
 
Top Blogs