HOME         WALKINS         CORE JOBS          GOVT JOBS          TESTING JOBS          BPO JOBS amity niit hp idea nokia religare samsung max_new_york_life naukri

Sunday, January 31, 2010

Whole test paper

Section 1 - Verbal Ability
No.of Questions : 20
Duration in Minutes: 20
Assessments by Merit Trac
Directions for Questions 1-3 : Choose the option which will correctly fill the blank.
1) I am writing to enquire _________the possibility of hiring a conference room at the hotel on the 2nd of September.
A) Of
B) About
C) Into
D) After

2) _________ having her lunch, she stood - the tree and waited _______ him.
A) With, below, for
B) After, under, for
C) Inside, further, to
D) About, across, into

3) The microscopic animals are the primary food for larval cod and their decline has meant that fewer fish are making it to adulthood to be caught_________ trawlermen.
A) In
B) Into
C) By
D) With
Directions for Questions 4-6 : Choose the word nearest in meaning to the word in ITALICS from the given options.
4) The jacket is impervious to water.
A) Dirty
B) Pure
C) Impenetrable
D) Favorable
5) Chandan was chagrined with the continuous disruption of the power supply to his home.
A) Delighted
B) Creation
C) Peeved
D) Security
6) The latest ordinance issued by the government has provided the bank with two options.
A) Decision
B) Law
C) Opinion
D) Verdict
Directions for Questions 7-10: Choose the answer option which will correctly fill the blank.
7)_________ great writer is convinced that whatever he says is not an echo or imitation of what others have said.
A) An
B) The
C)A
D) No article required
8) ________ Reserve Bank of India directed banks to closely watch _______spending through International Debit Cards.
A) A,the
B) The, the
C) The, a
D) -\n, the
9) The officer received _____ official letter from _____ Ministry of IT in _____ Central Government.
A) A, the, an
C) An, the, the
B) A, an, the
D) An, an, the
10) You CANNOT send out ______uneducated man into ______ world of technology and expect him to perform.
A) An, an
B) A, an
C ) An, the
D) The, an
Directions for Questions 11-15: Read the passage and answer the questions that follow on the basis of the information provided in the passage. Microprocessor is an electronic computer Central Processing Unit (CPU) made from miniaturized transistors and other circuit elements on a single semiconductor Integrated Circuit (IC). Before the advent of microprocessors, electronic CPUs were made from individual small-scale Integrated Circuits containing the equivalent of only a few transistors. By integrating the processor onto one or a very few large-scale Integrated Circuit packages (containing the equivalent of thousands or millions of discrete transistors), the cost of processor power was greatly reduced. The evolution of microprocessors has been known to follow Moore's Law when it comes to steadily increasing performance over the years.
This law suggests that the complexity of an Integrated Circuit with respect to minimum component cost will double in about 18 months. From humble beginnings as the drivers for calculators, the continued increase in power has led to the dominance of microprocessors over every other form of computer; every system from the largest mainframes to the smallest handheld computers now uses a microprocessor at their core. .As with many advances in technology, the microprocessor was an idea wbose time had come. Three projects arguably delivered a complete microprocessor at about the same time: Intel's 4004, Texas Instruments' TMS1000, and Garrett AiResearch's Central Air Data Computer. . A computer-on-a-chip is a variation of a microprocessor, which combines the microprocessor core (CPU), some memory, and I/O (input/output) lines, all on one chip. The proper meaning of microcomputer is a computer using a (number of) microprocessor(s) as its CPU(s), while the concept of the patent is somewhat more similar to a micro controller.
11) Which of the following descriptions would NOT fit a microprocessor?
A) Electronic computer
B) Central Processing Unit
C) Memory disk
D) A single integrated chip circuit.
12) Select the TRUE statement from the following.
A) Microprocessors and computers on a chip are variations of each other.
B) Integration of processing power on chips has made processing power cheaper.
C) Before microprocessors, CPUs were not made from individual small scale ICs.
D) A microprocessor circuit only has transistors in it.
13) Which of the following was NOT the first to develop a microprocessor?
A) Microsoft
B) Intel
C) Texas Instruments
D) Garret
14) According to the passage, which of these is NOT a use of microprocessors?
A) Drivers for calculators
B) Core for large mainframes
C) Advanced mobile phones
D) Used for small handheld computers
15) "A number of microprocessors at its CPU" is an apt description of a:
A) 11icro-controller
B) Micro-computer
C) Micro-processor
D) Micro-transistor
Directions for Questions 16-20: Read the passage and answer the questions that follow on the basis of the information provided in the passage.
Dynamic Link Libraries Windows provides several files called dynamic link libraries (DLLs) that contain collections of software code that perform common functions such as opening or saving a file. When Windows application wants to use one of those functions or routines, the app sends a message to Windows with the names of the DLL file and the function. This procedure is known as calling a function. One of the most frequently used DLLs is Windows COMMDLG.DLL, which includes among others, the functions to display File Open, File Save, Search, and Print dialog boxes. The application also sends any information the DLL function will need to complete the operation. For example, a program calling the Open File function in COMMDLG.DLL would pass along a file spec, such as *. * or *.DOC, to be displayed in the dialog box's Filename text box.
The application also passes along a specification for the type of information it expects the DLL to return to the application when the DLL's work is done. The application, for example, may expect return information in the form of integers, true/false values, or text. Windows passes the responsibility for program execution to the DLL, along with the parameters and the return information the DLL will need. The specific DLL is loaded into memory, and then executed by the processor. At this point the DLL, rather than the application, runs things. The DLL performs all the operations necessary to communicate with Windows and, through Windows, with the PC's hardware. After the DLL function is complete, the DLL puts the return information into memory, where it can be found by the application, and instructs Windows to remove the DLL routine from memory. The application inspects the return information, which usually tells whether the DLL function was able to execute correctly. If the operation was a success, the application continues from where it left off before issuing the function call. If the operation failed, the application displays an error message.
16) By using DLLs, Windows:
A) Saves processing time
B) Multitasks
C) Shares program code
D) Communicates with PCs hardware
17) To use any routine of a DLL, Windows:
A) Searches and copies it in the application code and executes it
B) Loads the DLL file and searches and executes the routine
C) Loads just the required routine in memory and executes it
D) Searches the location of the routine and instructs the application to execute it
18) Which information does an application need to passto Windows to use a DLL routine?
A) Just the name of the routine
B) Just the name of the DLL, which finds in turn the routine to be executed in return
C) Both the name of the routine as well as DLL and any parameters
D) Name of the DLL, routine, any parameters and type of information to be returned
19) According to the passage, while the DLL routine is executing, the calling application:
A) Waits for the routine to execute
B) Continues with other tasks
C) Helps the DLL routine perform by communicating with Windows and through Windows with the PC's hardware
D) Passes all responsibility of program execution to the DLL and is removed from memory
20) The DLL function after execution returns:
A) The parameters and information into memory, where it can be inspected by the calling application
B) Information into memory, where it can be inspected by the calling application
C) To the calling application the information required by it so that it can inspect it
D) The information required into memory so that DLL can inspect whether the function operation was a success
Section 2 -Analytical Ability
No. of Questions: 20
Duration in Minutes: 20
21) 70 students are required to paint a picture. 52 use green color and some children use red, 38 students use both the colors. How many students use red color?
A) 24
B) 42
C) 56
D)70
22) At an international conference, 100 delegates spoke English, 40 spoke French, and 20 spoke both English and French. How many delegates could speak at least one of these two languages?
A) 110
B) 100
C) 140
D) 120
23) A group of 50 students were required to clear 2 tasks, one in rock-climbing and the other in bridge crossing during an adventure sports expedition. 30 students cleared both the tasks. 37 cleared bridge crossing, 38 students cleared rockclimbing. How many students could not clear any task?
A)0
B)3
C)5
D) 9
24) A dance instructor conducts annual workshops in which he holds sessions for basic learners and trainers. In a particular year, 2000 people attended the workshop. 1500 participated as learners and 800 as trainers. How many participated as only trainers?
A) 200
B) 500
C) 800
D) 1500
25) In a group of 400 readers who read science fiction or literacy works or both, 250 read science fiction and 230 read literacy works. How many read both science fiction and literacy works?
A) 80
B) 160
C) 220
D) 400
26) A man said to a lady, "Your mother's husband's sister is my aunt". How is the lady related to the man?
A) Daughter
B) Grand daughter
C) Mother
D) Sister
27) A man is facing west. He turns 45degree in the clockwise direction and then another 180 degree in the same direction and then 270 degree in the anticlockwise direction. Which direction is he facing now?
A) South
B) North-West
C) West
D) South-West
28) In a row of 60, if Ram is standing at 17th from the first, what is his position from the last?
A) 25
B) 43
C)44
D) 45
29) A man is facing northwest. He turns 90 degrees in the clockwise direction and then 135degrees in the anti-clockwise direction. Which direction is he facing now?
A) East
B) West
C) North
D) South
30) What three letter word best completes the below words? VA - __E S___TER - - _ER
A) STR
B)TER
C) CAT
D) \\FAT
Directions for Questions 31-35: In the following questions mark: 1, if the question can be answered with the help of statement I alone. 2, if the question can be answered with the help of statement II alone. 3, if the question can be answered with the help of both I and II. 4, if the question cannot be answered at all.
31) What is the value of P? I. P and Q are integers II. PQ = 10, P + Q =5
A)l
B)2
C)3
D)4
32) Who got the highest score in the Mathematics examination, among Sumit, Amit and Namit. No two students got the same marks. I. Sumit got more marks than Namit. II. Amit did not get lesser marks than Sumit, who did not get lesser marks than Namit.
A)l
B)2
C)3
D)4
33) How many hours does it take some boys and girls in a camp to put up the tent? I. There are 4 boys and 7 girls. II. A girl can put up the tent in 5 hours and a boy can put up the tent in 3 hours.
A)l
B)2
C)3
D)4
34) If p, q, r, s and t are in an Arithmetic Progression, is r the largest among them? I.t>O II. p, q < 0
A)l
B)2
C)3
D)4
35) Is X a whole number, if X > O? I. 2X is an even number. II. 3X is an odd number.
A)l
B)2
C)3
D)4
Directions for Questions 36-40: In the following questions mark: 1, if the question can be answered with the help of statement I alone. 2, if the question can be answered with the help of statement II alone. 3, if the question can be answered with the help of both I and II. 4, if the question cannot be answered at all.
31) What is the value of P? I. P and Q are integers II. PQ = 10, P + Q =5
A)l
B)2
C)3
D)4
32) Who got the highest score in the Mathematics examination, among Sumit, Amit and Namit. No two students got the same marks. I. Sumit got more marks than Namit. II. Amit did not get lesser marks than Sumit, who did not get lesser marks than Namit.
A)l
B)2
C)3
D)4
33) How many hours does it take some boys and girls in a camp to put up the tent? I. There are 4 boys and 7 girls. II. A girl can put up the tent in 5 hours and a boy can put up the tent in 3 hours.
A)l
B)2
C)3
D)4
34) If p, q, r, s and t are in an Arithmetic Progression, is r the largest among them? I.t>O II. p, q < 0
A)l
B)2
C)3
D)4
35) Is X a whole number, if X > O? I. 2X is an even number. II. 3X is an odd number.
A)l
B)2
C)3
D)4
Directions for Questions 36-40: In a certain code, the symbol for 0 (zero) is. * and that for 1 is $. The numb.:rs greater than 1 are to be written only by using the two symbols given above. The value of the symbol for 1 doubles itself every time it shifts one place to the left. (For example, 4 is written as $**; and; 3 is written as $$)
36) 11x 17 / 10 + 2 x 5 + 3 / 10 can also be represented as:
A) $*$$*
B) $*$$$
C) $$$*$
D) $**$$
37) 260 can be represented as:
A) $****$**
B) $$*$$$$$
C) $$*$$$$**
D) $*****$**
38) 60 / 17 can also be represented as:
A) $$$*$*** / $$**$$
B) $$$***** / $$**$$
C) $*$$*$** / $$**$$
D) $$*$*$** / $$**$$
39) $***$ can be represented as:
A) $$$ / $* B) $*$**- $$
C) $*$*$- $$
D) $$$***$ - $$
40) 30^2 can be represented as:
A) ($$*$$ ) $*+ $*$*$$*$
B) ($$*$$ ) $* + $$****$
C) ( $$*$$ ) $$ + $*$****
D) ( $$*$$ ) $$ + $*$**$
Section 3 : Attention To Detail
No. of Questions: 11
Duration in Minutes: 11
Directions for Questions 41-48: Follow the directions given below to answer the questions that follow. Your answer for each question below would be: A, if ALL THREE items given in the question are exactly ALIKE. B, if only the FIRST and SECOND items are exactly ALIKE. C, if only the FIRST and THIRD items are exactly ALIKE. D, if only the SECOND and THIRD items are exactly ALIKE. E, if ALL THREE items are DIFFERENT.
41)LLMLLLKLMPUU, LLMLLLKLMPUU, LLMLLLKLMPUU
A) A
B)B
C)C
D)D
E)E
42) 0452-9858762, 0452-9858762, 0452-9858762
A) A
B) B
C) C
D) D
E) E
43) NIINIININN, NIININNINN ,NIINIININN
A) A
B)B
C)C
D)D
E)E
44) 4665.8009291, 4665.7999291, 4665.8009291
A) A
B) B
C)C
D)D
E)E
45)808088080.8080, 808008080.8080, 808088080.8080
A) A
B)B
C)C
D)D
E)E
46) If* standsfor /, / stands for -,+ stands for * and -stands for +, then 9/8*7+5-10=?
A) 13.3
B) 10.8
C) 10.7
D) 11.4
47) If* stands for /, / stands for -,+ stands for * and -stands for +, then 9/15*9+2-9=?
A) 14.7
B) 15.3
C) 14.1
D) 16.2
48) If * stands for /, / stands for -, + stands for * and - stands for +, then which of the following is TRUE?
A) 36/12*4+50-8 =-106
B) 12*8/4+50-8 =45.5
C) 36*4/12+36-8 = 4.7
D) 8*36/4+50-8 = 300

