Sunday, 29 September 2013

Zycus Placement Paper 3

1. 2 persons start from a point & go in opposite directions. After going 3km each, they turn left & walk 4 km. How far are they now from each other?
Ans : 10 km (Pythagoras theorem)

2. In an objective test, a correct answer scores 4 marks, and a wrong answer scores 2 marks. A student scores 480 marks from 150 questions. how many answers are correct?
Answer: 120

3. With which smallest no should 2880 be divided by, to make it a perfect square.
Ans: 20

4. Which common no should be added or subtracted to 17/24 to make it 1/2.
Ans : -17/24 - n = ½
17-12/24 = n
5/24 = n
Ans: 5/24

5. If each side of a rectangle is increased by 100%, by what % the area increases?
Ans: 100%

6. Father is 30 years older than the son. He will only be thrice as old as his son after 5 years. Fathers present age?
Ans: 40 years

7. If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount, then what % profit they make?(3 marks)
Ans: 35%

8. Successive discounts of 20% and 15% are equal to a single discount of ?
Ans: 17.5%

9. Sum of digits of a 2 digit number is 8. When 18 is added to the no, the digits gets reversed. Wat is the no?
Ans: 35

10. If a & b are 2 positive integers and
(a-b)/3.5 = 4/7 then
options:
1) ba 3) b=a 4) b>=a
Ans: Option 1) b<a

11. A's population is 68000 and it decreases by 80 per year. B's population is 42000 and it increases by 120 per year. After how many years both cities will have same population?
Ans: 130

12. An exam consists of 200 questions to be solved in 3 hours, out of which 50 are maths questions. It is suggested that twice as much time be spent on each math question as for each other question. How many minutes should be spent on maths problems?
Ans: 1hr 72 mins</a

CORRECT QUESTION: Sum of the consequent 7 integers equals 1617. Find the no. of prime numbers in that sequence.
SOLUTION:
Let the numbers be x, x+1, x+2, x+3, x+4, x+5, x+6
Since their sum equals 1617, we have-
x+(x+1)+(x+2)+(x+3)+(x+4)+(x+5)+(x+6)=1617
7x+21=1617
7x=1596
x=228

Hence the numbers are: 228,229,230,231,234,235,236
Prime Numbers: 229, 231.
total no. of players is 99 other than me.50 plays soccer,45 plays basket ball,50 play valley ball.15 play all three. How many will play only 2 games/
let A=soccer players..B=basket ball players..C=vollyball players
n(A U B U C)=n(A) + n(B) + n(C) - n(A INTERSECTION B) - n(A INTERSECTION C) - n(C INTERSECTION B) + n(A INTERSECTION B - INTERSECTION C)
therefore..
100=50+45+50-intersections+15
hence..intersections=145-100+15=60play only 2 games..
An exam consists of 200 questions to be solved in 3 hours, out of which 50 are maths questions. It is suggested that twice as much time be spent on each math question as for each other question. How many minutes should be spent on maths problems?
x=time for each math problem
y= time for every other problem
50x+150y=180 minutes
x=2y because spent twic as much time on the math problems as the other

50(2y)+150y=180
100y+150y=180
250y=180
y= 180/250=18/25 of a minute per problem on the other questions
x=2(18/25)
x=36/25 minutes
1. A's population is 68000 and it decreases by 80 per year. B's population is 42000 and it increases by 120 per year. After how many years both cities will have same population?
Ans: 130
2. An exam consists of 200 questions to be solved in 3 hours, out of which 50 are maths questions. It is suggested that twice as much time be spent on each math question as for each other question. How many minutes should be spent on maths problems?

Ans: 1hr 72 mins
3. fresh mango consists of 70% water and dry mango consists of 10% water then 20Kg of fresh mango is equivalent to how much of dry mango

Ans: 6.66 kg
4. sum of the consequent 7 integers some 1613. Find the no. of prime numbers in that sequence.

5. total no. of players is 99 other than me.50 plays soccer,45 plays basket ball,50 play valley ball.15 play all three. How many will play only 2 games/

6. fresh mangoes have 70% of water in weight, dry mangoes 20% of water in weight. what is the weight of dry mangoes if weight of fresh mangoes is 20kg .ans(d)

a) 6.68kg   b) con not be determined   c) 6.0kg   d)6.6kg

7. total 63 matches are conducted in Knockout match type. How many players will be participated in that tournament?

Ans:64
8.find out next one. B A C B D C E D F ?

Ans: E
9. X is min of { n+5,6-n} then what is the min of X if,0 <1?

Ans 5.5
10. 2 can type 2 pages in 2 minutes. how many typist can type 18 pages in 6 minutes?

