Sunday, July 25, 2010

Tech Mahindra Exam Papers



Tech Mahindra Satyam Exam Papers









1. Replace the letters with numbers and solve the equation 4(ABCDE) = EDCBA.
answer is
(A) 87978 (B) 98765 (C) 56789 (D) 87912 (E) None of these

2. A certain number of workmen can do a piece of work in 25 days, in what time will another set of an equal number of men do a piece of work as great supposing that 2 men
of the first set can do as much work in a hour as 3 men in the second set can do in an hour

(A) 60 days (B)75 days (C) 90 days (D) 105 days (E) None of these

3. You are given two different length strings that have the characteristic that they both take exactly one hour to burn. However, neither string burns at a constant rate. Some sections of the strings burn very fast, other sections burn very slow. All you have to work with is a matches to calculate when exactly 45 minutes has elapsed.
(A) 1. Light both ends of the first string
2. Light end of the second string at the same time.
3. When the first string is finished burning,
4. Light the unlit end of the second string.
5. When the second string is finished burning exactly 45 minutes will have passed.
(B) 1. Light both ends of the second string
2. Light beginning of the first string at the same time.
3. when the first string is finished burning,
4. Light the unlit end of the second string.
5. When second string is finished burning exactly 45 minutes will have passed.
(C)
1. Light end of the first string
2. Light end of the second string at the same time
3. When the first string is finished burning,
4. Light the unlit end of the second string.
5. When the second string is finished burning exactly 45 minutes will have passed.
(D) None of these

4. Dot likes pots and pans but not cooks, She likes straw but not hay; she likes sagas but not poems. Does she like a star or a planet?
(A) Star (B) planet (C) More date required

5. In a certain code language, ‘851’ means ‘good sweet fruit’. ‘783’ means ‘good red rose’ and ‘341’ means ‘rose and fruit’. Which digit stands for ‘sweet’ in that language ?
(A) 8 (B) 5 (C) 1 (D) 3 (E) None of these

6. (i) Apron – Cap – Suit
(ii) Trot – Step – hop
(iii) Early – Late –Ago
(iv) Alone – Apiece – Another
(v) Rope – String – Ribbon
For each triplet (group if 3 words) above, have a common bond. Identify the triplets in which the words are not bonded.

(A) iii (B) ii (C) V (D) iv (E) None of these

7. A man hires a taxi to meet him at the railroad station at 3 p. m. to take him to an appointment. He catches an earlier train and arrives at 2 p.m. He decides to start walking, and is picked up en route by the taxi. He arrives twenty minutes early for his appointment. How long did he wald ?

(A) 45 minutes (B) 50 minutes (C) 24 minutes (D) 36 minutes (E) none of these

8.
Z4 X3 V9
A6 C2 ?
T5 R4 P15

(A) E10 (B) S10 (C) E12 (D) S12 (E) None of these

9. There are 10 statements written on a piece of paper:

1. At least one of statements 9 and 10 is ture.
2. This either is the first true or the first false statement.
3. There are three consecutive statements, which are false.
4. The difference between the numbers of the last true and the first true statement divides the number, that is to be found.
5. The sum of the numbers of the true statement divides the number, that is to be found.
6. This is not the last true statement.
7. The number of each true statement divides the number, that is to be found.
8. The number that is to be found is the percentage of true statements.
9. The number of divisors of the number, that is to be found,(apart from 1 and itself) is greater than the sum of the numbers of the true statements.
10. There are no three consecutive true statements.
What is the number?

(A) 420 (B) 520 (C) 415 (D) 515

10. “Lets hava some!” The kids around Betty as she checked the candies. “ Okey,
but I’ll have a few myself,” she told them. “It’s by age. A third of them for Bill, a
quarter for Eve, a fifth for Linda, and a sixth for Bruce. That leaves just six for me.”
How many were there in all?

(A) 200 (B) 180 (C) 120 (D) 90 (E) None of these


11. The question given below has problem and two statements numbered I and II giving
certain information. You have to decide if the information given in the statements is
sufficient for answering the problem. Indicate your answer as

(A) if the data in statement I alone is sufficient;
(B) if the data in statement II alone is sufficient;
(C) If the either in I and II alone is sufficient;
(D) If the data given in I and II are not sufficient;
(E) If the data given in I and II together are needed.

12. “At a party