Set: 3648(A) ver-Z.O For: Aecenture IDC
Directions for Questions 49-51: In the following questions, the following letters indicate mathematical operations as indicated below: A: Addition V: Equal to S: Subtraction W: Greater than M: Multiplication X: Less than D: Division Out of the four alternatives given in these questions, only one is coccect according to the above letter symbols. Identify the coccect one.
49) See the options given below
A) 6 S 7 A 2 M 3 W 0 D 7
B) 6 A 7 S 2 M 3 W 0 A 7
C) 6 S 7 M 2 S 3 W 0 M 7
D) 6 M 7 S 2 A 3 X 0 D 7
50) If * stands for -,/ stands for +, + stands for / and -stands for *, then which of the following is TRUE?
A) 16/8*6+90-12 =23.2
B) 8*12/6+90-12 =7.2
C) 16*6/8+16-12 =-4.1
D) 12*16/6+90-12 =8
51) If * stands for -,/ stands for +, + stands for / and -stands for * , then which of the following is TRUE?
A) 16*4/18+16-8 = -10.1
B) 18*8/4+40-8 =-2.8
C) 16/18*4+40-8 =33.2
D) 8*16/4+40-8 =-2
Directions for Questions 52-55: For the post of a manager of a leading call centre -Arkade Inc. - situated in Ludhiana, the following are the criteria the candidate must satisfy: - The candidate should have a Management Degree. - The candidate should have at least 4 years of similar experience at-another call center. - The candidate should be more than 30 years of age as on the 1st of July 2003. - The candidate should have 6 months of international exposure, i.e. should have been posted in a foreign country. If a candidate does not satisfy the 1st condition but has more than 2 years of international experience, then the VP operations, will interview him. If a candidate does not satisfy the 4th condition, then the HR manager will interview him.
52) Shakuntala was selected for a managerial position in an international call center after she passed out from AIM Management Institute. After working for 3 years in the call center, she took a sabbatical. She is 29 years of age as on the date of application. She will be:
A) Interviewed only by the HR
B) Interviewed only by the VP
C) Rejected
D) Data insufficient
53) Rajiv has been working as a Manager in Zephyr Inc. for 4 years now. He is an Engineering graduate from a premier engineering institute. His certificate lists his date of birth as 17/12/1974. He has worked in the hotel industry at the executive level. He is:
A) Give an aptitude test
B) Interviewed by the VP
C) Data insufficient
D) Not considered
54) Soma has 2 years of experience in Welsh Inc. and 2 years of experience in Franc Inc., both leading call centers, as a manager. She has a management degree from a premier management organization. She turned 30 this December (2002). She is a B.Com Graduate from St. Xavier's, Calcutta. If she applies for the post, she will:
A) Be interviewed directly by the VP Operations
B) Not be considered
C) Be interviewed by the HR
D) Have to give an aptitude test
55) Salina has over 4 years of experience in Care Touch, a leading call center, as a manager. She completed her MBA from Ranchi and worked in Singapore for UNO for 2 years before joining Care Touch. She will be:
A) Recruited
B) Rejected
C) Interviewed by dIe VP Operations
D) Data insufficient

Wednesday, January 27, 2010