Ans . 6
11.Coconuts are arranged in piles in the order of 10,9,8,7,6,5,4,3,2.Hence he got shortage of 1.what is the min no. of smallest coconuts?

Ans . lcm of above - 1 = 2219
12. p+q+r-=0,then what is value of p2/qr+q2/pr+r2/pq=?

Ans.3
13. In a class boys are 25% more than girls what is ratio of total boys and girls

Ans .5:4( actually ans is given like 5.;3)
14. How many 3 digit no. are there when divided by 7 or 8 leaves remainder 4?

Ans .17
15. 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
16. How many 1's are there in the binary form of 8*1024 + 3*64 + 3

Ans. 4
17. 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
18. There are total 15 people. 7 speaks french and 8 speaks spanish. 3 do not speak any language. Which part of total people speaks both languages.

Ans: 1/5
 
19. A jogger wants to save ?th of his jogging time. He should increase his speed by how much %age.

Ans: 33.33 %
  
20. A is an integer. Dividing 89 & 125 gives remainders 4 & 6 respectively. Find a ?
     
Ans: 17
Why Zycus- Why should i join Zycus?:-
Zycus is the world's leading provider of Spend Management solutions to Global 1000 companies. Zycus aims to be a company that delivers consistent value to customers and exceed expectations. Don't take our word for it, check out our track record.
Zycus  offer an atmosphere of collaborative contribution, challenging assignments and an opportunity to learn, train and work with the best in the field with rewards to ensure good work is promptly rewarded. So as to not stifle employee initiative, we have minimal hierarchy in the organization. This provides for the all round development of employees.
Life at Zycus is full of events where employees not only enjoy a healthy and challenging work environment but can pursue their interest in areas of sports, cultural programs and arts. The objective is to ensure that the employees are not confined to their desks and have a constant interaction with the different team members. Zycus Cultural Ensemble (ZCE) a cultural potpourri is involved in organizing


1. 2 persons start from a point & go in opposite directions. After going 3km each, they turn left & walk 4 km. How far are they now from each other?

Ans : 10 km (Pythagoras theorem)
2. In an objective test, a correct answer scores 4 marks, and a wrong answer scores 2 marks. A student scores 480 marks from 150 questions. how many answers are correct?

Answer: 120
3. With which smallest no should 2880 be divided by, to make it a perfect square.

Ans: 20
4. Which common no should be added or substracted to 17/24 to make it 1/2.

Ans : -10
5. If each side of a rectangle is increased by 100%, by wat % the area increases?

Ans: 100%
6. Father is 30 years older than the son. He will only be thrice as old as his son after 5 years. Fathers present age?

Ans: 40 years
7. If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount, then wat % profit they make?(3 marks)

Ans: 35%
8. Successive discounts of 20% and 15% are equal to a single discount of ?

Ans: 17.5%
9. Sum of digits of a 2 digit number is 8. When 18 is added to the no, the digits gets reversed. Wat is the no?


10. If a & b are 2 positive integers and
(a-b)/3.5 = 4/7 then
options:
1) ba 3) b=a 4) b>=a


11.list all bad coding practices in the following code snippet

try{
for(int i=0;oldCode.size();i++){
String insertIntoMappingtbl="insert into schemaptbl '' + " values(?,?,?,?,?,?)";
pstmtMappingTbl=con.prepareStatement(insertIntoMap pingTbl ); pstmtMappingTbl.setObject(1,oldCode.get(i)); pstmtMappingTbl.setObject(2,oldId.get(i)); pstmtMappingTbl.setObject(3,newCode.get(i)); pstmtMappingTbl.setObject(4,newId.get(i)); pstmtMappingTbl.setObject(5,sub.get(i)); pstmtMappingTbl.setObject(6,subid.get(i)); pstmtMappingTbl.executeQuery();
}
}
catch(Exception e){}
finally{return success;}

12.
You attempt to query the database with this command
SELECT name,salary FROM employee
WHERE salary={SELECT salary FROM employee Where Lastname = 'Wagner' or dept no =233)
choose most appropriate option from following:
A.sub queries are not allowed in the where clause
B.logical aparatous are not allowed in where clause .
c.a multiple row sub query used with asingle row comparision operator.
D. A single row query is used with a multiple row comparisin operator.

13.
If atable T1 has single column c1 with data base (a,a,b,b,b,c)
write aquery that out put as follows
c1 count (c1)
.......................
b 3
a 2

BELOW Q SHOULD BE SOLVED USING SIMPLE PROGRAMING CONSTRUCTS.
14. Write a function that takes an integer array as an input And finds the largest number in the array.

15. Write a funcytion that takes an integer array as an input and findes the second largest largest number in the array. you can use only one loop .You cannt sort the array.