(1) There were 9 men and children
(2) There were 2 more women than children
(3) The number of different man-woman couples possible was 24.
Of the three groups – men, women, and children
(4) There were 4 of one group
(5) There were 6 of one group
(6) There were 8 of one group”

Exactly one of the speaker’s statement is false. Which of (1) through (6) is false
(A) 3 (B) 5 (C) 4 (D)2 (E) none of these

13. Your pockets are tearing from the weight of all the coins in them. After you unload
them onto the kitchen table, you discover something surprising. You have exactly the
same number of pennies, nickels, dimes, and quarters, totaling $6.15. How many of
each coin do you have?

(A) 10 of each (B) 22 of each (C) 15 of each (D) 20 of each (E) None of these


14. I have ten boxes which I want to pack into crates. Each crate is capable of carrying a maximum of 25 kg. Unfortunately I only have three crates, and the total weight of the boxes is 75 kg:




How can I pack the boxes into crates so that each one has exactly 25 kg?

Crate 1 Crate 2 Crate 3
(A) 15, 10 11,13,1 9,8,4,2,2
(B) 15, 10 11,8,4,2 13,9,2,1
(C) 15,9,1 11,8,4,2 13,10,2
(D) all of these
(E) None of these

15. “What day do you go back to school, Henry?” asked his grandmother one day.
“Well,” Henry replied, “Nine days ago, the day before yesterday was three weeks before the second day of term.” If Henry had this conversation on a Sunday, what day of the week did he start school?

(A) Monday (B) Wednesday (

NOVELL COMPANY EXAM PAPERS





NOVEL COMPANY EXAMPAPERS




1). A beggr collects cigarette stubs and makes one ful cigarette
with every 7 stubs. Once he gets 49 stubs . How many cigarettes
can he smoke totally.
Ans. 8

2). A soldiar looses his way in a thick jungle at random walks
from his camp but mathematically in an interestingg fashion.
First he walks one mile east then half mile to north. Then 1/4
mile to west, then 1/8 mile to south and so on making a loop.
Finally hoe far he is from his camp and in which direction.
ans: in north and south directions
1/2 - 1/8 + 1/32 - 1/128 + 1/512 - and so on
= 1/2/((1-(-1/4))
similarly in east and west directions
1- 1/4 + 1/16 - 1/64 + 1/256 - and so on
= 1/(( 1- ( - 1/4))
add both the answers

3). hoe 1000000000 can be written as a product of two factors
neither of them containing zeros
Ans 2 power 9 x 5 ppower 9 ( check the answer )

4). Conversation between two mathematcians:
first : I have three childern. Thew pproduct of their ages is 36
. If you sum their ages . it is exactly same as my neighbour's
door number on my left. The sacond mathematiciaan verfies the
door number and says that the not sufficient . Then the first
says " o.k one more clue is that my youngest is the youngest"
Immmediately the second mathematician answers . Can you aanswer
the questoion asked by the first mathematician?
What are the childeren ages? ans 2 and 3 and 6

5). Light glows for every 13 seconds . How many times did it
between 1:57:58 and 3:20:47 am
ans : 383 + 1 = 384

6). 500 men are arranged in an array of 10 rows and 50 columns .
ALL tallest among each row aare asked to fall out . And the
shortest among THEM is A. Similarly after resuming that to their
originaal podsitions that the shorteest among each column are
asked to fall out. And the longest among them is B . Now who is
taller among A and B ?
ans A

7). A person spending out 1/3 for cloths , 1/5 of the remsaining
for food and 1/4 of the remaining for travelles is left with
Rs 100/- . How he had in the begining ?
ans RS 250/-

8). there are six boxes containing 5 , 7 , 14 , 16 , 18 , 29
balls of either red or blue in colour. Some boxes contain only
red balls and others contain only blue . One sales man sold one
box out of them and then he says " I have the same number of red
balls left out as that of blue ". Which box is the one he solds
out ?
Ans : total no of balls = 89 and (89-29 /2 = 60/2 = 30
and also 14 + 16 = 5 + 7 + 18 = 30

9). A chain is broken into three pieces of equal lenths
conttaining 3 links each. It is taken to a backsmith to join into
a single continuous one . How many links are to tobe opened to
make it ?
Ans : 2.

10). Grass in lawn grows equally thickand in a uniform rate. It
takes 24 days for 70 cows and 60 for 30 cows . How many cows can
eat away the same in 96 days.?
Ans : 18 or 19