Interview Questions

. Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.
2. What are the 4 basics of OOP?
3. Define Data Abstraction. What is its importance?
4. Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 2 numbers. Find the missing numbers.
5. Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
6. Given a string,find the first un-repeated character in it? Give some test cases
7. You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as 1 step.)
8. Given a cube of size n*n*n (i.e made up of n^3 smaller cubes), find the number of smaller cubes on the surface. Extend this to k-dimension.
9. What is a C array and illustrate the how is it different from a list.
10. What is the time and space complexities of merge sort and when is it preferred over quick sort?
11. Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
12. Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.
13. Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
14. Given an array of size n, containing every element from 1 to n+1, except one. Find the missing element.
15. How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
16. Explain polymorphism. Provide an example.
17. Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)
18. You are given some denominations of coins in an array (int denom[])and infinite supply of all of them. Given an amount (int amount), find the minimum number of coins required to get the exact amount. What is the method called?
19. Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number

technical-c&c++

1.Two tables emp (empid,name,deptid,sal) and dept(deptid,deptname) are there.write a query which displays empname,corresponding deptname also display those employee names who donot belong to any dept.
2.Display the employees whose salary is less than average salary.
3.what is the output of the program
main()
{
int c=5;
printf("%d\n%d\n%d",c,c<<2,c>> 2);
}
4. main()
{
int a[8][10],c=0,i,j;
for(i=0;i<10;
i++) for(j=0;
j<8;j++) a[j][i]=c++;
printf("%d",a[3][6]);
}
5.What is the wrong in this program
main()
{
char *p,*q;
p=(char *)malloc(25);
q=(char*) malloc(25);
strcpy(p,"amazon" );
strcpy(q,"hyd");
strcat(p,q);
printf("%s",p);
}
6.write prefix and post fix notation for (a+b)*c-(d+e)^(f-g)
7.what is the output of the program
main()
{
int i=5;
printf("%d",fun(fun(fun(fun( fun(i))))));
}
void fun (int i)
{ if(i%2) return (i+(7*4)-(5/2)+(2*2));
else return (i+(17/5)-(34/15)+(5/2));
}

Technical

1.What would be the output of the following program.
#include
main()
{
extern int a;
printf("%d",a);;
}
int a=20;
(a) 20 (b) 0 (c) garbage value (d) error!!
2.What would be the output of the following program.
main()
{
int a[5]={2,3};
printf("\n %d %d %d",a[2],a[3],a[4]);
}
(a) garbage value (b) 2 3 3 (c) 3 2 2 (d) 0 0 0

3.What would be the output of the following program.
main()
{
inti=-3,j=2,k=0,m;
m=++i&&++j||++k;
printf("\n %d %d %d %d",i,j,k,m);
}
(a) -2 3 0 1 (b) -3 2 0 1 (c) -2 3 1 1 (d) error
4.What would be the output of the following program.
main()
{
int a,b;
a=sumdig(123);
b=sumdig(123);
printf("%d %d",a,b);
}
sumdig(int n)
{
static int s=0;
int d;
if(n!=0)
{
d=n%10;
n=(n-d)/10;
s=s+d;
sumdig(n);
}
else return(s);
}
(a) 12 6 (b) 6 12 (c) 3 15 (d) error

5.What would be the output of the following program.
#define CUBE(x) (x*x*x)
main()
{
int a,b=3;
a=CUBE(b++);
printf("\n %d %d",a,b);
}
(a) 64 4 (b) 27 4 (c) 27 6 (d) 64 6

6.What would be the output of the following program.
main()
{
const int x=get();
printf("%d",x);
}
get()
{
return(20);
}
(a) 20 (b) garbage value (c) error (d) 0

7.A function has this prototype void f1(int **x),
How will you call this function?
(a) int **a; (b) int a; (c) int *a; (d) int a=5;
f1(a); f1(&a); f1(&a); f1(&&a);

8.pointout the error, if any, in the for loop
main()
{
int l=1;
for(;;)
{
printf("%d",l++);
if(l>10)
break;
}
}
(a) The condition in the for loop is a must (b) The two semicolons should be dropped
(c) The for loop should be replaced by awhile loop (d) No error

9.Can the following piece of code be executed?
int main(void)
{
char strA[10]="compile",strB[10];
my_strcpy(strB,strA);
puts(strB);
}
char * my_strcpy(char *destination,char *source)
{
char *p=destination;
while(*source!='\0')
{
*p++=*source++;
}
*p='\0';
return destination;
}
(a) Compilation will only give a warning but will proceed to execute & will display "compile"
(b) The compilation error char *(char *,char *) differs in levels of indirection from 'int()' will occur
(c) Yes & it will print compile on the screen (d) None of the above

10.What would be the output of the following program.
#include
main()
{
char str[5]="fast";
static char *ptr_to_array = str;
printf("%s",ptr_to_array);
}
(a) Compilation will only give a warning but will proceed to execute & will display "fast"
(b) display "fast" on screen (c) will give a compilation error (d) none of the above

11.What would be the output of the following program.
main()
{
int num,*p;
num=5;
p=#
printf("%d",*p);
}
(a) 6 (b) 5 (c) junk value (d) compilation error

12.What would be the output of the following program.
main()
{
int a[3]={2,3,4};
char *p;
p=a;
p=(char *)((int *)p+1);
printf("%d",p);
}
(a) 2 (b) 0 (c) junk value (d) 3

13.What would be the output of the following program.
main()
{
int i=10;
fn(i);
printf("%d",i);
}
fn(int i)
{
return ++i;
}
(a) 10 (b) 11 (c) 12 (d) Compilation error

14. What will be the value of i & j after the loop isexecuted?
for(i=0,j=0;i<5,j<25;i++,j++)
(a) i=4,j= 24 (b) i=24,j= 24 (c) i=25,j= 25 (d) i=5,j=25

15.What would be the output of the following program.
main()
{
int i,j;
i=10;
j=sizeof(++i);
printf("%d",i);
}
(a) 11 (b) 10 (c) 4 (d) compilation error

16.What would be the output of the following program.
main()
{
int i=7;
printf("%d\n",i++*i++);
}
(a) 49 (b) 56 (c) 72 (d) compilation error

17. What will the printf print?
main()
{
char *p,*f();
p=f();
printf("f() returns:%s\n",p);
}
char *f()
{
char result[80];
strcpy(result,"anything will do");
return (result);
}
(a) f() returns: anything will do (b) f() returns:
(c) compilation error (d) The printf statement is not going to be executed

18.How many times the following program would print 'Jamboree'?
main()
{
printf("\n Jamboree");
main();
}
(a) infinite number of times (b) 32767 times
(c) 65535 times (d) till the stack does not overflow

19.Notice the error in the default statement in the code snippet below.Will it give a compilation error?
main()
{
int a=10,j;
j=fn(a);
switch(j)
{
case 30: printf("the value is 30");
break;
case 50: printf("the value is 50");
break;
default:printf("the value is not 30 or 50");
}
}
fn(int a)
{
return (++a);
}
(a) Will display "the value is 30" (b) Will display "The value is not 30 or 50"
(c) Yes a compilation error would happen
(d) No compilation errors but there will be no output on the screen

20.What would be the output of the following program.
main()
{
struct emp
{
char name[20];
int age;
float sal;
};
struct emp e = {"tiger"};
printf("\n %d %f",e.age,e.sal);
}
(a) 0 0.000000 (b) Garbage values (c) Error (d) none of the above

Aptitude Questions

1. In a class composed of x girls and y boys what part of the class is composed of girls

A.y/(x + y) B.x/xy C.x/(x + y) D.y/xy (Ans.C)


2. What is the maximum number of half-pint bottles of cream that can be filled with a 4-gallon can of cream(2 pt.=1 qt. and 4 qt.=1 gal)

A.16 B.24 C.30 D.64 (Ans.D)

3. If the operation,^ is defined by the equation x ^ y = 2x + y,what is the value of a in 2 ^ a = a ^ 3

A.0 B.1 C.-1 D.4 (Ans.B)

4. A coffee shop blends 2 kinds of coffee,putting in 2 parts of a 33p. a gm. grade to 1 part of a 24p. a gm.If the mixture is changed to 1 part of the 33p. a gm. to 2 parts of the less expensive grade,how much will the shop save in blending 100 gms.

A.Rs.90 B.Rs.1.00 C.Rs.3.00 D.Rs.8.00 (Ans.C)

5. There are 200 questions on a 3 hr examination.Among these questions are 50 mathematics problems.It is suggested that twice as much time be spent on each maths problem as for each other question.How many minutes should be spent on mathematics problems

A.36 B.72 C.60 D.100 (Ans.B)