16. Give two integer arrays A & B.A has n elements and B has ' n-1 ' elements . A has all the elements that are there in B. But B has one missing element. Write a function that takes arrays , A & B as imnput and finds the missing element in most optised manner .

17. Write a programm to delete a node from Linked list . You cannot use any of the Existing collection classes available in JAVA . you have to create ur own Linked List .

18. U have an array of +ve integers arranged in the descending order . Write a functionb thast take an integer & an integer array as an integer and returns the position of the given integer in the array , if the integer is not present in the array it should return -1 . the serching technique that u use should be very efficient both in terms of time & memory.

19.
If u were to create following components , what API will u expose ? U can use class/block diagram to expose internals of component .
. Chart component that can render various types of charts , such as pie , bar , line
...spell checker component

20.
draw class / object diagram of one of the following
.... ATM
.....RailwayReservation

How To Write A C-Program Without Using main() Function?
#include<stdio.h>
#include<conio.h>
#define Encyp(m,a,h,e,s,g,t) m##h##s##e
#define begin Encyp(m,e,a,n,i,n,g)
int begin()
{     clrscr();
printf(” hello “);
getch();

Explaination:
Does the above program run without main function? Yes,  above program runs perfectly fine even without a main function. But how, whats the logic behind it? How can we have a C program working without main?
Here we are using preprocessor directive #define with arguments to give an impression that  program runs without main. But in reality it runs with a hidden main function.
The ‘##‘ operator is called  token pasting or token merging operator. That is we can merge two or more characters with it.
NOTE: A Preprocessor is program which processes  source code before compilation.
Look at  second line of program -
#define Encyp(m,a,h,e,s,g,t) m##h##s##e
What is the preprocessor doing here. The macro Encyp(m,a,h,e,s,g,t) is being expanded as “mhse” ( ## operator merges m,h,s & e into mhse). Logic is when you pass (m,a,h,e,s,g,t) as argument it merges the 1st,3rd , 5th &  4th characters(tokens).
Now look at  third line of  program -
#define begin Encyp(m,e,a,n,i,n,g)
Here  preprocessor replaces  macro “begin” with  expansion Encyp(m,e,a,n,i,n,g). According to  macro definition in the previous line  argument must be expanded so that  1st, 3rd, 5th & the 4th characters must be merged. In the argument (m,e,a,n,i,n,g) 1st,3rd,5th &  4th characters are ‘m’,’a’,’i’ & ‘n’.
The number of arguments passed in  pre-defined statement Encyp and begin Encyp must be the same. Length of “m,a,h,e,s,g,t” is equal to  length “m,e,a,n,i,n,g”. If  length do not match compiler will throw an Error saying wrong number of arguments in call of macro ‘Encyp’ and declaration terminated incorrectly.So  third line “int begin” is replaced by “int main” by  preprocessor before the program is passed on for the compiler. That’s it…
Final Thoughts
The bottom line is there can never exist a C program without a main function. Here we are just playing a gimmick that makes us beleive  program runs without main function, but actually there exists a hidden main function in the program. Here we are using proprocessor directive to intelligently replace the word begin” by “main”. In simple words int begin=int main.
 }

Zycus Placement Paper 3

1. 2 persons start from a point & go in opposite directions. After going 3km each, they turn left & walk 4 km. How far are they now from each other?
Ans : 10 km (Pythagoras theorem)

2. In an objective test, a correct answer scores 4 marks, and a wrong answer scores 2 marks. A student scores 480 marks from 150 questions. how many answers are correct?
Answer: 120

3. With which smallest no should 2880 be divided by, to make it a perfect square.
Ans: 20

4. Which common no should be added or substracted to 17/24 to make it 1/2.
Ans : -17/24 - n = ½
17-12/24 = n
5/24 = n
Ans: 5/24

5. If each side of a rectangle is increased by 100%, by wat % the area increases?
Ans: 100%

6. Father is 30 years older than the son. He will only be thrice as old as his son after 5 years. Fathers present age?
Ans: 40 years

7. If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount, then wat % profit they make?(3 marks)
Ans: 35%

8. Successive discounts of 20% and 15% are equal to a single discount of ?
Ans: 17.5%

9. Sum of digits of a 2 digit number is 8. When 18 is added to the no, the digits gets reversed. Wat is the no?
Ans: 35

10. If a & b are 2 positive integers and
(a-b)/3.5 = 4/7 then
options:
1) ba 3) b=a 4) b>=a
Ans: Option 1) b<a

11. A's population is 68000 and it decreases by 80 per year. B's population is 42000 and it increases by 120 per year. After how many years both cities will have same population?
Ans: 130