11). There is a certain four digit number whose fourth digit is
twise the first digit.
Third digit is three more than second digit.
Sum of the first and fourth digits twise the third number.
What was that number ?
Ans : 2034 and 4368

If you qualify in the first part then you have to appear for
the second i.e the following part.
Part 2.

1. From a vessel on the first day, 1/3rd of the liquid
evaporates. On the second day 3/4th of the remaining liquid
evaporates. what fraction of the volume is present at the end of
the II day.

2. an orange galss has orange juice. and white glass has apple
juice. Bothe equal volume 50ml of the orange juice is taken and
poured into the apple juice. 50ml from the white glass is poured
into the orange glass. Of the two quantities, the amount of
apple juice in the orange glass and the amount of orange juice in
the white glass, which one is greater and by how much?

3. there is a 4 inch cube painted on all sides. this is cut
into no of 1 inch cubes. what is the no of cubes which have no
pointed sides.

4. sam and mala have a conversation. sam says i am vertainly not
over 40. mala says i am 38 and you are atleast 5 years older
than me. Now sam says you are atleast 39. all the sattements by
the two are false. How hold are they realy.

5. ram singh goes to his office in the city, every day from his
suburbun house. his driver mangaram drops him at the railway
station in the morning and picks him up in the evening. Every
evening ram singh reaches the station at 5 o'clock. mangaram
also reaches at the same time. one day ramsingh started early
from his office and came to the station at 4 o'clock. not
wanting to wait for the car he starts walking home. Mangaram
starts at normal time, picks him up on the way and takes him back
house, half an hour early. how much time did ram singh walk.

6. in a railway station, there are tow trains going. One in the
harbour line and one in the main line, each having a frequency of
10 minutes. the main line service starts at 5 o'clock. the
harbour line starts at 5.02a.m. a man goes to the station every
day to catch the first train. what is the probability of man
catchinhg the first train

7. some people went for vaction. unfortunately it rained for 13
days when they were there. but whenever it rained in the
morning, they had clean afternood and vice versa. In all they
enjoyed 11 morning and 12 afternoons. how many days did they
stay there totally

8. exalator problem repeat

9. a survey was taken among 100 people to firn their preference
of watching t.v. programmes. there are 3 channels. given no of
people who watch
at least channel 1
" " 2
" " 3
no channels at all
atleast channels 1and 3
" " 1 and 2
" " 2 and 3
find the no of people who watched all three.

10. albert and fernandes they have two leg swimming race. both
start from opposite and of the pool. On the first leg, the boys
pass each other at 18 mt from the deep end of the pool. during
the II leg they pass at 10 mt from the shallow end of the pool.
Both go at const speed. but one of them is faster. each boy
rests for 4 sec to see at the end of the i leg. what is the
length of the pool.

11. T H I S Each alphabet stands for one
I S digit, what is the maximum value T
-------------- can take
X F X X
X X U X
--------------
X X N X X
--------------

THE BASIC LANGUAGE




EXAMPAPERS123.BLOGSPOT.COM







CHAPTER-1

THE BASIC LANGUAGE
 object oriented programming.
 Encapsulation.
 Polymorphism.
 CPP Preprocessor Directives.
 Comments.
 CPP Data types
 New and Delete expressions
 Type convertions.

Object oriented programming: It is nothing but doing the programs with the help of objects. So first of all we have to know what is an object? How it is implemented in C++ programming? All these details are given below.
CLASS: A class is an expanded concept of a data structure: instead of holding only data, it can hold both data and functions.
OBJECT: An object is an instantiation of a class. In terms of variables, a class would be the type, and an object would be the variable.
By using these objects we can access the class members and member functions.

Classes are generally declared using the keyword class, with the following format:

class class_name { EG: Class student
access_specifier_1: {
member 1; charname;
access_specifier_2: int marks:
member2; float average;
… }s;
}object_names;
In the above eg: “S” is the object so we can access entire data of the student class by using this object. We discuss about the access specifiers in next concepts in detail.
Encapsulation: Wrapping up of a data in to single logical unit (i.e class) is called encapsulation. So writing class is known as encapsulation.
Polymorphism: Simply it one thing different actions let me explain consider one person (assume that person is one thing)he will exibit different actions depending on situations like his son called him daddy, and his father called him son, and his wife called him husband. I will explain how this concept is implemented in our C++ concepts in the upcoming chapters.

Inheritance: A key feature of C++ classes is inheritance. Inheritance allows creating classes which are derived from other classes, so that they automatically include some of its “parent’s” members, plus its own. We will the implementation of this concept in detail in the upcoming chapters.