6. In a group of 15,7 have studied Latin, 8 have studied Greek, and 3 have not studied either.How many of these studied both Latin and Greek

A.0 B.3 C.4 D.5 (Ans.B)

7. If 13 = 13w/(1-w) ,then (2w)2 =

A.1/4 B.1/2 C.1 D.2 (Ans.C)

8. If a and b are positive integers and (a-b)/3.5 = 4/7, then

(A) b < a (B) b . a (C) b = a (D) b .= a Ans. A

9. In june a baseball team that played 60 games had won 30% of its game played. After a phenomenal winning streak this team raised its average to 50% .How many games must the team have won in a row to attain this average?

A. 12 B. 20 C. 24 D. 30 (Ans. C)

10. M men agree to purchase a gift for Rs. D. If three men drop out how much more will each have to contribute towards the purchase of the gift/

A. D/(M-3) B. MD/3 C. M/(D-3) D. 3D/(M2-3M) (Ans. D)

11. A company contracts to paint 3 houses. Mr.Brown can paint a house in 6 days while Mr.Black would take 8 days and Mr.Blue 12 days. After 8 days Mr.Brown goes on vacation and Mr. Black begins to work for a period of 6 days. How many days will it take Mr.Blue to complete the contract?

A. 7 B. 8 C. 11 D. 12 (Ans.C)
12. 2 hours after a freight train leaves Delhi a passenger train leaves the same station travelling in the same direction at an average speed of 16 km/hr. After travelling 4 hrs the passenger train overtakes the freight train. The average speed of the freight train was?

A. 30 B. 40 C.58 D. 60 (Ans. B)

13. If 9x-3y=12 and 3x-5y=7 then 6x-2y = ?

A.-5 B. 4 C. 2 D. 8 (Ans. D)

14. There are 5 red shoes, 4 green shoes. If one draw randomly a shoe what is the probability of getting a red shoe (Ans 5c1/ 9c1)

15.What is the selling price of a car? If the cost of the car is Rs.60 and a profit of 10% over selling price is earned (Ans: Rs 66/-)

16. 1/3 of girls , 1/2 of boys go to canteen .What factor and total number of classmates go to canteen.
Ans: Cannot be determined.

17. The price of a product is reduced by 30% . By what percentage should it be increased to make it 100% (Ans: 42.857%)

18. There is a square of side 6cm . A circle is inscribed inside the square. Find the ratio of the area of circle to square. (Ans. 11/14 )

19. There are two candles of equal lengths and of different thickness. The thicker one lasts of six hours. The thinner 2 hours less than the thicker one. Ramesh lights the two candles at the same time. When he went to bed he saw the thicker one is twice the length of the thinner one. How long ago did Ramesh light the two candles .
Ans: 3 hours.
20. f M/N = 6/5,then 3M+2N = ?

21. If p/q = 5/4 , then 2p+q= ?

22. If PQRST is a parallelogram what it the ratio of triangle PQS & parallelogram PQRST . (Ans: 1:2 )

23. The cost of an item is Rs 12.60. If the profit is 10% over selling price what is the selling price ?

(Ans: Rs 13.86/- )

24. There are 6 red shoes & 4 green shoes . If two of red shoes are drawn what is the probability of getting red shoes (Ans: 6c2/10c2)

25. To 15 lts of water containing 20% alcohol, we add 5 lts of pure water. What is % alcohol. (Ans : 15% )

26. A worker is paid Rs.20/- for a full days work. He works 1,1/3,2/3,1/8.3/4 days in a week. What is the total amount paid for that worker ? (Ans : 57.50 )

27. If the value of x lies between 0 & 1 which of the following is the largest?

(a) x b) x2 (c) –x (d) 1/x (Ans : (d) )

28. If the total distance of a journey is 120 km .If one goes by 60 kmph and comes back at 40kmph what is the average speed during the journey? Ans: 48kmph

29. A school has 30% students from Maharashtra .Out of these 20% are Bombey students. Find the total percentage of Bombay? (Ans: 6%)

30. An equilateral triangle of sides 3 inch each is given. How many equilateral triangles of side 1 inch can be formed from it? (Ans: 9)

31. If A/B = 3/5,then 15A = ? (Ans : 9B)

32. Each side of a rectangle is increased by 100% .By what percentage does the area increase? (Ans : 300%)

33. Perimeter of the back wheel = 9 feet, front wheel = 7 feet on a certain distance, the front wheel gets 10 revolutions more than the back wheel .What is the distance? Ans : 315 feet

34. Perimeter of front wheel =30, back wheel = 20. If front wheel revolves 240 times. How many revolutions will the back wheel take? Ans: 360 times

35. 20% of a 6 litre solution and 60% of 4 litre solution are mixed. What percentage of the mixture of solution

(Ans: 36%)

36.City A's population is 68000, decreasing at a rate of 80 people per year. City B having population 42000 is increasing at a rate of 120 people per year. In how many years both the cities will have same population? (Ans: 130 years)

37.Two cars are 15 kms apart. One is turning at a speed of 50kmph and the other at 40kmph . How much time will it take for the two cars to meet? (Ans: 3/2 hours)

38. A person wants to buy 3 paise and 5 paise stamps costing exactly one rupee. If he buys which of the following number of stamps he won't able to buy 3 paise stamps . Ans: 9

39.There are 12 boys and 15 girls, How many different dancing groups can be formed with 2 boys and 3 girls.

40. Which of the following fractions is less than 1/3

(a) 22/62 (b) 15/46 (c) 2/3 (d) 1 (Ans: (b))

41. There are two circles, one circle is inscribed and another circle is circumscribed over a square. What is the ratio of area of inner to outer circle? Ans: 1 : 2

42. Three types of tea the a,b,c costs Rs. 95/kg,100/kg and70/kg respectively.How many kgs of each should be blended to produce 100 kg of mixture worth Rs.90/kg, given that the quantities of band c are equal

a)70,15,15 b)50,25,25 c)60,20,20 d)40,30,30 (Ans. (b))

43. In a class, except 18 all are above 50 years.15 are below 50 years of age. How many people are there

(a) 30 (b) 33 (c) 36 (d) none of these. (Ans. (d))

44. If a boat is moving in upstream with velocity of 14 km/hr and goes downstream with a velocity of 40 km/hr, then what is the speed of the stream ?
(a) 13 km/hr (b) 26 km/hr (c) 34 km/hr (d) none of these (Ans. A)

45. Find the value of ( 0.75 * 0.75 * 0.75 - 0.001 ) / ( 0.75 * 0.75 - 0.075 + 0.01)
(a) 0.845 (b) 1.908 (c) 2.312 (d) 0.001 (Ans. A)

46. A can have a piece of work done in 8 days, B can work three times faster than the A, C can work five times faster than A. How many days will they take to do the work together ?

(a) 3 days (b) 8/9 days (c) 4 days (d) can't say (Ans. B)

47. A car travels a certain distance taking 7 hrs in forward journey, during the return journey increased speed 12km/hr takes the times 5 hrs. What is the distance traveled

(a) 210 kms (b) 30 kms (c) 20 kms (c) none of these (Ans. B)

48. Instead of multiplying a number by 7, the number is divided by 7. What is the percentage of error obtained ?

49. Find (7x + 4y ) / (x-2y) if x/2y = 3/2 ?

(a) 6 (b) 8 (c) 7 (d) data insufficient (Ans. C)

50. A man buys 12 lts of liquid which contains 20% of the liquid and the rest is water. He then mixes it with 10 lts of another mixture with 30% of liquid. What is the % of water in the new mixture?

51. If a man buys 1 lt of milk for Rs.12 and mixes it with 20% water and sells it for Rs.15, then what is the percentage of gain?

52. Pipe A can fill a tank in 30 mins and Pipe B can fill it in 28 mins.If 3/4th of the tank is filled by Pipe B alone and both are opened, how much time is required by both the pipes to fill the tank completely ?

53. If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount then what is the profit percentage.

(a) 40% (b) 55% (c) 35% (d) 30% (Ans. D)

54. A certain number of men can finish a piece of work in 10 days. If however there were 10 men less it will take 10 days more for the work to be finished. How many men were there originally?

(a) 110 men (b) 130 men (c) 100 men (d) none of these (Ans. A)

55. In simple interest what sum amounts of Rs.1120/- in 4 years and Rs.1200/- in 5 years ?

(a) Rs. 500 (b) Rs. 600 (c) Rs. 800 (d) Rs. 900 (Ans. C)

56. If a sum of money compound annually amounts of thrice itself in 3 years. In how many years will it become 9 times itself.
(a) 6 (b) 8 (c) 10 (d) 12 (Ans A)