12. An exam consists of 200 questions to be solved in 3 hours, out of which 50 are maths questions. It is suggested that twice as much time be spent on each math question as for each other question. How many minutes should be spent on maths problems?
Ans: 1hr 72 mins</a

CORRECT QUESTION: Sum of the consequent 7 integers equals 1617. Find the no. of prime numbers in that sequence.

SOLUTION:
Let the numbers be x, x+1, x+2, x+3, x+4, x+5, x+6
Since their sum equals 1617, we have-
x+(x+1)+(x+2)+(x+3)+(x+4)+(x+5)+(x+6)=1617
7x+21=1617
7x=1596
x=228

Hence the numbers are: 228,229,230,231,234,235,236
Prime Numbers: 229, 231.
total no. of players is 99 other than me.50 plays soccer,45 plays basket ball,50 play valley ball.15 play all three. How many will play only 2 games/
let A=soccer players..B=basket ball players..C=vollyball players
n(A U B U C)=n(A) + n(B) + n(C) - n(A INTERSECTION B) - n(A INTERSECTION C) - n(C INTERSECTION B) + n(A INTERSECTION B - INTERSECTION C)
therefore..
100=50+45+50-intersections+15
hence..intersections=145-100+15=60play only 2 games..
An exam consists of 200 questions to be solved in 3 hours, out of which 50 are maths questions. It is suggested that twice as much time be spent on each math question as for each other question. How many minutes should be spent on maths problems?
x=time for each math problem
y= time for every other problem
50x+150y=180 minutes
x=2y because spent twic as much time on the math problems as the other

50(2y)+150y=180
100y+150y=180
250y=180
y= 180/250=18/25 of a minute per problem on the other questions
x=2(18/25)
x=36/25 minutes
1. A's population is 68000 and it decreases by 80 per year. B's population is 42000 and it increases by 120 per year. After how many years both cities will have same population?

Ans: 130

2. An exam consists of 200 questions to be solved in 3 hours, out of which 50 are maths questions. It is suggested that twice as much time be spent on each math question as for each other question. How many minutes should be spent on maths problems?

Ans: 1hr 72 mins

3. fresh mango consists of 70% water and dry mango consists of 10% water then 20Kg of fresh mango is equivalent to how much of dry mango

Ans: 6.66 kg

4. sum of the consequent 7 integers some 1613. Find the no. of prime numbers in that sequence.

5. total no. of players is 99 other than me.50 plays soccer,45 plays basket ball,50 play valley ball.15 play all three. How many will play only 2 games/

6. fresh mangoes have 70% of water in weight, dry mangoes 20% of water in weight. what is the weight of dry mangoes if weight of fresh mangoes is 20kg .ans(d)

a) 6.68kg   b) con not be determined   c) 6.0kg   d)6.6kg

7. total 63 matches are conducted in Knockout match type. How many players will be participated in that tournament?

Ans:64

8.find out next one. B A C B D C E D F ?

Ans: E

9. X is min of { n+5,6-n} then what is the min of X if,0 <1?

Ans 5.5

10. 2 can type 2 pages in 2 minutes. how many typist can type 18 pages in 6 minutes?

Ans . 6

11.Coconuts are arranged in piles in the order of 10,9,8,7,6,5,4,3,2.Hence he got shortage of 1.what is the min no. of smallest coconuts?

Ans . lcm of above - 1 = 2219

12. p+q+r-=0,then what is value of p2/qr+q2/pr+r2/pq=?

Ans.3

13. In a class boys are 25% more than girls what is ratio of total boys and girls

Ans .5:4( actually ans is given like 5.;3)

14. How many 3 digit no. are there when divided by 7 or 8 leaves remainder 4?

Ans .17

15. 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

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

17. 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

18. There are total 15 people. 7 speaks french and 8 speaks spanish. 3 do not speak any language. Which part of total people speaks both languages.

Ans: 1/5
 
19. A jogger wants to save ?th of his jogging time. He should increase his speed by how much %age.

Ans: 33.33 %
  
20. A is an integer. Dividing 89 & 125 gives remainders 4 & 6 respectively. Find a ?
     
Ans: 17
Why Zycus- Why should i join Zycus?:-

Zycus is the world's leading provider of Spend Management solutions to Global 1000 companies. Zycus aims to be a company that delivers consistent value to customers and exceed expectations. Don't take our word for it, check out our track record.

Zycus  offer an atmosphere of collaborative contribution, challenging assignments and an opportunity to learn, train and work with the best in the field with rewards to ensure good work is promptly rewarded. So as to not stifle employee initiative, we have minimal hierarchy in the organization. This provides for the all round development of employees.