Comments: comments are parts of the source code disregarded by the compiler. They simply do nothing. Their purpose is only to allow the programmer to insert notes or descriptions embedded within the source code.

C++ supports two ways to insert comments:
//line comment
/*block comment*/
The first of them, known as line comment, discards everything from where the pair of slash signs (//) is found up to the end of that same line. The second one, known as block comment, discards everything between the /* characters and the first appearance of the */ characters, with the possibility of including more than one line.

We are going to add comments to our second program:

If you include comments within the source code of your programs with out using the comment characters combinations //,/* or */, the compiler will take them as if they were C++ expressions, most likely causing one or several error messages when you compile it.
Preprocessor directives:
Preprocessor directives are lines included in the code of our programs that are not program statements but directives for the processor. These lines are always preceded by a pound sign (#). The processor executed before the actual compilation of code is generated by the statements.

These processor directives extend only across a single line of code. As soon as a new line character is found, the processor directive is considered to end. No semicolon (;) is expected at the end of a preprocessor directive. The only way a preprocessor directive can extend through more than one line is by preceding the new line character at the end of the line by a backslash (/)
Macro definitions (#define, #undef)
To define preprocessor macros we can use #define. Its formate is:
#define identifier replacement.
When the preprossor encounters this direccive , it replaces any occurrence of identifier in the rest of the code by replacement can be an expresson , a statement , a block or simply anything. The processor does not understand C++ , it simply replaces any occurrence of identifier by replacement.
#define TABLE_SIZE 100
int table 1 [TABLE_SIZE];
int table 2 [TABLE_SIZE];
After the preprocessor has replased TABLE_SIZE, the code becomes equivalent to:
Int table 1[100];
Int table 2 [100];
This use of #define as constant definer is already known by us from previous tutorials, but #define can work also with parameters to define function macros:
#define getmax(a,b) a>b?a:b
This would replace any occurrence of getmax followed by two arguments by the replacement expression, but also replasing each argument by its identifier, exactly as you would expect if it was a function:
//function macro
#include
Using namespace std;

#define getmax(a,b) ((a)>(b)?(a)b))

Int main()
{
Int x=5,y;
Y=getmax (x,2);
Cout << y << endl;
Cout<< getmax(7,x)<Return 0;
} 5
6

Defined macros are not affected by block structure. A macro lasts until it is undefined with the #undef preprosseor directive:
#define table_size 100
Int table 1 [TABLE_SIZE];
#undef TABLE_SIZE
#define TABLE_SIZE 200
Int table 2[TABLE_SIZE];

This would generate the same code as:

Int table 1 [100];
Int table 2 [200];

Function macro definitions accept two special operators (# and ##) in the replacement sequence:
If the operator # is used before a parameter is used in the replacement sequence, that parameter is replaced by a string literal (as if it were enclosed between double quotes)
#define str (x) #x
Cout << str(test);

This would be translated into:
Cout << “test”;

The operator ## concatenates two arguments leaving no blank spaces between them:

#define glue(a,b) a## b
Glue(c,out) << ”test’’;
This would also be translated into:
Cout <<”test”;
Because preprocessor replacements happen before any C++ syntax check, macro definitions can be a tricky feature, but be careful: code that relies heavily on complicated macros may result obscure to other programmers, since the syntax they expect in C++.
Conditional inclusions (#ifdef, #ifdef, #if, #endif, #else and #elif)
These directives allow to include or discard part of the code of a program if a certain condition is met.
#ifdef allowes a section of a program to be compiled only if the macro that is specified as the parameter has been defined, no matter which its value is. For example:
#ifdef TABLE_SIZE
int table [TABLE_SIZE];
#endif
In this case , the line of code int table [TABLE_SIZE]; is only compiled if TABLE_SIZE was previously defined with #define, independently of its value. If it was not defined, that line will not be included in the program compilation.
#ifndef serves for the exact opposite: the code between #indef and #endif directives is only compiled if the specified identifier has not been previously defined. For example:
#ifndef TABLE_SIZE
#define TABLE_SIZE 100
#endif
Int table [TABLE_SIZE];


/* My second program in C++
With more comments*/
#include
Using namespace std;
Int main ()
{
Cout <<”Hello World!”; // prints Hello World!
Count <<”I’m a C++program”; //prints I’m a C++ program
return 0;
} Hellow World! I’m a C++ program