57. Two trains move in the same direction at 50 kmph and 32 kmph respectively. A man in the slower train observes the 15 seconds elapse before the faster train completely passes by him. What is the length of faster train ?
(a) 100m (b) 75m (c) 120m (d) 50m (Ans B)

58. How many mashes are there in 1 squrare meter of wire gauge if each mesh
is 8mm long and 5mm wide ?

(a) 2500 (b) 25000 (c) 250 (d) 250000 (Ans B)

x% of y is y% of ?
(a) x/y (b) 2y (c) x (d) can't be determined Ans. C

59. The price of sugar increases by 20%, by what % should a housewife reduce the consumption of sugar so that expenditure on sugar can be same as before ?

(a) 15% (b) 16.66% (c) 12% (d) 9% (Ans B)

60. A man spends half of his salary on household expenses, 1/4th for rent, 1/5th for travel expenses, the man deposits the rest in a bank. If his monthly deposits in the bank amount 50, what is his monthly salary ?
(a) Rs.500 (b) Rs.1500 (c) Rs.1000 (d) Rs. 900 (Ans C)

61. The population of a city increases @ 4% p.a. There is an additional annual increase of 4% of the population due to the influx of job seekers, find the % increase in population after 2 years ?

62. The ratio of the number of boys and girls in a school is 3:2 Out of these 10% the boys and 25% of girls are scholarship holders. % of students who are not scholarship holders.?

63. 15 men take 21 days of 8 hrs. each to do a piece of work. How many days of 6 hrs. each would it take for 21 women if 3 women do as much work as 2 men?
(a) 30 (b) 20 (c) 19 (d) 29 (Ans. A)

64. A cylinder is 6 cms in diameter and 6 cms in height. If spheres of the same size are made from the material obtained, what is the diameter of each sphere?

(a) 5 cms (b) 2 cms (c) 3 cms (d) 4 cms (Ans C)

65. A rectangular plank (2)1/2 meters wide can be placed so that it is on either side of the diagonal of a square shown below. (Figure is not available) What is the area of the plank? ( Ans :7*(2)1/2 )

66. What is the smallest number by which 2880 must be divided in order to make it into a perfect square ?
(a) 3 (b) 4 (c) 5 (d) 6 (Ans. C)

67. A father is 30 years older than his son however he will be only thrice as old as the son after 5 years what is father's present age ?
(a) 40 yrs (b) 30 yrs (c) 50 yrs (d) none of these (Ans. A)

68. An article sold at a profit of 20% if both the cost price and selling price would be Rs.20/- the profit would be 10% more. What is the cost price of that article?

69. If an item costs Rs.3 in '99 and Rs.203 in '00.What is the % increase in price?
(a) 200/3 % (b) 200/6 % (c) 100% (d) none of these (Ans. A)

70. 5 men or 8 women do equal amount of work in a day. a job requires 3 men and 5 women to finish the job in 10 days how many woman are required to finish the job in 14 days.
a) 10 b) 7 c) 6 d) 12 (Ans 7)

71. A simple interest amount of rs 5000 for six month is rs 200. what is the anual rate of interest?
a) 10% b) 6% c) 8% d) 9% (Ans 8%)

72. In objective test a correct ans score 4 marks and on a wrong ans 2 marks are ---. a student score 480 marks from 150 question. how many ans were correct?

a) 120 b) 130 c) 110 d) 150 (Ans130)

73. An article sold at amount of 50% the net sale price is rs 425 .what is the list price of the article?
a) 500 b) 488 c) 480 d) 510 (Ans 500)

74. A man leaves office daily at 7pm A driver with car comes from his home to pick him from office and bring back home. One day he gets free at 5:30 and instead of waiting for driver he starts walking towards home. In the way he meets the car and returns home on car He reaches home 20 minutes earlier than usual. In how much time does the man reach home usually?? (Ans. 1hr 20min)

75. A works thrice as much as B. If A takes 60 days less than B to do a work then find the number of days it would take to complete the work if both work together?

Ans. 22½days

76. How many 1's are there in the binary form of 8*1024 + 3*64 + 3 Ans. 4

77. In a digital circuit which was to implement (A B) + (A)XOR(B), the designer implements (A B) (A)XOR(B) What is the probability of error in it ?

78. A boy has Rs 2. He wins or loses Re 1 at a time If he wins he gets Re 1 and if he loses the game he loses Re 1.He can loose only 5 times. He is out of the game if he earns Rs 5.Find the number of ways in which this is possible? (Ans. 16)

79. If there are 1024*1280 pixels on a screen and each pixel can have around 16 million colors. Find the memory required for this? (Ans. 4MB)

80. On a particular day A and B decide that they would either speak the truth or will lie. C asks A whether he is speaking truth or lying? He answers and B listens to what he said. C then asks B what A has said B says "A says that he is a liar" What is B speaking ?(a) Truth (b) Lie (c) Truth when A lies (d) Cannot be determined

Ans. (b)

81. What is the angle between the two hands of a clock when time is 8:30

Ans. 75(approx)

82. A student is ranked 13th from right and 8th from left. How many students are there in totality ?

83. A man walks east and turns right and then from there to his left and then 45degrees to his right.In which direction did he go (Ans. North west)

84. A student gets 70% in one subject, 80% in the other. To get an overall of 75% how much should get in third subject.

85. A man shows his friend a woman sitting in a park and says that she the daughter of my grandmother's only son.What is the relation between the two
Ans. Daughter

86. How many squares with sides 1/2 inch long are needed to cover a rectangle that is 4 ft long and 6 ft wide

(a) 24 (b) 96 (c) 3456 (d) 13824 (e) 14266

87. If a=2/3b , b=2/3c, and c=2/3d what part of d is b/

(a) 8/27 (b) 4/9 (c) 2/3 (d) 75% (e) 4/3 Ans. (b)

88. 2598Successive discounts of 20% and 15% are equal to a single discount of

(a) 30% (b) 32% (c) 34% (d) 35% (e) 36 Ans. (b)

89. The petrol tank of an automobile can hold g liters.If a liters was removed when the tank was full, what part of the full tank was removed?

(a)g-a (b)g/a (c) a/g (d) (g-a)/a (e) (g-a)/g (Ans. (c))

90. If x/y=4 and y is not '0' what % of x is 2x-y
(a)150% (b)175% (c)200% (d)250% (Ans. (b))

Tuesday, January 26, 2010

Aptitude

1. Three containers A, B and C have volumes a, b, and c respectively; and container A is full of water while the other two are empty. If from container A water is poured into container B which becomes 1/3 full, and into container C which becomes 1/2 full, how much water is left in container A?
2. In the given figure, PA and PB are tangents to the circle at A and B respectively and the chord BC is parallel to tangent PA. If AC = 6 cm, and length of the tangent AP is 9 cm, then what is the length of the chord BC? Ans. BC = 4 cm.
3. Three cards are drawn at random from an ordinary pack of cards. Find the probability that they will consist of a king, a queen and an ace. Ans. 64/2210
4. A number of cats got together and decided to kill between them 999919 mice. Every cat killed an equal number of mice. Each cat killed more mice than there were cats. How many cats do you think there were ? Ans. 991.
5. If Log2 x - 5 Log x + 6 = 0, then what would the value / values of x be?
Ans. x = e2 or e3.
6. In june a baseball team that played 60 games had won 30% of its game played. After a phenomenal winning streak this team raised its average to 50% .How many games must the team have won in a row to attain this average?
A. 12 B. 20 C. 24 D. 30 (Ans. C)
7. .Can you tender a one rupee note in such a manner that there shall be total 50 coins but none of them would be 2 paise coins.? Ans. 45 one paisa coins, 2 five paise coins, 2 ten paise coins, and 1 twenty-five paise coins.
8. A monkey starts climbing up a tree 20ft. tall. Each hour, it hops 3ft. and slips back 2ft. How much time would it take the monkey to reach the top? Ans.18 hours.
9. What is the missing number in this series? 8 2 14 6 11 ? 14 6 18 12 Ans. 9
10. A certain type of mixture is prepared by mixing brand A at Rs.9 a kg. with brand B at Rs.4 a kg. If the mixture is worth Rs.7 a kg., how many kgs. of brand A are needed to make 40kgs. of the mixture? Ans. Brand A needed is 24kgs.
11. A wizard named Nepo says "I am only three times my son's age. My father is 40 years more than twice my age. Together the three of us are a mere 1240 years old." How old is Nepo? Ans. 360 years old.
12. One dog tells the other that there are two dogs in front of me. The other one also shouts that he too had two behind him. How many are they? Ans. Three
13. A man ate 100 bananas in five days, each day eating 6 more than the previous day. How many bananas did he eat on the first day? Ans. Eight.
14. If it takes five minutes to boil one egg, how long will it take to boil four eggs?
Ans. Five minutes.
15. The minute hand of a clock overtakes the hour hand at intervals of 64 minutes of correct time. How much a day does the clock gain or lose? Ans. 32 8/11 minutes.