Life at Zycus is full of events where employees not only enjoy a healthy and challenging work environment but can pursue their interest in areas of sports, cultural programs and arts. The objective is to ensure that the employees are not confined to their desks and have a constant interaction with the different team members. Zycus Cultural Ensemble (ZCE) a cultural potpourri is involved in organizing


1. 2 persons start from a point & go in opposite directions. After going 3km each, they turn left & walk 4 km. How far are they now from each other?

Ans : 10 km (Pythagoras theorem)

2. In an objective test, a correct answer scores 4 marks, and a wrong answer scores 2 marks. A student scores 480 marks from 150 questions. how many answers are correct?

Answer: 120

3. With which smallest no should 2880 be divided by, to make it a perfect square.

Ans: 20

4. Which common no should be added or substracted to 17/24 to make it 1/2.

Ans : -10

5. If each side of a rectangle is increased by 100%, by wat % the area increases?

Ans: 100%

6. Father is 30 years older than the son. He will only be thrice as old as his son after 5 years. Fathers present age?

Ans: 40 years

7. If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount, then wat % profit they make?(3 marks)

Ans: 35%

8. Successive discounts of 20% and 15% are equal to a single discount of ?

Ans: 17.5%

9. Sum of digits of a 2 digit number is 8. When 18 is added to the no, the digits gets reversed. Wat is the no?


10. If a & b are 2 positive integers and
(a-b)/3.5 = 4/7 then
options:
1) ba 3) b=a 4) b>=a


11.list all bad coding practices in the following code snippet

try{
for(int i=0;oldCode.size();i++){
String insertIntoMappingtbl="insert into schemaptbl '' + " values(?,?,?,?,?,?)";
pstmtMappingTbl=con.prepareStatement(insertIntoMap pingTbl );
pstmtMappingTbl.setObject(1,oldCode.get(i));
pstmtMappingTbl.setObject(2,oldId.get(i));
pstmtMappingTbl.setObject(3,newCode.get(i));
pstmtMappingTbl.setObject(4,newId.get(i));
pstmtMappingTbl.setObject(5,sub.get(i));
pstmtMappingTbl.setObject(6,subid.get(i));
pstmtMappingTbl.executeQuery();
}
}
catch(Exception e){}
finally{return success;}

12.
You attempt to query the database with this command
SELECT name,salary FROM employee
WHERE salary={SELECT salary FROM employee Where Lastname = 'Wagner' or dept no =233)
choose most appropriate option from following:
A.sub queries are not allowed in the where clause
B.logical aparatous are not allowed in where clause .
c.a multiple row sub query used with asingle row comparision operator.
D. A single row query is used with a multiple row comparisin operator.

13.
If atable T1 has single column c1 with data base (a,a,b,b,b,c)
write aquery that out put as follows

c1 count (c1)
.......................
b 3
a 2

BELOW Q SHOULD BE SOLVED USING SIMPLE PROGRAMING CONSTRUCTS.
14. Write a function that takes an integer array as an input And finds the largest number in the array.

15. Write a funcytion that takes an integer array as an input and findes the second largest largest number in the array. you can use only one loop .You cannt sort the array.

16. Give two integer arrays A & B.A has n elements and B has ' n-1 ' elements . A has all the elements that are there in B. But B has one missing element. Write a function that takes arrays , A & B as imnput and finds the missing element in most optised manner .

17. Write a programm to delete a node from Linked list . You cannot use any of the Existing collection classes available in JAVA . you have to create ur own Linked List .

18. U have an array of +ve integers arranged in the descending order . Write a functionb thast take an integer & an integer array as an integer and returns the position of the given integer in the array , if the integer is not present in the array it should return -1 . the serching technique that u use should be very efficient both in terms of time & memory.

19.
If u were to create following components , what API will u expose ? U can use class/block diagram to expose internals of component .
. Chart component that can render various types of charts , such as pie , bar , line
...spell checker component

20.
draw class / object diagram of one of the following
.... ATM
.....RailwayReservation

How To Write A C-Program Without Using main() Function?
#include<stdio.h>
#include<conio.h>
#define Encyp(m,a,h,e,s,g,t) m##h##s##e
#define begin Encyp(m,e,a,n,i,n,g)
int begin()
{     clrscr();
printf(” hello “);
getch();

Explaination:
Does the above program run without main function? Yes,  above program runs perfectly fine even without a main function. But how, whats the logic behind it? How can we have a C program working without main?
Here we are using preprocessor directive #define with arguments to give an impression that  program runs without main. But in reality it runs with a hidden main function.
The ‘##‘ operator is called  token pasting or token merging operator. That is we can merge two or more characters with it.
NOTE: A Preprocessor is program which processes  source code before compilation.
Look at  second line of program -
#define Encyp(m,a,h,e,s,g,t) m##h##s##e
What is the preprocessor doing here. The macro Encyp(m,a,h,e,s,g,t) is being expanded as “mhse” ( ## operator merges m,h,s & e into mhse). Logic is when you pass (m,a,h,e,s,g,t) as argument it merges the 1st,3rd , 5th &  4th characters(tokens).
Now look at  third line of  program -
#define begin Encyp(m,e,a,n,i,n,g)
Here  preprocessor replaces  macro “begin” with  expansion Encyp(m,e,a,n,i,n,g). According to  macro definition in the previous line  argument must be expanded so that  1st, 3rd, 5th & the 4th characters must be merged. In the argument (m,e,a,n,i,n,g) 1st,3rd,5th &  4th characters are ‘m’,’a’,’i’ & ‘n’.
The number of arguments passed in  pre-defined statement Encyp and begin Encyp must be the same. Length of “m,a,h,e,s,g,t” is equal to  length “m,e,a,n,i,n,g”. If  length do not match compiler will throw an Error saying wrong number of arguments in call of macro ‘Encyp’ and declaration terminated incorrectly.So  third line “int begin” is replaced by “int main” by  preprocessor before the program is passed on for the compiler. That’s it…
Final Thoughts
The bottom line is there can never exist a C program without a main function. Here we are just playing a gimmick that makes us beleive  program runs without main function, but actually there exists a hidden main function in the program. Here we are using proprocessor directive to intelligently replace the word begin” by “main”. In simple words int begin=int main.
 }

Zycus Placement Paper 3

1. 2 persons start from a point & go in opposite directions. After going 3km each, they turn left & walk 4 km. How far are they now from each other?
Ans : 10 km (Pythagoras theorem)

2. In an objective test, a correct answer scores 4 marks, and a wrong answer scores 2 marks. A student scores 480 marks from 150 questions. how many answers are correct?
Answer: 120

3. With which smallest no should 2880 be divided by, to make it a perfect square.
Ans: 20

4. Which common no should be added or substracted to 17/24 to make it 1/2.
Ans : -17/24 - n = ½
17-12/24 = n
5/24 = n
Ans: 5/24

5. If each side of a rectangle is increased by 100%, by wat % the area increases?
Ans: 100%

6. Father is 30 years older than the son. He will only be thrice as old as his son after 5 years. Fathers present age?
Ans: 40 years

7. If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount, then wat % profit they make?(3 marks)
Ans: 35%

8. Successive discounts of 20% and 15% are equal to a single discount of ?
Ans: 17.5%

9. Sum of digits of a 2 digit number is 8. When 18 is added to the no, the digits gets reversed. Wat is the no?
Ans: 35

10. If a & b are 2 positive integers and
(a-b)/3.5 = 4/7 then
options:
1) ba 3) b=a 4) b>=a
Ans: Option 1) b<a

11. A's population is 68000 and it decreases by 80 per year. B's population is 42000 and it increases by 120 per year. After how many years both cities will have same population?
Ans: 130

12. An exam consists of 200 questions to be solved in 3 hours, out of which 50 are maths questions. It is suggested that twice as much time be spent on each math question as for each other question. How many minutes should be spent on maths problems?
Ans: 1hr 72 mins</a

CORRECT QUESTION: Sum of the consequent 7 integers equals 1617. Find the no. of prime numbers in that sequence.

SOLUTION:
Let the numbers be x, x+1, x+2, x+3, x+4, x+5, x+6
Since their sum equals 1617, we have-
x+(x+1)+(x+2)+(x+3)+(x+4)+(x+5)+(x+6)=1617
7x+21=1617
7x=1596
x=228

Hence the numbers are: 228,229,230,231,234,235,236
Prime Numbers: 229, 231.
total no. of players is 99 other than me.50 plays soccer,45 plays basket ball,50 play valley ball.15 play all three. How many will play only 2 games/
let A=soccer players..B=basket ball players..C=vollyball players
n(A U B U C)=n(A) + n(B) + n(C) - n(A INTERSECTION B) - n(A INTERSECTION C) - n(C INTERSECTION B) + n(A INTERSECTION B - INTERSECTION C)
therefore..
100=50+45+50-intersections+15
hence..intersections=145-100+15=60play only 2 games..
An exam consists of 200 questions to be solved in 3 hours, out of which 50 are maths questions. It is suggested that twice as much time be spent on each math question as for each other question. How many minutes should be spent on maths problems?
x=time for each math problem
y= time for every other problem
50x+150y=180 minutes
x=2y because spent twic as much time on the math problems as the other