16. Solve for x and y: 1/x - 1/y = 1/3, 1/x2 + 1/y2 = 5/9. Ans. x = 3/2 or -3 and y = 3 or -3/2.
17. Daal is now being sold at Rs. 20 a kg. During last month its rate was Rs. 16 per kg. By how much percent should a family reduce its consumption so as to keep the expenditure fixed? Ans. 20 %.
18. Find the least value of 3x + 4y if x2y3 = 6. Ans. 10.
19. Can you find out what day of the week was January 12, 1979? Ans. Friday.
20. A garrison of 3300 men has provisions for 32 days, when given at a rate of 850 grams per head. At the end of 7 days a reinforcement arrives and it was found that now the provisions will last 8 days less, when given at the rate of 825 grams per head. How, many more men can it feed? Ans. 1700 men.
21. From 5 different green balls, four different blue balls and three different red balls, how many combinations of balls can be chosen taking at least one green and one blue ball?
22. Three pipes, A, B, & C are attached to a tank. A & B can fill it in 20 & 30 minutes respectively while C can empty it in 15 minutes. If A, B & C are kept open successively for 1 minute each, how soon will the tank be filled? Ans. 167 minutes.
23. A person walking 5/6 of his usual rate is 40 minutes late. What is his usual time? Ans. 3 hours 20 minutes.
24. For a motorist there are three ways going from City A to City C. By way of bridge the distance is 20 miles and toll is $0.75. A tunnel between the two cities is a distance of 10 miles and toll is $1.00 for the vehicle and driver and $0.10 for each passenger. A two-lane highway without toll goes east for 30 miles to city B and then 20 miles in a northwest direction to City C.
1. . Which is the shortest route from B to C
(a) Directly on toll free highway to City C (b) The bridge (c) The Tunnel
(d) The bridge or the tunnel (e) The bridge only if traffic is heavy on the toll free highway
Ans. (a)
2. The most economical way of going from City A to City B, in terms of toll and distance is to use the
(a) tunnel (b) bridge (c) bridge or tunnel (d) toll free highway
(e) bridge and highway
Ans. (a)
3. Jim usually drives alone from City C to City A every working day. His firm deducts a percentage of employee pay for lateness. Which factor would most influence his choice of the bridge or the tunnel ?
(a) Whether his wife goes with him (b) scenic beauty on the route
(c) Traffic conditions on the road, bridge and tunnel
(d) saving $0.25 in tolls (e) price of gasoline consumed in covering additional 10 miles on the bridge
Ans. (a)
4. In choosing between the use of the bridge and the tunnel the chief factor(s) would be: I. Traffic and road conditions II. Number of passengers in the car
III. Location of one's homes in the center or outskirts of one of the cities
IV. Desire to save $0.25
(a) I only (b) II only (c) II and III only (d) III and IV only
(e) I and II only Ans. (a)
25. The letters A, B, C, D, E, F and G, not necessarily in that order, stand for seven consecutive integers from 1 to 10, D is 3 less than A, B is the middle term
F is as much less than B as C is greater than D, G is greater than F,

1. The fifth integer is
(a) A (b) C (c) D (d) E (e) F Ans. (a)
2. A is as much greater than F as which integer is less than G
(a) A (b) B (c) C (d) D (e) E Ans. (a)
3. If A = 7, the sum of E and G is
(a) 8 (b) 10 (c) 12 (d) 14 (e) 16 Ans. (a)
4. A - F = ?
(a) 1 (b) 2 (c) 3 (d) 4 (e) Cannot be determined Ans. (a)
5. An integer T is as much greater than C as C is greater than E. T can be written as A + E. What is D?
(a) 2 (b) 3 (c) 4 (d) 5 (e) Cannot be determined Ans. (a)
6. The greatest possible value of C is how much greater than the smallest possible value of D? (a) 2 (b) 3 (c) 4 (d) 5 (e) 6 Ans. (a)


26. 1. All G's are H's
2. All G's are J's or K's
3. All J's and K's are G's
4. All L's are K's
5. All N's are M's
6. No M's are G's
1. If no P's are K's, which of the following must be true?
(a) All P's are J's (b) No P is a G (c) No P is an H (d) If any P is an H it is a G (e) If any P is a G it is a J Ans. (a)
2. Which of the following can be logically deduced from the conditions stated?
(a) No M's are H's (b) No M's that are not N's are H's (c) No H's are M's
(d) Some M's are H's (e) All M's are H's Ans. (a)

3. Which of the following is inconsistent with one or more of the conditions?
(a) All H's are G's (b) All H's that are not G's are M's (c) Some H's are both M's and G's (d) No M's are H's (e) All M's are H's Ans. (a)
4. The statement "No L's are J's" is
I. Logically deducible from the conditions stated
II. Consistent with but not deducible from the conditions stated
III. Deducible from the stated conditions together with the additional statement "No J's are K's"
(a) I only (b) II only (c) III only (d) II and III only
(e) Neither I, II nor III Ans. (a)
27. In country X, democratic, conservative and justice parties have fought three civil wars in twenty years. TO restore stability an agreement is reached to rotate the top offices President, Prime Minister and Army Chief among the parties so that each party controls one and only one office at all times. The three top office holders must each have two deputies, one from each of the other parties. Each deputy must choose a staff composed of equally members of his or her chiefs party and member of the third party.
1. When Justice party holds one of the top offices, which of the following cannot be true
(a) Some of the staff members within that office are justice party members
(b) Some of the staff members within that office are democratic party members
(c) Two of the deputies within the other offices are justice party members
(d) Two of the deputies within the other offices are conservative party members
(e) Some of the staff members within the other offices are justice party members.
Ans. (a)
2. When the democratic party holds presidency, the staff of the prime minister's deputies are composed
I. One-fourth of democratic party members
II. One-half of justice party members and one-fourth of conservative party members
III. One-half of conservative party members and one-fourth of justice party members.
(a) I only (b) I and II only (c) II or III but not both
(d) I and II or I and III (e) None of these Ans. (a)
3. Which of the following is allowable under the rules as stated:
(a) More than half of the staff within a given office belonging to a single party
(b) Half of the staff within a given office belonging to a single party
(c) Any person having a member of the same party as his or her immediate superior
(d) Half the total number of staff members in all three offices belonging to a single party
(e) Half the staff members in a given office belonging to parties different from the party of the top office holder in that office.
Ans. (a)
4. The office of the Army Chief passes from Conservative to Justice party. Which of the following must be fired.
(a) The democratic deputy and all staff members belonging to Justice party
(b) Justice party deputy and all his or hers staff members
(c) Justice party deputy and half of his Conservative staff members in the chief of staff office
(d) The Conservative deputy and all of his or her staff members belonging to Conservative party
(e) No deputies and all staff members belonging to conservative parties.
Ans. (a)
28. In recommendations to the board of trustees a tuition increase of $500 per year, the president of the university said "There were no student demonstrations over the previous increases of $300 last year and $200 the year before". If the president's statement is accurate then which of the following can be validly inferred from the information given:
I. Most students in previous years felt that the increases were justified because of increased operating costs.
II. Student apathy was responsible for the failure of students to protest the previous tuition increases.
III. Students are not likely to demonstrate over new tuition increases.

(a) I only (b) II only (c) I or II but not both (d) I, II and III
(e) None Ans. (a)
29. The office staff of XYZ corporation presently consists of three bookeepers--A, B, C and 5 secretaries D, E, F, G, H. The management is planning to open a new office in another city using 2 bookeepers and 3 secretaries of the present staff . To do so they plan to seperate certain individuals who don't function well together. The following guidelines were established to set up the new office