50(2y)+150y=180
100y+150y=180
250y=180
y= 180/250=18/25 of a minute per problem on the other questions
x=2(18/25)
x=36/25 minutes
1. A's population is 68000 and it decreases by 80 per year. B's population is 42000 and it increases by 120 per year. After how many years both cities will have same population?

Ans: 130

2. An exam consists of 200 questions to be solved in 3 hours, out of which 50 are maths questions. It is suggested that twice as much time be spent on each math question as for each other question. How many minutes should be spent on maths problems?

Ans: 1hr 72 mins

3. fresh mango consists of 70% water and dry mango consists of 10% water then 20Kg of fresh mango is equivalent to how much of dry mango

Ans: 6.66 kg

4. sum of the consequent 7 integers some 1613. Find the no. of prime numbers in that sequence.

5. total no. of players is 99 other than me.50 plays soccer,45 plays basket ball,50 play valley ball.15 play all three. How many will play only 2 games/

6. fresh mangoes have 70% of water in weight, dry mangoes 20% of water in weight. what is the weight of dry mangoes if weight of fresh mangoes is 20kg .ans(d)

a) 6.68kg   b) con not be determined   c) 6.0kg   d)6.6kg

7. total 63 matches are conducted in Knockout match type. How many players will be participated in that tournament?

Ans:64

8.find out next one. B A C B D C E D F ?

Ans: E

9. X is min of { n+5,6-n} then what is the min of X if,0 <1?

Ans 5.5

10. 2 can type 2 pages in 2 minutes. how many typist can type 18 pages in 6 minutes?

Ans . 6

11.Coconuts are arranged in piles in the order of 10,9,8,7,6,5,4,3,2.Hence he got shortage of 1.what is the min no. of smallest coconuts?

Ans . lcm of above - 1 = 2219

12. p+q+r-=0,then what is value of p2/qr+q2/pr+r2/pq=?

Ans.3

13. In a class boys are 25% more than girls what is ratio of total boys and girls

Ans .5:4( actually ans is given like 5.;3)

14. How many 3 digit no. are there when divided by 7 or 8 leaves remainder 4?

Ans .17

15. 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

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

17. 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

18. There are total 15 people. 7 speaks french and 8 speaks spanish. 3 do not speak any language. Which part of total people speaks both languages.

Ans: 1/5
 
19. A jogger wants to save ?th of his jogging time. He should increase his speed by how much %age.

Ans: 33.33 %
  
20. A is an integer. Dividing 89 & 125 gives remainders 4 & 6 respectively. Find a ?
     
Ans: 17
Why Zycus- Why should i join Zycus?:-

Zycus is the world's leading provider of Spend Management solutions to Global 1000 companies. Zycus aims to be a company that delivers consistent value to customers and exceed expectations. Don't take our word for it, check out our track record.

Zycus  offer an atmosphere of collaborative contribution, challenging assignments and an opportunity to learn, train and work with the best in the field with rewards to ensure good work is promptly rewarded. So as to not stifle employee initiative, we have minimal hierarchy in the organization. This provides for the all round development of employees.

Life at Zycus is full of events where employees not only enjoy a healthy and challenging work environment but can pursue their interest in areas of sports, cultural programs and arts. The objective is to ensure that the employees are not confined to their desks and have a constant interaction with the different team members. Zycus Cultural Ensemble (ZCE) a cultural potpourri is involved in organizing


1. 2 persons start from a point & go in opposite directions. After going 3km each, they turn left & walk 4 km. How far are they now from each other?

Ans : 10 km (Pythagoras theorem)

2. In an objective test, a correct answer scores 4 marks, and a wrong answer scores 2 marks. A student scores 480 marks from 150 questions. how many answers are correct?

Answer: 120

3. With which smallest no should 2880 be divided by, to make it a perfect square.

Ans: 20

4. Which common no should be added or substracted to 17/24 to make it 1/2.

Ans : -10

5. If each side of a rectangle is increased by 100%, by wat % the area increases?

Ans: 100%

6. Father is 30 years older than the son. He will only be thrice as old as his son after 5 years. Fathers present age?

Ans: 40 years

7. If on an item a company gives 25% discount, they earn 25% profit. If they now give 10% discount, then wat % profit they make?(3 marks)

Ans: 35%

8. Successive discounts of 20% and 15% are equal to a single discount of ?

Ans: 17.5%

9. Sum of digits of a 2 digit number is 8. When 18 is added to the no, the digits gets reversed. Wat is the no?


10. If a & b are 2 positive integers and
(a-b)/3.5 = 4/7 then
options:
1) ba 3) b=a 4) b>=a


11.list all bad coding practices in the following code snippet

try{
for(int i=0;oldCode.size();i++){
String insertIntoMappingtbl="insert into schemaptbl '' + " values(?,?,?,?,?,?)";
pstmtMappingTbl=con.prepareStatement(insertIntoMap pingTbl );
pstmtMappingTbl.setObject(1,oldCode.get(i));
pstmtMappingTbl.setObject(2,oldId.get(i));
pstmtMappingTbl.setObject(3,newCode.get(i));
pstmtMappingTbl.setObject(4,newId.get(i));
pstmtMappingTbl.setObject(5,sub.get(i));
pstmtMappingTbl.setObject(6,subid.get(i));
pstmtMappingTbl.executeQuery();
}
}
catch(Exception e){}
finally{return success;}

12.
You attempt to query the database with this command
SELECT name,salary FROM employee
WHERE salary={SELECT salary FROM employee Where Lastname = 'Wagner' or dept no =233)
choose most appropriate option from following:
A.sub queries are not allowed in the where clause
B.logical aparatous are not allowed in where clause .
c.a multiple row sub query used with asingle row comparision operator.
D. A single row query is used with a multiple row comparisin operator.

13.
If atable T1 has single column c1 with data base (a,a,b,b,b,c)
write aquery that out put as follows

c1 count (c1)
.......................
b 3
a 2

BELOW Q SHOULD BE SOLVED USING SIMPLE PROGRAMING CONSTRUCTS.
14. Write a function that takes an integer array as an input And finds the largest number in the array.

15. Write a funcytion that takes an integer array as an input and findes the second largest largest number in the array. you can use only one loop .You cannt sort the array.

16. Give two integer arrays A & B.A has n elements and B has ' n-1 ' elements . A has all the elements that are there in B. But B has one missing element. Write a function that takes arrays , A & B as imnput and finds the missing element in most optised manner .

17. Write a programm to delete a node from Linked list . You cannot use any of the Existing collection classes available in JAVA . you have to create ur own Linked List .

18. U have an array of +ve integers arranged in the descending order . Write a functionb thast take an integer & an integer array as an integer and returns the position of the given integer in the array , if the integer is not present in the array it should return -1 . the serching technique that u use should be very efficient both in terms of time & memory.

19.
If u were to create following components , what API will u expose ? U can use class/block diagram to expose internals of component .
. Chart component that can render various types of charts , such as pie , bar , line
...spell checker component

20.
draw class / object diagram of one of the following
.... ATM
.....RailwayReservation

How To Write A C-Program Without Using main() Function?
#include<stdio.h>
#include<conio.h>
#define Encyp(m,a,h,e,s,g,t) m##h##s##e
#define begin Encyp(m,e,a,n,i,n,g)
int begin()
{     clrscr();
printf(” hello “);
getch();

Explaination:
Does the above program run without main function? Yes,  above program runs perfectly fine even without a main function. But how, whats the logic behind it? How can we have a C program working without main?
Here we are using preprocessor directive #define with arguments to give an impression that  program runs without main. But in reality it runs with a hidden main function.
The ‘##‘ operator is called  token pasting or token merging operator. That is we can merge two or more characters with it.
NOTE: A Preprocessor is program which processes  source code before compilation.
Look at  second line of program -
#define Encyp(m,a,h,e,s,g,t) m##h##s##e
What is the preprocessor doing here. The macro Encyp(m,a,h,e,s,g,t) is being expanded as “mhse” ( ## operator merges m,h,s & e into mhse). Logic is when you pass (m,a,h,e,s,g,t) as argument it merges the 1st,3rd , 5th &  4th characters(tokens).
Now look at  third line of  program -
#define begin Encyp(m,e,a,n,i,n,g)
Here  preprocessor replaces  macro “begin” with  expansion Encyp(m,e,a,n,i,n,g). According to  macro definition in the previous line  argument must be expanded so that  1st, 3rd, 5th & the 4th characters must be merged. In the argument (m,e,a,n,i,n,g) 1st,3rd,5th &  4th characters are ‘m’,’a’,’i’ & ‘n’.
The number of arguments passed in  pre-defined statement Encyp and begin Encyp must be the same. Length of “m,a,h,e,s,g,t” is equal to  length “m,e,a,n,i,n,g”. If  length do not match compiler will throw an Error saying wrong number of arguments in call of macro ‘Encyp’ and declaration terminated incorrectly.So  third line “int begin” is replaced by “int main” by  preprocessor before the program is passed on for the compiler. That’s it…
Final Thoughts
The bottom line is there can never exist a C program without a main function. Here we are just playing a gimmick that makes us beleive  program runs without main function, but actually there exists a hidden main function in the program. Here we are using proprocessor directive to intelligently replace the word begin” by “main”. In simple words int begin=int main.
 }