I. Bookeepers A and C are constantly finding fault with one another and should not be sent together to the new office as a team
II. C and E function well alone but not as a team , they should be seperated
III. D and G have not been on speaking terms and shouldn't go together
IV Since D and F have been competing for promotion they shouldn't be a team
1. .If A is to be moved as one of the bookeepers,which of the following cannot be a possible working unit.
A.ABDEH B.ABDGH C.ABEFH D.ABEGH Ans.B
2. If C and F are moved to the new office,how many combinations are possible
A.1 B.2 C.3 D.4 Ans.A
3. If C is sent to the new office,which member of the staff cannot go with C
A.B B.D C.F D.G Ans.B
4. Under the guidelines developed,which of the following must go to the new office
A.B B.D C.E D.G Ans.A
5. If D goes to the new office,which of the following is/are true
I.C cannot go II.A cannot go III.H must also go
A.I only B.II only C.I and II only D.I and III only Ans.D
30.
31. After months of talent searching for an administrative assistant to the president of the college the field of applicants has been narrowed down to 5--A, B, C, D, E .It was announced that the finalist would be chosen after a series of all-day group personal interviews were held.The examining committee agreed upon the following procedure
I.The interviews will be held once a week
II.3 candidates will appear at any all-day interview session
III.Each candidate will appear at least once
IV.If it becomes necessary to call applicants for additonal interviews, no more 1 such applicant should be asked to appear the next week
V.Because of a detail in the written applications,it was agreed that whenever candidate B appears, A should also be present.
VI.Because of travel difficulties it was agreed that C will appear for only 1 interview.
1. .At the first interview the following candidates appear A,B,D.Which of the follwing combinations can be called for the interview to be held next week.
A.BCD B.CDE C.ABE D.ABC Ans.B
2. Which of the following is a possible sequence of combinations for interviews in 2 successive weeks
A.ABC;BDE B.ABD;ABE C.ADE;ABC D.BDE;ACD Ans.C
3. If A ,B and D appear for the interview and D is called for additional interview the following week,which 2 candidates may be asked to appear with D?
I. A II B III.C IV.E
A.I and II B.I and III only C.II and III only D.III and IV only
Ans.D
4. Which of the following correctly state(s) the procedure followed by the search committee
I.After the second interview all applicants have appeared at least once
II.The committee sees each applicant a second time
III.If a third session,it is possible for all applicants to appear at least twice

A.I only B.II only C.III only D.Both I and II Ans.A
32. A certain city is served by subway lines A,B and C and numbers 1 2 and 3
When it snows , morning service on B is delayedWhen it rains or snows , service on A, 2 and 3 are delayed both in the morning and afternoon When temp. falls below 30 degrees farenheit afternoon service is cancelled in either the A line or the 3 line,
but not both When the temperature rises over 90 degrees farenheit, the afternoon service is cancelled in either the line C or the 3 line but not both.When the service on the A line is delayed or cancelled, service on the C line which connects the A line, is delayed When service on the 3 line is cancelled, service on the B line which connects the 3 line is delayed.
1. On Jan 10th, with the temperature at 15 degree farenheit, it snows all day. On how many lines will service be affected, including both morning and afternoon.
(A) 2 (B) 3 (C) 4 (D) 5 Ans. D
2. On Aug 15th with the temperature at 97 degrees farenheit it begins to rain at 1 PM. What is the minimum number of lines on which service will be affected?
(A) 2 (B) 3 (C) 4 (D) 5 Ans. C
3. On which of the following occasions would service be on the greatest number of lines disrupted.
(A) A snowy afternoon with the temperature at 45 degree farenheit
(B) A snowy morning with the temperature at 45 degree farenheit
(C) A rainy afternoon with the temperature at 45 degree farenheit
(D) A rainy afternoon with the temperature at 95 degree farenheit
Ans. B
33. In a certain society, there are two marriage groups, red and brown. No marriage is permitted within a group. On marriage, males become part of their wives groups; women remain in their own group. Children belong to the same group as their parents. Widowers and divorced males revert to the group of their birth. Marriage to more than one person at the same time and marriage to a direct descendant are forbidden
1. A brown female could have had
I. A grandfather born Red
II. A grandmother born Red
III Two grandfathers born Brown
(A) I only (B) III only (C) I, II and III (D) I and II onlyAns. D
2. A male born into the brown group may have
(A) An uncle in either group (B) A brown daughter (C) A brown son
(D) A son-in-law born into red group Ans. A
3. Which of the following is not permitted under the rules as stated.
(A) A brown male marrying his father's sister
(B) A red female marrying her mother's brother
(C) A widower marrying his wife's sister
(D) A widow marrying her divorced daughter's ex-husband
Ans. B
4. . If widowers and divorced males retained their group they had upon marrying which of the following would be permissible ( Assume that no previous marriage occurred)
(A) A woman marrying her dead sister's husband
(B) A woman marrying her divorced daughter's ex-husband
(C) A widower marrying his brother's daughter
(D) A woman marrying her mother's brother who is a widower.
Ans. D
5. I. All G's are H's
II. All G's are J's or K's
III All J's and K's are G's
IV All L's are K's
V All N's are M's
VI No M's are G's
34. There are six steps that lead from the first to the second floor. No two people can be on the same step
Mr. A is two steps below Mr. C
Mr. B is a step next to Mr. D
Only one step is vacant ( No one standing on that step )
Denote the first step by step 1 and second step by step 2 etc.
1. If Mr. A is on the first step, Which of the following is true?
(a) Mr. B is on the second step (b) Mr. C is on the fourth step.
(c) A person Mr. E, could be on the third step (d) Mr. D is on higher step than Mr. C.
Ans: (d)
2. If Mr. E was on the third step & Mr. B was on a higher step than Mr. E which step must be vacant
(a) step 1 (b) step 2 (c) step 4 (d) step 5 (e) step 6 Ans: (a)
3. If Mr. B was on step 1, which step could A be on?
(a) 2&e only (b) 3&5 only (c) 3&4 only (d) 4&5 only (e) 2&4 only Ans: (c)
4. If there were two steps between the step that A was standing and the step that B was standing on, and A was on a higher step than D , A must be on step
(a) 2 (b) 3 (c) 4 (d) 5 (e) 6 Ans: (c)
5. Which of the following is false

i. B&D can be both on odd-numbered steps in one configuration
ii. In a particular configuration A and C must either both an odd numbered steps or both an even-numbered steps
iii. A person E can be on a step next to the vacant step.
(a) i only (b) ii only (c) iii only (d) both i and iii Ans: (c)
35. Six swimmers A, B, C, D, E, F compete in a race. The outcome is as follows.
i. B does not win.
ii. Only two swimmers separate E & D
iii. A is behind D & E
iv. B is ahead of E , with one swimmer intervening
v. F is a head of D
1. Who stood fifth in the race ?
(a) A (b) B (c) C (d) D (e) E Ans: (e)
2. . How many swimmers seperate A and F ?
(a) 1 (b) 2 (c) 3 (d) 4 (e) cannot be determined Ans: (d)
3. The swimmer between C & E is
(a) none (b) F (c) D (d) B (e) A Ans: (a)
4. If the end of the race, swimmer D is disqualified by the Judges then swimmer B finishes in which place
(a) 1 (b) 2 (c) 3 (d) 4 (e) 5 Ans: (b)
36. Five houses lettered A,B,C,D, & E are built in a row next to each other. The houses are lined up in the order A,B,C,D, & E. Each of the five houses has a colored chimney. The roof and chimney of each housemust be painted as follows.
i. The roof must be painted either green,red ,or yellow.
ii. The chimney must be painted either white, black, or red.
iii. No house may have the same color chimney as the color of roof.
iv. No house may use any of the same colors that the every next house uses.
v. House E has a green roof.
vi. House B has a red roof and a black chimney
1. Which of the following is true ?
(a) At least two houses have black chimney.
(b) At least two houses have red roofs.(c) At least two houses have white chimneys
(d) At least two houses have green roofs(e) At least two houses have yellow roofs
Ans: (c)
2. Which must be false ?
(a) House A has a yellow roof (b) House A & C have different color chimney
(c) House D has a black chimney (d) House E has a white chimney
(e) House B&D have the same color roof. Ans: (b)
3. If house C has a yellow roof. Which must be true.
(a) House E has a white chimney (b) House E has a black chimney
(c) House E has a red chimney (d) House D has a red chimney
(e) House C has a black chimney Ans: (a)
4. Which possible combinations of roof & chimney can house
I. A red roof 7 a black chimney II. A yellow roof & a red chimney
III. A yellow roof & a black chimney
(a) I only (b) II only (c) III only (d) I & II only (e) I&II&III Ans: (e)
37. Find x+2y
(i). x+y=10 (ii). 2x+4y=20 Ans: (b
38. Is angle BAC is a right angle
(i) AB=2BC (2) BC=1.5AC Ans: (e)
39. Is x greater than y
(i) x=2k (ii) k=2y Ans: (e)

Monday, January 25, 2010

Aptitude Questions

(1) It was calculated That 75 men could complete a piece of a work in 20 days .when work was scheduled to commence, it was found necessary to send 25 men to another project,How much longer will it take to complete the work?

Ans.30days.
Explanation:-

Before
One day work =1/20
One mansone day work=1/(20*75)

Now
No. of workers=50
One day wqrk=50*1/(20*75)
The total no.of days require to complete the work=(75*20)/50=30.

(2) A student divided a number by 2/3 when he required to multiply by 3/2. calculate
the percentage of error in his result.

Ans.0
Explanation:-

Since 3x/2=x/2/3.

(3) A dishonest shopkeeper professes to sell pulses at the cost price,but he uses a false weigh of 950grm.for a kg.His gain is________%.

Ans.5.3
Explanation:-

He sells 950gms of pulses and gains 50grams.if he sells 100 grams of pulses then he will gain(50/950)*100=5.26.

(4) a software engineer has the capacity of thinking 100lines of code in five minutes and can type 100lines of code in 10minutes.He takes a break for five minutes after every ten minutes.How many lines of codes will he complete typing after an hour.

Ans.250lines.

(5) A man was engaged on a job for 30days on the condition.That he would get a wage of Rs.10 for the day he works but he have to pay a fine of Rs.2 for each day of his abience .If he gets Rs.216 at the end, he was absent for work for ---days

Ans.7days
Explanation:-
The equation portraying the given problemis
10*x-2*(30-x)=216
Where x is the number of working days.solving this we get x=23
Numberofdays he was absent was=7(30-23)days.

Sunday, January 24, 2010

Aptitude Questions

(1) If 2x-y=4 then 6x-3y=?

(a) 15 (b)12 (c)18 (d)10

Ans.b

(2) If x=y=2z and xyz=256 then what is the value of X?

(a) 12 (b) 8 (c) 16 (d) 6

Ans.b

(3) A goat is tied to one corner of a square plot of side 12m by arope m long. Find the area it
can graze?

(a)38.5sq.m (b) 155 sq.m (c) 144sq.m (4) 19.25sq.m

Ans.a

(4) Find the smallest number in a GP whose sum is 38 and product 1728?

(a) 12 (b) 20 (c) 8 (d) none of these

Ans.c

(5) A boat travels 20kms upstream in 6hrs and 18kms down stream in 4hrs. find the speed of the boat in still water and the speed of the current?

(a) ½ kmph (b) 7/12 kmph (c) 5kmph (d) none these

Ans.b

(6) Thirty men take 20days to complete a job working 9 hours a day. How many hour a day should 40 men work to complete the job.
(a) 8hrs (b) 71/2 hrs (c) 7 hrs (d) 9 hrs
Ans.b
(7) Pipe A can fill in 20 minutes and pipe B in 30mints and pipe C can empty the same 40 mints.It all of then work gother.find the time taken to fill the tank?
(a) 171/7mins (b) 20 mins (c) 8 mins (d) none of these
Ans.a
(8) mr. shan decided to walk down the escalator of a tube station.He found that if he walks down 26 steps.he requires 30 seconds to reach the bottom.however,if he steps down 34 stairs he would only require 18 seconds toget to the bottem.if the time is measured from the moment the top step begins to descend to the time he steps off the last step at the bottom.find out the height of the stair way in steps?
Ans.46steps
(9) The average age of 10 members of a committee is the same as it was 4years age because an old member has been replaced by a young member.find how much younger is the new member?
Ans.40years
(10) ABCE is an isosceles trapezoid and ACDE is a rectangle.AB=10 and ec=20,What is the length of AE?
Ans.AE=10

Must know questions before going for a technical intervew

1. Reverse a singly linked list
2. Delete a node in double linked list
3. Sort a linked list
4. Reverse a string
5. Insert a node a sorted linked list
6. Covert a string to upper case
7. Multiple a number by 7 without using * and + operator.
8. 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.
9. Print a data from a binary tree – In-order(ascending)
10. print integer using only putchar
11. Find the factorial of number
12. Generate Fib numbers:
13. Write a function that finds the last instance of a character in a string
15. Counting set bits in a number

1. Reverse a singly linked list

//
// iterative version
//
Node* ReverseList( Node ** List ) 
{
Node *temp1 = *List;
Node * temp2 = NULL;
Node * temp3 = NULL;
while ( temp1 )
{
*List = temp1; //set the head to last node  
temp2= temp1->pNext; // save the next ptr in temp2
temp1->pNext = temp3; // change next to privous
temp3 = temp1;
temp1 = temp2;
} 
return *List;
}


2. Delete a node in double linked list

void deleteNode(node *n)
{
node *np = n->prev;
node *nn = n->next;
np->next = n->next;
nn->prev = n->prev; 
delete n;
}


3. Sort a linked list

//sorting in descending order
struct node
{
int value;
node* NEXT;
}
//Assume HEAD pointer denotes the first element in the //linked list
// only change the values…don’t have to change the //pointers

Sort( Node *Head)
{
node* first,second,temp;
first= Head;
while(first!=null)
{
second=first->NEXT;
while(second!=null)
{
if(first->value < second->value)
{
temp = new node();
temp->value=first->value;
first->value=second->value;
second->value=temp->value;
delete temp;
}
second=second->NEXT;
}

first=first->NEXT;
}
}


4. Reverse a string

void ReverseString (char *String)
{
char *Begin = String;
char *End = String + strlen(String) - 1;
char TempChar = '\0';

while (Begin < End) 
{
TempChar = *Begin;
*Begin = *End;
*End = TempChar;
Begin++;
End--;
}
}
5. Insert a node a sorted linked list
void sortedInsert(Node * head, Node* newNode)
{
Node *current = head;

// traverse the list until you find item bigger the // new node value
// 
while (current!= NULL && current->data < newNode->data)
{
current = current->next);
}
//
// insert the new node before the big item
//
newNode->next = current->next;
current = newNode;
} 
6. Covert a string to upper case
void ToUpper(char * S)
{
while (*S!=0)
{
*S=(*S >= 'a' && *S <= 'z')?(*S-'a'+'A'):*S;
S++;
}
} 
7. Multiple a number by 7 without using * and + operator.
NewNum = Num << 3; // mulitplied by 2 ^ 3 = 8
NewNum = NewNum - Num; // 8 – 1 = 7
8. 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.
#include 

int strtoint(char *s)
{
int index = 0, flag = 0;

while( *(s+index) != '\0')
{
if( (*(s + index) >= '0') && 
*(s + index) <= '9')
{
flag = 1;
index++;
}
else
{
flag = 0;
break;
}
}

if( flag == 1 )
return atoi(s);
else
return 0;
}

main() 
{ 
printf("%d",strtoint("0123")); 
printf("\n%d",strtoint("0123ii")); 
}
9. Print a data from a binary tree – In-order(ascending)
//
// recursive version
//
Void PrintTree ( struct * node node )
{
if ( node == NULL )
return;

PrintTree(node->left );
Printf(“%d”, node->data);
PrintTree(node->right );
}
10. print integer using only putchar
//
// recursive version
//
void PrintNum ( int Num )
{
if ( Num == 0 )
return;
PrintNum ( Num / 10 );
Puthcar ( ‘0’+ Num % 10 );
} 
11. Find the factorial of number
//
// recursive version
//

int Factorial( int Num )
{

If ( num > 0 )
return Num * Factorial ( Num –1 ); 
else
return 1;
}
//
// iterative version
//
int Factorial( int Num )
{
int I
int result = 1;

for ( I= Num; I > 0; I-- )
{
result = result * I;
}
return result;
}
12. Generate Fib numbers:
int fib( n ) // recursive version
{

if ( n < 2 )
return 1;
else
return fib ( n –1 ) + fib ( n –2 );

}

int fib( n ) //iterative version
{
int f1 =1, f2 = 1;

if ( n < 2 )
return 1; 
for ( i = 1; i < N; i++)
{
f = f1 + f2;
f1= f2;
f = f1;
}

return f;
}
13. Write a function that finds the last instance of a character in a string
char *lastchar(char *String, char ch)
{
char *pStr = NULL;

// traverse the entire string

while( * String ++ != NULL ) 
{
if( *String == ch ) 
pStr = String;
}

return pStr;
} 
14. Return Nth the node from the end of the linked list in one pass.
Node * GetNthNode ( Node* Head , int NthNode )
{
Node * pNthNode = NULL;
Node * pTempNode = NULL;
int nCurrentElement = 0;

for ( pTempNode = Head; pTempNode != NULL; pTempNode = pTempNode->pNext )
{
nCurrentElement++;   
if ( nCurrentElement - NthNode == 0 )
{
pNthNode = Head;
}
else
if ( nCurrentElement - NthNode > 0)
{
pNthNode = pNthNode ->pNext;
}     
}
if (pNthNode )
{
return pNthNode;
}
else
return NULL;
}
15. Counting set bits in a number.
int CoutSetBits(int Num)
{
for(int count=0; Num; Num >>= 1)
{
if (Num & 1) 
count++;
}
return count;
}

final version:

int CoutSetBits(int Num)
{
for(int count =0; Num; count++)
{
Num &= Num -1;
}
}