Wednesday, December 22, 2010

Some more Aptitude Questions

Patni Computers Placement Question Paper

1. square root of(PQ)=8 then 4 options
Ans:p+q =1: is not possible

2. equilateral triangle of side 10 units. cow is teethered with a rope of length 7 units at one of the vertex. Find the area of the field grazed.
ans-77/3

3. Series till 50 terms: 2+3-5 +2+3-5+….
ans:5

4. when x is diveded by 299 remainder is 100. then when x is divided by 23 remainder is ?
ans:8

5. there r 2 groups A and B. A boy goes from gp A to gp B. When he goes the ave wt of both the gps A and B increases. Then?
ans:ave wt of gp A>wt of boy is>ave wt of gp B

6. (7^2)^3 and 7^2^3. What is the relation between the 2 .
ie >,< ,=
ans- (7^2)^3<7^2^3.

7. Train speed 36kph. Dist travelled in 3minutes in meters
ans-1800m

8. with the digits 1,2,3,4,5,6 make all 6 digit nos which r not divisible by 5. The no of such 6 digit nos is
ans:600


9. 18kg of fresh grapes have 90% water. dry grapes have 20% water. then the weight of the dry grapes is
ans:2.25kg

10. population is 20000. Pop increases by 10% every year, then the pop after 3 years is?
ans-26620

11. Dist bet 2 places A and B is given. A man P starts from place A at 9 pm and another man Q goes from B at 10pm . Speed of Q is double of that of P. Both cover 1/4 dist in the same time interval. then A travels the entire dist in time ?
ans:8hrs

12. Entry fee is Re1. There r 3 rides each is of Re1. Total boys entering is 3000. Total income is Rs 7200. 800 students do all the 3 rides. 1400 go for atleast 2 rides. None go the same ride twice. Then no of students who do not go any ride is
ans:1400 (check-1000)

13. 1,23,45,67…
ans:-89

14. m is div by 5, n is div by 5 ,m-n is div by 5 m*n is div by 25
ans:then m+n is not div by 10

15. Cube of side 5 cms is fully painted in alll the 6 sides. it is then cut into cubes each of side 1 cms. then prob that 2 sides r painted is
ans:36/125

16. A is 25% bigger than B B is 20% less than C then the relation bet A, B, C
ans 5:4:5

17. A cone and a sphere have the same radius. and in the cone we put the sphere then how much of sphere will be inside the cone
a)1/2 b)>1/2 c)<1/2
ans d)1/4

18. there r 5 papers Ratio of marks obtained in each subject is 6:7:8:9:10. Total marks obtained is 60%. 50% is pass marks. In how many subjects did he get above 50%. ans:4

19. which one is not correct
a)cube rootof 343.
b)3.24 is not an integer
Ans:none of these

20. A and B r 2 men who enter into business and they invest Rs 1000, Rs 2000resp. How will they divide the income of Rs 5000 .
ans 5000/3 & 5000(2/3)

21. 9C2 + 9C3 +10C4=?
ans 11c4

22. 10^23-7 is divided by 6, remainder is?
ans-3

23. if x+y+z =1. then xy+yz+zx is
a)<1/2 ans b)>1/2 c)=1/2

24. .nos from 1 to 100.
a)find all the nos which r divisble by 3,9,27 –33
b)at least 2 –11
c) only 2 –8
d) none –67

25. 3 balls inside a bag having nos on it written 1 , 2, 3 on it. a ball is taken and then put inside it. Find probability that all 3 nos r the same when it is taken 3 times
ans-1/27

26. 15c6+15c7+16c8=== 17cx
ans- x== 8 or 9.

27. three men invested sum. and their ratio is 5:7:6. profit is 5400.then b’s share ans–2100

28. sum of all 5 digit nos formed using 1,3,5,7,9.
ans—6666600 (11111+33333+55555+77777+99999)*24. each digit occupies all the places for 24 times.

29. x and y even nos. x>y which is even.
a)x+y b)x-y c) 2x/y (not)

30. 1/2 divived by 1/2 of 1/2 ) whole divided by 1/2 +1/2 of 1/2
ans—– 2 2/3. or 8/3.

31. trees of heights 30 and 40 sepatated by a river. fish in the river is at equal dis from top of the trees where two birds r there.ratio of the distances from fish to the root of the tress
ans—4:3.

32. three cones (r=r,l=2r)are arranged upright so that each cone is in contact with other two .and a circle is formed passing through its vertices. what will be its radius.
ans 2r/sqrt(3)

33. What number must be added to 1/x to make it equal to x.
Ans. (x2-1)x

34. Some pen bought something at loss for Rs 60.He then sold it the price of 81 and his profit was 20% of the loss.At what price did he buy the object. calculate.
ans-77.50

35. one disk of 20cm radius, out of that 4 disk of 5cm are cut , find diffrence of leftout and cut out area
ans-200pi

36. (X)+(1/x)=3 then (xsquare) + 1/(xsquare) = ??
ANS-7

37. a box contain 4 small bos, each small box again contain 3 box,again these box contain 2 box . total how many boxes
ANS-1+4+12+24=41

38. between 100 to 200 how many no are divisible by both 3 and 2 and 100,200 are inclusive?
ans-68

39. How many two digit no you make by 1,2,3,4,0
Ans=16 because 0 is not in the 10th place.

40. (25…) 32 and (25….)31 in both cases 6 in the last position. What should be in the blanks?
Ans 6

41. In a GD there is no restriction in saying something between the participants. A, B, C, D, E be the participant. What’s is probability to say B before A. i) 20%, ii) 40%, iii) 50%, iv) none of these.
Ans. 50%.

42. You have only 1 kg weight. You have to weight 31kg. Min number of measurements you have to done.
Ans. 5 as 1+2+4+8+16=31.

43. Min (a, b, c)=min of a, b, c Max (a, b, c,)=max of a, b, c then what is the value of MAX {min (2,5,7), max (-7, -2, -3), 3}.
ans-3

44. The product of two consecutive odd no is -1, then what is the value of the sum of them.
Ans. 0 as -1*1 becomes -1.

45. Few years ago on 31st January on her 26th birthday a lady laid a baby. Now what’s the sum of their ages?
i) 37, ii) 38, iii) 43, iv) 51.

46. 81*82*83*84*85*86*87*89. What should be in the unit place in this product?
Ans. It must be 0 as 5*2=10

47. In a company ones salary increases 6/5 times in every year. After 4 year of joining average salary is 1342. Then what’s the starting salary of the company?
A) 900, b) 1000, c) 1100, d) 1200.
Ans.= 1000

48. Perimeter of an equilateral and isosceles is 45 and 40 respectively. At least one of the sides of isosceles is equal to the equilateral. What’s the base of isosceles triangle?
Ans. 10. As. 45/3=15. 15+15+10=40.

49. Two people P Q start a race in a circular track in opposite way different but constant speed. First they meet 900m cw from the starting pt. Then they meet 800m ccw from the starting pt. What’s the circumference of the circle.
ans-2600m

JKC Online Assessment Test

JKC Online Assessment Test shall be conducted as per the Schedule mentioned below

24-12-2010 - ECE, MCA

27-12-2010 - IT, EIE, EEE

28-12-2010 - CSE, ECM

Tuesday, December 21, 2010

Patni Computer Systems : Analytical papers

Q1) The ratio of the areas of the in circle and circum circle of an equilateral triangle is

a) 1: 4
b) 11:9
c) 12:1
d) 11:3

Q2). A circular road runs round a circular ground. If the difference between the circumference of the outer circle and inner circle is 44 meters, the width of the road is.

a) 7m
b) 11m
c) 22m
d) 44m

Q3). A rectangle plate has an area of 80 sqm. If its length is 5 times than the breadth, then length of the plate is
a). 16
b) 20
c) 4
d) 80

Q4). Three spherical metal balls of radii 6cm,8cm and R cm are melted into a solid sphere of radius 12cm. The value of R is

a) 5cm
b) 6cm
c) 8cm
d) 10cm

Q5). If a/b = 1/3 and 3a + 2b = 6 then, b is

a) 3
b) 6
c) 2
d) 1

Q6). The digits of the integral part of the square root of 123456789 is

a) 6
b) 5
c) 8
d) 3

Q7). The sum of all multiples of 6 lying between 50 and 100 is

a) 600
b) 96
c) 150
d) none

Q8). The greatest factor of the product of any four consecutive integral number in all cases, is
a) 25
b) 24
c) 16
d) 20

Q9). Two third of the square of a number is 1.5, the number is

a) 1
b) 1.5
c) 2.5
d) 2/3

Q10). Two persons cover the same distance 5 kmph and 6 kmph respectively. Find the distance traveled by each., if one takes 16 minutes longer than the other.


a) 5
b) 60
c) 8
d) 16

Q11). The price of cycle is increased by 10% every year. If the present price of cycle is Rs. 1,210 , its price two years ago was ?

a) 1,000
b) 2,100
c) 1,700
d) 1,900

Q12). 10% 0f 25 is 5% of x. Then x

a) 10
b) 5
c) 100
d) 50





Q13). If the side of the square is increased by 20% then the area of the square is increased by

a) 69%
b) 96%
c) 44%
d) 10%

Q14). If G is finite group of order 3, then

a) G is always abelian
b) G is always non-abelian
c) G may be abelian
d) none

Q15). Let Q be the set of all rational numbers and P be the set of all irrational numbers. Then

a) P is closed for addition but Q is not closed for addition
b) P as well as Q is closed for addition
c) Q is closed for addition for Q is not closed for addition
d) none of the above

PAPER 2:
Q1). The length of rectangle is increased by 15% and its breadth is decreased by 15%. The are of new rectangle is

a) Decreased by 15%
b) Decreased by 2.25%
c) Increased by 15%
d) Increased by 2.25%
e) Neither increased nor decreased

Q2). Two trains are running at 60 km/hr and 40 km/hr in the same direction. Fast train completely passes the man sitting in the slow train in 36 seconds. The length of the fast train is

a) 200m
b) 160m
c) 240m
d) 180m
e) Cannot be determined

Q3). A,B and C can complete a piece of work in 10 days, then how many people are required to finish the whole work in 25 days?

a) 10 days
b) 15 days
c) 20 days
d) 22 days
e) 25 days

Q4). 12 persons can do 3/5 of certain work in 10 days, then how many persons are required to complete the whole work in 25 days?

a) 10
b) 9
c) 8
d) 7
e) 6

Q5). In an organization, 30% of the employees are matriculates, 60% of the remaining are graduates and the remaining 140 are post-graduates. How many employees are graduates?

a) 210
b) 280
c) 350
d) 160
e) None of these

Q6). If x: y = 3:4, then (2x+3y): (3y-2x) =

a) 2:1
b) 4:1
c) 3:2
d) 5:3
e) 3:1

Q7). A mixture of 50 litres of milk and water contain 10% of water. How much water must be added to make water 20% in the given mixture?

a) 5.5 litres
b) 6.5 litres
c) 6 litres
d) 6.25 litres
e) 6.75 litres

Q8). A dealer marks his goods 25% above cost price. He then allows some discount on it and makes a profit of 9%. The rate of discount is

a) 11.4%
b) 12.8%
c) 13.4%
d) 14.2%
e) 15.1%

Q9). A number lying between 1000 and 2000 is such that on division by 2,3,4,5,6,7 and 8 leaves remainders 1,2,3,4,5,6 and 7 respectively. The number is

a) 1726
b) 1822
c) 1548
d) 1922
e) 1679

Q10). Three years ago the average of a family of 5 members was 17 years. A baby having born in between, the average age of the family is same today. When was the baby born?

a) 1 year ago
b) 2 years ago
c) 3 years ago
d) just today
e) none of the above

Q11). The sum of the digits of a two-digit number is 9 less than the number. Which of the following digits is at unit’s place of the number?

a) 1
b) 2
c) 4
d) 8
e) None

Q12). One year ago, Mrs kusuma was four time as old as her daughter Swathi. Six years hence, Mrs. Kusuma’s age will exceed her daughters age by 18 years. The ration of present ages of Kusuma and Swathi is

a) 25:7
b) 13:4
c) 25:9
d) 13:1
e) None of these

Q13). The calendar for year 1994 will serve as calendar for

a) 1998
b) 2002
c) 2003
d) 2004
e) 2005

Q14). The minute hand of clock overtakes the hour hand at intervals of 63 minutes of correct time. How much a day does the clock gain or loose?

a) Gains 10 10/43 minutes
b) Gains 56 8/77 minutes
c) Loses 10 10/43 minutes
d) Loses 56 8/77 minutes
e) None of these

Q15). The expression (11.98 * 11.98 + 11.98 * X + 0.02 * 0.02 ) will be a perfect square for X equal to:

a) 0.01
b) 0.02
c) 0.03
d) 0.04
e) 0.05

PAPER 3:
1. Six years ago I was three times as old as my brother, and now I am twice as old my brother. Find my brother’s age.

a) 8 years b) 24 years c) 12 years d) 16 years

2. A boy standing idle sounds a whistle to his friend at a distance of 1200 m moving away from him in a speeding car at 108 kms /hr. Find the duration after which his friend is going to hear him. (Speed of sound = 330m/sec).

a) 3.6 secs b) 4.00 secs c) 40 secs d) None of these

3. Sneh’s age is 1/6th of her father’s age. Sneh’s father’s age will be twice of Vimal’s age after 10 years. If Vimal’s eighth birthday was celebrated two years before, what is Sneh’s present age?

a) 24 years b) 30 years c) 6 2/3 years d) None of these

4. Three years ago the average of A and B was 18 Years. With C joining them now, the average becomes 22 years. How old is C now?

a) 24 years b) 27 years c) 28 years d) 30 years

5. A train traveling at 42 kms/ hr passes a cyclist going in the same direction in 9 secs. If the cyclist had been going in the opposite direction, the train would have passed him in 5 secs. Find the length of the train.

a) 75 meters b) 60 meters c) 90 meters d) 80 meters

6. A person walks a distance of 18 kms at a particular speed. For the next 30 kms he increases his speed by 2 kmph. Had he walked the entire distance at 3 kmph more than his initial speed, he would have reached 4 hours earlier. Find his initial speed.

a) 3 kms/hr b) 2 kms/hr c) 4 kms/hr d) None of these

7. A man starts from B to K, another starts from K to B, at the same time. After passing each other they complete their journeys in 3.33 and 4.80 hours respectively. Find the speed of the second man if the speed of the first is 12 km/ hr

a) 12 kms/hr b) 10 kms/hr c) 14 kms/hr d) Data inadequate

8. A train traveling at 40 kms / hr while inside the tunnel meets another train of half its length traveling at 60 kms / hr and passes it completely in 4.5 seconds. Find the length of the tunnel if the first train passes completely through it in 4 minutes 37.5 seconds.

a) 2000 meters b) 3000 meters c) 4000 meters d) 5000 meters

9. When a stone is dropped from a building 200 m high, its speed is proportional to the time elapsed after dropping. The distance traveled is proportional to the square of the time elapsed. After 1 second the speed of the train was 10 m/sec and it was 190 m above the ground. When its speed is 25 m/sec, what would be its distance from the ground?

a) 140 m b) 137.5 m c) 125.75 m d) 142.5 m

10. The ratio of 3x years from now?

a) 18 b) 24 c) 30 d) 54

11. If A is 25 kms east of B, which is 12 kms south of C, which is 9 kms west of D. A person starts walking at 3 kms/hr from A towards D. Calculate the distance of the point from A where he is going to meet a person from D walking towards A at 2 kms / hr.

a) 20 b) 12 c) 8 d) 20 sqrt (12*8)

12. Walking at 6/7th of his usual speed, a man is 25 mins too late. His usual time is

a) 7.5 hrs b) 1.5 hrs c) 2.5 hrs d) 1.67 hrs

13. Excluding stoppages, the speed of the bus is 54 kms /hr and with stoppages, it is 45 kmph. For how many minutes does the bus stop per hour?

a) 9 b) 10 c) 12 d) 20

14. The average age of 12 students is 20 years. If the age of one more student is included, the average decreases by 1, what is the age of the new student?

a) 5 b) 7 c) 9 d) 11

15. The ratio of the ages of Mona and Sona is 4:5. Twelve years hence, their ages will be in the ratio of 5:6. What will be Sona’s age after 6 years?

a) 8 b) 10 c) 12 d) 14

16. Conversation between two mathematicians:

First: I have three children. The product of their ages is 36. If you sum their ages, it is exactly same as my neighbor’s door number on my left. The second mathematician verifies the door number and says that it is not sufficient. Then the first says “Ok one more clue is that my youngest is really the youngest". Immediately the second mathematician answers. Can you answer the question asked by the first mathematician? What are the children ages?

17. A train after traveling 50 kms from A meets with an accident and proceeds at 4/5th of the former speed and reaches B, 45 min late. Had the accident happened 20 kms further on, it would have arrived 12 mins sooner. Find the original speed and the distance.

18. Recently, I decided to walk down an escalator of a tube station. I did some quick calculation in my mind. I found that if I walk down twenty – six steps, I require thirty seconds to reach the bottom. However, if I am able to step down thirty – four stairs, I would only require eighteen seconds to get to the bottom. If the time is measured from the moment the top step begins to descend to the time I step off the last step at the bottom, can you

PAPER 4:
1. An aircraft is flying at a height of 3000m from the ground at an average speed of 400 km/hr while descending. It has to travel 5 kms before it can touch down the runway and start operating its break system. It will take less than 10 seconds to reach the touch down point. How far it is from the touch down point if it had been on they ground.

a)5 kms b)4 kms c)3 kms d)none of these

2. water is continuously poured from a reservoir to a locality at the steady rate of 10,000 liters per hour. When delivery exceeds demand the excess water is stored in a tank. If the demand for 8 consecutive three-hour periods is 10000,10000,45000,25000,40000,15000,60000 and 35000 liters respectively, what will be the minimum capacity required of the water tank (in 1000 litres) to meet the demand?

a)10 b)30 c)40 d)50

ans:c)40

3. Jhaveri invested in Upendra&Upendra,Celco and Winger shares at Rs. 300,Rs.200 and Rs.5 per share respectively. He bought 100 shares for Rs.1000.The number of Upendra&Upendra and Celco shares he bought are respectively

a)23.17 b)17,23 c)17,60 d)15,25

ans:b)17,23

4. a certain organization has three committees. only two persons are members of all committees, but every pair of committees have three members in common. what is the least possible no of member of members on any one committee?

a)4 b)5 c)6 d) none of these.

ans:a)4

5. one bottle is half-full of oil and another bottle with twice the capacity is one quarter full of oil. if water is added so that both the bottles are full and the contents of both are then poured into a third bottle that is empty and large enough to hold the contents of both, what fractions of the contents in the third bottle is oil?

a)1/4 b)1/3 c)3/8 d)2/3

ans:b)1/3

6. don and his wife each receive an 8 percent annual raise. if don receives a raise rs.800 and his wife receives a raise of rs. 840, what is the difference between their annual income after their raises?

a)40 b)460 c)500 d)540

ans:d)540

7. if x+y+z=9 and both y and z are positive integers greater than zero, then the maximum value x can take is?

a.7 b.3 c.8 d. data insufficient

ans:a.7

8. if 5 tomatoes are worth 8 oranges,5 oranges are worth 4 apples, 7 apples are worth 3 pineapples and 7 pineapples cost rs.203,then he approx price of each tomato is

a.16 b.5 c.19 d. none of theses

ans: a.16

9. in the relation x>y+z,x+y>p and z necessarily true?

a. y>p b .x+y>z c. y+p>x d .insufficient data

ans: b.x+y>z

10. if x,y,z are three +ve integers such that x is greater than y and y is greater than z then which of the following is definitely true?

a. x% of y is greater than y% of z

b. y% of x is greater than z% of y

c. z% of x is greater than y% of z

d. all of these(ans)

11. amar,akbar, antony eat lunch at the same restaurant everyday.if amar orders a dosa,then akbar also orders adosa.either akbar or antony always orders a dosa,but never at the same lunch.either amar or antony or both order a dosa.if antony ordes a dosa ,then amar also orders a dosa.youy can conclude that:

a. amar, akbar, antony always order adosa.

b. amar and antony sometimes order a dosa,akbar never does.

c. amar and akbar always order a dosa, antony never does.(ANS)

d. amar and antony always order adosa,akbar never does.

12.ramesh,ram,kareem and Mohan collected coins of different countries. they collected 100 together. none collected less than 10.each collected an even number. each collected a different number. based on these, we can say that the number of coins collected by the boy who collected the most could not have exceeded

a.54 b.64(ans) c.58 d.60

13. let p,q,r and s be four statements such that:

if p is true, then q is true;

if q is true,then r is true and

if s is true,then at least one of q and r is false.

then it follows that:

a. if p is true then s is false.(ans)

b. if s is falsae both q and r are true.

c. if at least one of q and r is false then s is false.

d. if q is true then s is true.

14.players a to z play a league match in which every player plays a match against every other player. a win earns 2 points, a draw 1 point and loss 0 points. there were no draws, and no two players had the same total points. the rank list of the players happens to be the alphabetical list itself. which of the following statement is
true?

a. n wins over m b . m wins over n(ans)

c. m did not play against n d.none

15.an article costing rs.160 is sold at 15% discount on a mark-up price.what is the selling price after discount?

a.170(ans) b.200 c.150 d.220

PAPER 5:
Q. 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

Q. The following truth table is given What is Y equal to??

A B C Y
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1

Ans. (A')(B')(AB) , where ' stands for complement.

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

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

Q. 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 ?

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

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

Q. 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)

Q. What is the angle between the two hands of a clock when time is 8:30
Ans. 75(approx)

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

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

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

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

Q. A puts a share of 1/3, B puts a share of 1/2, and the remaining share is put by c,and start a business their total profit is Rs 4800, what is the share of A?

Q. what is the remainder of (3682*3684*3686) divided by 19?

Q. Mr. loyd wants to fence his Square shaped land of 120 Sqft each side.If apole is laid every 12ft how many poles do he need?

Q. if 105 is represented as 253 in base 6,how is 253 represented in base 6?

Q. the cost of 5 chairs and 3 mugs is Rs 1900, and the cost of 8 chairs and 5 mugs is Rs 2900, what is the cost of 5 chairs and 8 mugs?

Q. Mr Roy found an old bill which shows that he brought 10 hens for Rs_67.92_ the first and the last digits were missing. what was the cost of each hen?

Q. In a school football team the captain was the eldest of all with ,the next was the goal keeper with 26, in a particular match both the players were shown red cards. the average age of the remaining people raised by? what was the average age of the team.?

Q. In a school the number of girls is 15 more that that of the boys. now if 19% of the girls were newly joined and 25% of the boys were newly joined the number of girls is 9 more than that of the boys how many girls and boys were there?

Q. If m and n are multiple of 5 which one of the following must not necessarily be true.
a. m*n is a divisible by 10.
b. the product m*n is a multiple of 25.
c. m*n is a multile of 5.

Q.,if X.Y+Z, and Y+x.p and Z
a) x+z
b) x+y.z
c) y.x+z
d) z+P.x

Q. what is the values of x, in the equation |x|+x^3=0

Q. abel ,loyla and sel are three channels , if 30% of the populatio watch abel , and 5% of the people watch any two of the channel, and 5% of the people watch none off the channel then the number of people watching all the three channels are?

Q. If 35 people play hockey and 10 people play both football and hockey and if 10 people play hockey and cricket and 5 people play all three games then the number of people playing hockey alone is?

Q. How many number of weights do u need to weigh 31 kg of rice if u have only one 1kg weights stone ?
a. 30. b. 31. c.5. d.4.

Q. an article whose initial cost is Rs 400 is subjected for discounts of 25%, 15%, and 40% what is the amount the customer have to pay?

Q. two trains are coming in the opposite direction each at a speed of 60 kmph, now a fly on one train moves towards the other with a speed of 80kmph, how much distance will it cover before it is crushed.?

Q. a man walks at 40kmph and reaches the distance in 10 min less than that of usual . by walking at 60 kmph he reaches 10 minutes earlier. the distance covered by him is.?

Q. a contract was signed to complete a job in 30 days. after how many days can 5 men leave then so that the job can be completed in 35 days?

Q. If x and y are multiples of 2 then which are all the multiples of 2

1) x*y 2)x^y 3) x+y 4) x-Y 5) x/y

a. all of these

b.1,2,4,5

c. 1,2,5

d.1,2,3,4

Q. if 3636% of a number is 72, what is the number?

Q. if the average of 6 consecutive number is 27, then the largest of the number is?

Q. The ratio of two numbers is 2/3, and if a 1 is subtracted from the numerator and a 1 is added to the remainder the ratio becomes 1/2, then the numbers are.?

Q. a pizza which is thin is cut into 'x' pieces by 4 straight lines then the lowest possible value of x is?

Q. The number 50 is divided into two equal parts, the ratio of the largest part to the smallest is 2/3, then the largest part is?

PAPER 6:
1. if jacob sold a watch costing rs.400 to john at 15% profit and john sold the same to sudhir at 15% profit, what is the price paid by sudhir?

a.460 b.510 c.529(ans) d.560

2. In a shop 80% of the articles are sold at a profit of 10% and the remaining at a loss of 40%.what is the overall profit/loss?

a.10% profit b.10% loss c.15% profit d. no profit, no loss(ans)

3. if an article with marked price of rs.400 is sold at successive discount of 10%,25% and 15%,what is the price the customer has to pay?

a.360 b.300 c.230(ans) d.270

4. the sides of a triangle are in the ratio 37.if the perimeter is 60 cms, the longest side is

a.7 b.30 c.28(ans) d.14

5. an article with cost price of 180 is sold at 15% profit. what is the selling price?

a.198 b.200 c.204 d.207(ans)

6. what part of x*x is power(x,2/3)?

a.60% b.66.7% c.69% d.can't say(ans)

7. 15% of 75 is the same as vx% of 450.find x.

a.1 b.2.5(ans) c.3 d.5

8. if the selling price of an object is rs.2300 and the profit percent is 15,what is the cost price?

a.1995(ans) b.1945 c.2000 d.2645

9.70% of x is greater than 1/3rd of x by 110.what is x?

a.100 b.200 c.300 d.350(ans)

10. the age of a and b are in the ratio 4:5 and of b and c in the ratio 3:2.the youngedt of three is

a.a b.b c.c(ans) d.can't say

11. a man buys postage stamps of denomination of 30ps. and 50 ps. for rs.10.00. he buys 22 stamps in all. find the no of 30ps. stamps bought by him.

a.5(ans) b.6 c.17 d.8

12. the ages of a and b are in the ratio 9:4. after 7 years the ratio of their aghes will be 5:3.find b's present age.

a.18 b.8(ans) c.7 d.16

13. if 28 is divided into two parts such that one fourth of the greater part is equal to one third of the lesser part,then the greater part is

a.16(ans) b.18 c.20 d.24

14.a man and a woman, walking together start out by both taking a step with the left foot. in order to keep together, the man whose stride is longer, takes two steps while the woman takes three. how many steps will the woman have taken they are both about to step out on the right foot for the first time together?

15. for communicating with its satellite,NASA has only two codes is equal to 2 and<= is equal to 3.whenever the two symbols appear together the value is taken as sum of each symbol. for example <=<=*** is equal to 3+3+2+2+2=12.which of the following is equal to <=<=<=** minus <**?

a.<=* b.<=** c.<=**** d.<=<=(ans)
16. if i sell two articles, one at 20% profit for rs.100 and the other at 20% loss for rs.100, what is my net profit/loss?

a.4.16 profit b.4.16 loss c.8.33 profit d.8.33 loss(ans)

17. if 85% of the population of an ant colony is red, and of these 45% are females, then what % of the total ant population are male red ants?

a.46.75(ans) b.40 c.33.66 d.66.66

18. what is the cost price of an article sold at rs.199 after two successive discount of 10% and 15%?

a.260(ans) b.200 c.234 d.220

19. if A and B can do a piece of work in 10 days and A alone can do it in 15 days, how long will B take to do it?

a.25 b.20 c.15 d.30

20. if 12 men working 2 hours a day take 10 days to complete a job, how long will 8 men working 6 hours a day take to do the same work?

a.5(ans) b.8 c.12 d.3

21.a mixture contains spirit and water in the ratio 5:1. another mixture contains spirit and water in the ratio 2:1.what is the ratio in which two mixtures are added to get the mixture in the ratio 5:2

a.5:2 b.2:5(ans) c.2:7 d.3:2

22..x:y=7:11, y:z=1:7.what is the least possible integral values of x given that z is 11x.

a.3(ans) b.9 c.7 d.10

23. pqrs is a rectangle having area 50. rx=1/4sr.what is the area of pqxs?

a.37.5 b.42.5 c.12 d.3

24.what is the area of a circle having the same perimeter as that of a square whose area is 121.

PCS Patni Company Profile


Patni Computer Systems (PCS) is an international software and applications outsourcing specialist, with over 20 years of experience. Founded in 1978, PCS now offers a wide range of services, including: application development / maintenance, ERP implementation & related services, E-Commerce & Web enabling solutions, Euro conversion, staff augmentation and offshore development.

PCS currently employs over 3400 software professionals at our primary development facilities in Mumbai, Navi Mumbai, Pune, Gandhinagar, Chennai and NOIDA (India).

PCS provides services to a varied field including Airlines, Automotive, Financial Services, Electronics, Healthcare, Hospitality, Manufacturing, Products, and Utilities.

The Group's principal activity is to provide Information Technology services and solutions to customers operating in various industry segments. The Group operates in seven segments: Insurance Services, Manufacturing, Financial Services, Software Vendor, Product Engineering [^] Services, Telecom and Other. The Group's services include application development, application maintenance and support, packaged software implementation, infrastructure [^] management [^] services, product engineering, business [^] process outsourcing and quality assurance services. The Group markets in the United States of America [^] , Europe, Japan and Rest of Asia Pacific.

Our vision is to achieve global [^] IT services leadership in providing value-added high quality IT solutions to our clients in selected horizontal and vertical segments, by combining technology skills, domain expertise, process focus and a commitment to long-term client relationships

The company was incorporated in 1978 as Patni Computer Systems Private Limited and changed its name to Patni Computer Systems Limited in 2003. Patni Computer Systems is headquartered in Mumbai, India

Headquarters: Bombay Area, India
Industry : Information Technology and Services
Type :Public Company
Status : Operating
Company Size: 14,290 employees
Founded :1978



For more details please visit www.patni.com

Monday, November 22, 2010

Information about updation of JKC Profiles

We are glad to inform you that the recruitment activity for the JKC
registered candidates of 2011 batch is expected to kick start in a
couple of weeks. Hope we would able to place the students in big numbers.

It is observed that several candidates have lost the opportunity to
participate in the recruitment events in spite of having the required
eligibly as they have not updated their profiles in their respective
JKC accounts.

All the JKC registered students are informed to check their profile
available in their accounts on JKC Portal (www.ieg.gov.in/jkc). Once
they login into their accounts, then they can check their profile by clicking
View Profile

The login details of all the registered candidates are available in
their respective college accounts on JKC portal.

Students can update their personal details on their own using EDIT
service
given in View Profile of their JKC account

For any updations with respect to their academic details they may
contact their TPO / JKC in-charge who can update their academic details
through the college account on JKC portals.

As it is not possible to add the candidates once JKC announces the
list of short listed candidates for the recruitment events, please make
sure that you dont miss the opportunity inspite of your eligibility.

Thursday, September 16, 2010

Profile of SYNTEL INC.

Syntel, Inc. provides information technology (IT) and knowledge process outsourcing (KPO) services worldwide. The company operates in four segments: Applications Outsourcing, e-Business, KPO, and TeamSourcing. The Applications Outsourcing segment provides application management services for the ongoing management, development, and maintenance of business applications. The e-Business segment offers various customized technology services in the areas of Web solutions, including Web architecture, Web-enablement of legacy applications, and portal development. It also provides customer relationship management (CRM) services, which involve various software solutions. The KPO segment provides a host of outsourced solutions for business processes. It consists of outsourced solutions that improve the back-office outsourced solutions, such as transaction processing, loan servicing, retirement processing, and collections and payment processing. The TeamSourcing segment offers professional IT consulting services, such as IT applications systems specification, design, development, implementation, and maintenance. The company serves the financial services, healthcare, insurance, automotive, retail, and other industries. Syntel, Inc. was founded in 1980 and is headquartered in Troy, Michigan.

Syntel is experienced with the leading industry technologies and tools including:

• ETL (Informatica, Datastage, Ab-Initio, ACTA, Oracle Warehouse Builder, SAP Business Warehouse, Microsoft DTS)
• OLAP (Cognos, MicroStrategy, Business Objects, Webfocus, Essbase, Oracle Express)
• Reporting (Crystal Reports, Actuate)
• Databases (Oracle, Sql Server, DB2 / UDB, Teradata)
• Operating systems (Unix / Aix, NT, VMS, MVS)
• Data sources (Legacy / cobol, ERP, CRM, SCM, Flat files, Spreadsheets, RDBMS)
• Architectures (ODS - operational data store, EDW - Enterprise data warehouse, Data marts. All together and in combinations)
• Schemas (Star, snowflake, constellation)
• Type of OLAP (MOLAP - Multidimensional, ROLAP - Relational, DOLAP - Distributed)
• Type of implementations (Batch, Real-time)

Syntel's end-to-end KPO solution includes:

• Comprehensive Portfolio Assessment Tool to determine what can be outsourced, where they should be done, and the optimal business arrangement
• Six Sigma Based Transition and Change Management Methodology, including diligence, transition plan, knowledge transfer, ramp up and ongoing change management
• Delivery Frameworkwith sample SLAs (accuracy, adherence to deadlines, response time, etc.)
• Baseline Project Plan
• Metrics highlighting significant cost savings from year one
• Year-Over-Year Productivity Savings Guarantees
• Syntel has significantly shifted its business model in several ways. Today, almost 100 percent of our revenues come from KPO, Applications Outsourcing and e-Business services. We have dramatically altered how we deliver services, pioneering an on-site, off-site, offshore approach that gives customers ultimate flexibility in how and where the solutions are delivered. And, we have extended that proven model to the Knowledge Process Outsourcing world. Historically, approximately 90 percent of our revenues are from repeat/referred customers, one of the best rates in the IT services business.

Global Delivery


Syntel's rapid growth during the early years prompted its leadership to begin exploring additional service offerings to augment its core IT staffing business.

In 1988, Syntel began providing development and maintenance services to its clients. With the addition in 1992 of its first wholly-owned development centers in India, Syntel began offering software outsourcing services on an onsite/offshore model, which connected software developers in India to project managers at the client's location via an international telecommunications network.

This model allowed Syntel to offer the cost of offshore labor rates with the flexibility and responsiveness of onsite project management. This method of IT service delivery is now widely known as the Global Delivery Model, and Syntel was among the first US-based companies to offer this service to its clients.

Company history


• 1980: Syntel founded as a staff augmentation firm, an offering later known as TeamSourcing.
• 1988: Syntel begins providing full lifecycle maintenance, development, and migration services, which later evolve into the IntelliSourcing service offering.
• 1992: Syntel opens its first two Global Development Centers in Mumbai and Chennai India, making it one of the first U.S.-based IT service companies to employ a global delivery model.
• 1994: Syntel’s revenues top $50 million and employs over 1,000 staff.
• 1994: Syntel opens a third Global Development Center in Cary, North Carolina, which serves as US hub for Syntel's global voice and data network.
• 1997: Syntel becomes a public company in August, as the stock begins trading on NASDAQ as SYNT; 3.45 million shares floated in its Initial Public Offering (IPO); Syntel opens offices in London and Singapore; revenues pass the $100 million mark.
• 1998: Syntel's Mumbai and Chennai Global Development Centers earn ISO 9001 certification; Syntel ranked #2 in Forbes’ “200 Best Small Companies in America”
• 2000: Syntel begins exploring BPO service offerings by migrating its own HR, Finance and Helpdesk operations from the US to India.
• 2001: Syntel’s Global Development Centers assessed at SEI CMM Level 5, making Syntel one of only 15 U.S. companies to achieve this standard; Syntel opens healthcare-focused Global Development Center in Nashville, TN and a regional office in Munich, Germany.
• 2002: Syntel opens Global Development Centers in Phoenix, AZ and Pune, India.
• 2003: Syntel’s Global Development Centers in Mumbai and Chennai achieve ISO 9001:2000 certification.
• 2004: Syntel opens dedicated BPO center in Mumbai; Syntel’s Global Development Centers achieve BS 7799 security certification.
• 2005: Syntel's Global Development Centers achieve SEI CMMi Level 5; Syntel opens the first phase of its Pune Technology Campus. Syntel acquires a 27-acre (110,000 m2) parcel of land in Chennai for a second technology campus.
• 2008: Syntel breaks ground on its Chennai technology campus and records more than $400 million in revenues for the first time.
• 2009: Syntel promotes Keshav Murugesh to the post of President & CEO. Bharat Desai remains as Chairman of the Board.
• 2010: Prashant Ranade becomes CEO; Syntel opens the first phase of its Chennai technology campus.

Syntel Placement Paper Format

1.Aptitude & Reasoning 25 questions
2. English 15 questions

APTITUDE & REASONING
 LOGICAL REASONING - 5Q
 CODING AND DECODING - 5Q
 LOGICAL THINKING - 5Q
 PUZZLE TEST – 5Q
 OPERATORS - (5Q)
• 48*28/39-2 ?
• 16+24/8-6/2*3
VERBAL:
 Fill the black with proper word OR meaning of word in sentences - 5 Q.
 Correction of sentence - 5 Q
 antonyms and idioms – 5 Q


TECHNICAL ROUND:

The Questions shall be from core subjects C ,C++ and Data Structures

1.What are the stages in a software life cycle
2.What is slice time
3.Does the slice time change
4. Difference b/w System s/w & application s/w
5.Name a few s/w
6.What is a tree
7.Explain Binary tree
8.What is the basic rule of binary tree
9.Explain Linked List
10.Explain Stack & Queue

Friday, July 16, 2010

C++ Interview Questions

1. What is virtual constructors/destructors?

Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching the pointer type) is called on the object.
There is a simple solution to this problem - declare a virtual base-class destructor. This makes all derived-class destructors virtual even though they don't have the same name as the base-class destructor. Now, if the object in the hierarchy is destroyed explicitly by applying the delete operator to a base-class pointer to a derived-class object, the destructor for the appropriate class is called.

Virtual constructor: Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error. Does c++ support multilevel and multiple inheritance?
Yes.

What are the advantages of inheritance?
• It permits code reusability.
• Reusability saves time in program development.
• It encourages the reuse of proven and debugged high-quality software, thus reducing problem after a system becomes functional.

What is the difference between declaration and definition?
The declaration tells the compiler that at some later point we plan to present the definition of this declaration.
E.g.: void stars () //function declaration
The definition contains the actual implementation.
E.g.: void stars () // declarator
{
for(int j=10; j>=0; j--) //function body
cout<<"*";
cout<}

2. What do you mean by pure virtual functions?

A pure virtual member function is a member function that the base class forces derived classes to provide. Normally these member functions have no implementation. Pure virtual functions are equated to zero.
class Shape { public: virtual void draw() = 0; };

3. What is namespace?

Namespaces allow us to group a set of global classes, objects and/or functions under a name. To say it somehow, they serve to split the global scope in sub-scopes known
as namespaces. The form to use namespaces is:

namespace identifier { namespace-body }

Where identifier is any valid identifier and namespace-body is the set of classes, objects and functions that are included within the namespace.

4. What is RTTI?

Runtime type identification (RTTI) lets you find the dynamic type of an object when you have only a pointer or a reference to the base type. RTTI is the official way in standard C++ to discover the type of an object and to convert the type of a pointer or reference (that is, dynamic typing). The need came from practical experience with C++. RTTI replaces many homegrown versions with a solid, consistent approach.


5. What is a template?

Templates allow to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until certain point they fulfill the functionality of a macro. Its prototype is any of the two following ones:

template function_declaration; template
function_declaration;

The only difference between both prototypes is the use of keyword class or typename, its use is indistinct since both expressions have exactly the same meaning and behave exactly the same way.




6. What do you mean by inline function?

The idea behind inline functions is to insert the code of a called function at the point where the function is called. If done carefully, this can improve the application's performance in exchange for increased compile time and possibly (but not always) an increase in the size of the generated binary executables.


7. What is virtual class and friend class?

Friend classes are used when two or more classes are designed to work together and need access to each other's implementation in ways that the rest of the world shouldn't be allowed to have. In other words, they help keep private things private. For instance, it may be desirable for class DatabaseCursor to have more privilege to the internals of class Database than main() has.



8. What is function overloading and operator overloading?

Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading. When an overloaded function is called, the C++ compiler selects the proper function by examining the number, types and order of the arguments in the call. Function overloading is commonly used to create several functions of the same name that perform similar tasks but on different data types.

Operator overloading allows existing C++ operators to be redefined so that they work on objects of user-defined classes. Overloaded operators are syntactic sugar for equivalent function calls. They form a pleasant facade that doesn't add anything fundamental to the language (but they can improve understandability and reduce maintenance costs).


9. Difference between realloc() and free()?

The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, no action will occur. The realloc subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block. The pointer specified by the Pointer parameter must have been created with the malloc, calloc, or realloc subroutines and not been reallocated.

10. What is abstraction?

Abstraction is of the process of hiding unwanted details from the user.


11.What is encapsulation?

Packaging an object's variables within its methods is called encapsulation.



13.What is the difference between an object and a class?

Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.
• A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don't change.
• The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed.

• An Object on the other hand has a limited lifespan. Objects are created and eventually destroyed. Also during that lifetime, the attributes of the object may undergo significant change.



14.What is polymorphism? Explain with an example?

"Poly" means "many" and "morph" means "form". Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of
object.
Example: function overloading, function overriding, virtual functions. Another example can be a plus '+' sign, used for adding two integers or for using it to concatenate two strings.


15.What do you mean by inheritance?

Inheritance is the process of creating new classes, called derived classes, from existing classes or
base classes. The derived class inherits all the capabilities of the base class, but can add
embellishments and refinements of its own.

16. What is a scope resolution operator?

A scope resolution operator (::), can be used to define the member functions of a class outside the class.


17.What are virtual functions?

A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually of the derived class, even if the object is accessed by a base pointer rather than a derived pointer. This allows algorithms in the base class to be replaced in the derived class, even if users don't know about the derived class.


18.What is friend function?

As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.


19.What is the difference between class and structure?

Structure: Initially (in C) a structure was used to bundle different type of data types together to
perform a particular functionality. But C++ extended the structure to contain functions also. The major difference is that all declarations inside a structure are by default public.

Class: Class is a successor of Structure. By default all the members inside the class are private.









20. What is public, protected, private?

Public, protected and private are three access specifiers in C++.
• Public data members and member functions are accessible outside the class.
• Protected data members and member functions are only available to derived classes.
• Private data members and member functions can't be accessed outside the class.
However there is an exception can be using friend classes.




21.What is an object?

Object is a software bundle of variables and related methods. Objects have state and behavior.

22. What is a class?

Class is a user-defined data type in C++. It can be created to solve a particular kind of problem.
After creation the user need not know the specifics of the working of a class.

C Interview Questions

1. What is the difference between declaring a variable and defining a variable?
Declaration of a variable in C hints the compiler about the type and size of the variable in compile time. Similarly, declaration of a function hints about type and size of function parameters. No space is reserved in memory for any variable in case of declaration.

Example: int a;
Here variable 'a' is declared of data type 'int'

Defining a variable means declaring it and also allocating space to hold it.
We can say "Definition = Declaration + Space reservation".

Example: int a = 10;
Here variable "a" is described as an int to the compiler and memory is allocated to hold value 10.
2. What is a static variable?
A static variable is a special variable that is stored in the data segment unlike the default automatic variable that is stored in stack. A static variable can be initialized by using keyword static before variable name.

Example:
static int a = 5;

A static variable behaves in a different manner depending upon whether it is a global variable or a local variable.
A static global variable is same as an ordinary global variable except that it cannot be accessed by other files in the same program / project even with the use of keyword extern. A static local variable is different from local variable. It is initialized only once no matter how many times that function in which it resides is called. It may be used as a count variable.

Example:
#include
//program in file f1.c
void count(void) {
static int count1 = 0;
int count2 = 0;
count1++;
count2++;
printf("\nValue of count1 is %d, Value of count2 is %d", count1, count2);
}
/*Main function*/
int main(){
count();
count();
count();
return 0;
}

Output:
Value of count1 is 1, Value of count2 is 1
Value of count1 is 2, Value of count2 is 1

3. What is a register variable?
Register variables are stored in the CPU registers. Its default value is a garbage value. Scope of a register variable is local to the block in which it is defined. Lifetime is till control remains within the block in which the register variable is defined. Variable stored in a CPU register can always be accessed faster than the one that is stored in memory. Therefore, if a variable is used at many places in a program, it is better to declare its storage class as register

Example:
register int x=5;
Variables for loop counters can be declared as register. Note that register keyword may be gnored by some compilers.

4. Where is an auto variables stored?
Main memory and CPU registers are the two memory locations where auto variables are stored. Auto variables are defined under automatic storage class. They are stored in main memory. Memory is allocated to an automatic variable when the block which contains it is called and it is de-allocated at the completion of its block execution.
Auto variables:
Storage :
Default value :
Scope
Lifetime
:
:
main memory.
garbage value.
local to the block in which the variable is defined.
till the control remains within the block in which the variable is defined.

5. What is scope & storage allocation of extern and global variables?
Extern variables: belong to the External storage class and are stored in the main memory. extern is used when we have to refer a function or variable that is implemented in other file in the same project. The scope of the extern variables is Global.

Example:
/***************
Index: f1.c
****************/
#include
extern int x;
int main() {
printf("value of x %d", x);
return 0;
}

Index: f2.c
****************/
int x = 3;

Here, the program written in file f1.c has the main function and reference to variable x. The file f2.c has the declaration of variable x. The compiler should know the datatype of x and this is done by extern definition. Global variables: are variables which are declared above the main( ) function. These variables are accessible throughout the program. They can be accessed by all the functions in the program. Their default value is zero.

6. What is scope & storage allocation of register, static and local variables?
Register variables: belong to the register storage class and are stored in the CPU registers. The scope of the register variables is local to the block in which the variables are defined. The variables which are used for more number of times in a program are declared as register variables for faster access.
Example: loop counter variables.
register int y=6;

Static variables: Memory is allocated at the beginning of the program execution and it is reallocated only after the program terminates. The scope of the static variables is local to the block in which the variables are defined.

Example:
#include
void decrement(){
static int a=5;
a--;
printf("Value of a:%d\n", a);
}
int main(){
decrement();
return 0;
}

Here 'a' is initialized only once. Every time this function is called, 'a' does not get initialized. so output would be 4 3 2 etc.,
Local variables: are variables which are declared within any function or a block. They can be accessed only by function or block in which they are declared. Their default value is a garbage value.

What is the difference between 'break' and 'continue' statements?
Differences between 'break' and 'continue' statements
break
1. break is a keyword used to terminate the loop or
exit from the block. The control jumps to next
statement after the loop or block.
2.Syntax:
{
Statement 1;
Statement 2;
Statement n;
break;
}
continue

1. continue is a keyword used for skipping the current iteration and go to next iteration of the loop

2.Syntax:

{
Statement 1;
continue;
Statement 2;
}

3. break can be used with for, while, do- while, and switch statements. When break is used in nested loops i.e. within the inner most loop then only the innermost loop is terminated.

4. Example:

i = 1, j = 0;
while(i<=5)
{
i=i+1;
if(i== 2)

3. This statement when occurs in a loop does not terminate it but skips the statements after this continue statement. The control goes to the next iteration. continue can be used with for, while and do-while.
4. Example:
i = 1, j = 0;
while(i<=5)
{
i=i+1;
if(i== 2)

10. What is the difference between 'for' and 'while' loops?
for loop: When it is desired to do initialization, condition check and increment/decrement in a single statement of an iterative loop, it is recommended to use 'for' loop.

Syntax:
for(initialization;condition;increment/decrement)
{
//block of statements
increment or decrement
}

Program: Program to illustrate for loop
#include
int main() {
int i;
for (i = 1; i <= 5; i++) {
//print the number
printf("\n %d", i);
}
return 0;
}

Output:
1
2
3
4
5

Explanation:
The loop repeats for 5 times and prints value of 'i' each time. 'i' increases by 1 for every cycle of loop.

while loop: When it is not necessary to do initialization, condition check and increment/decrement in a single statement of an iterative loop, while loop could be used. In while loop statement, only condition statement is present.

What is an Enumeration Constant?
Enumeration is a data type. We can create our own data type and define values that the variable can take. This can help in making program more readable. enum definition is similar to that of a structure.

Example: consider light_status as a data type. It can have two possible values - on or off.
enum light_status
{
on, off
};
enum light_status bulb1, bulb2;
/* bulb1, bulb2 are the variables */

Declaration of enum has two parts:
a) First part declares the data type and specifies the possible values, called 'enumerators'.
b) Second part declares the variables of this data type.
We can give values to these variables:
bulb1 = on;
bulb2 = off;

5. What is a structure?
A structure is a collection of pre-defined data types to create a user-defined data type. Let us say we need to create records of students. Each student has three fields:
int roll_number;
char name[30];
int total_marks;
This concept would be particularly useful in grouping data types. You could declare a structure student as:
struct student
{
int roll_number;
char name[30];
int total_marks;
} student1, student2;
The above snippet of code would declare a structure by name student and it initializes two objects student1, student2. Now these objects and their fields could be accessed by saying student1.roll_number for accesing roll number field of student1 object, similarly student2.name for accesing name field of student2 object.


What are the advantages of unions?
Union is a collection of data items of different data types. It can hold data of only one member at a time though it has members of different data types. If a union has two members of different data types, they are allocated the same memory. The memory allocated is equal to maximum size of the members. The data is interpreted in bytes depending on which member is being accessed.

Example:
union pen
{
char name;
float point;
};

Here name and point are union members. Out of these two variables, 'point' is larger variable which is of float data type and it would need 4 bytes of memory. Therefore 4 bytes space is allocated for both the variables. Both the variables have the same memory location. They are accessed according to their type. Union is efficient when members of it are not required to be accessed at the same time.


How can typedef be to define a type of structure?
typedef declaration helps to make source code of a C program more readable. Its purpose is to redefine the name of an existing variable type. It provides a short and meaningful way to call a data type. typedef is useful when the name of the data type is long. Use of typedef can reduce length and complexity of data types.
Note: Usually uppercase letters are used to make it clear that we are dealing with our own data type.

Example:
struct employee
{
char name[20];
int age;
};



What is the purpose of main() function?
In C, program execution starts from the main() function. Every C program must contain a main() function. The main function may contain any number of statements. These statements are executed sequentially in the order which they are written.

The main function can in-turn call other functions. When main calls a function, it passes the execution control to that function. The function returns control to main when a return statement is executed or when end of function is reached.

In C, the function prototype of the 'main' is one of the following:
int main(); //main with no arguments
int main(int argc, char *argv[]); //main with arguments

The parameters argc and argv respectively give the number and value of the program's command-line arguments.

Example:
#include
/* program section begins here */
int main() {
// opening brace - program execution starts here
printf("Welcome to the world of C");
return 0;
}
// closing brace - program terminates here

Output:
Welcome to the world of C




Explain command line arguments of main function?
In C, we can supply arguments to 'main' function. The arguments that we pass to main ( ) at command prompt are called command line arguments. These arguments are supplied at the time of invoking the program. The main ( ) function can take arguments as: main(int argc, char *argv[]) { }
The first argument argc is known as 'argument counter'. It represents the number of arguments in the command line. The second argument argv is known as 'argument vector'. It is an array of char type pointers that points to the command line arguments. Size of this array will be equal to the value of argc.

Example: at the command prompt if we give:
C:\> fruit.exe apple mango
then
argc would contain value 3
argv [0] would contain base address of string " fruit.exe" which is the command name that invokes the program.
argv [1] would contain base address of string "apple"
argv [2] would contain base address of string "mango"
here apple and mango are the arguments passed to the program fruit.exe





What are header files? Are functions declared or defined in header files ?
Functions and macros are declared in header files. Header files would be included in source files by the compiler at the time of compilation.
Header files are included in source code using #include directive.#include includes all the declarations present in the header file 'some.h'.
A header file may contain declarations of sub-routines, functions, macros and also variables which we may want to use in our program. Header files help in reduction of repetitive code.

Syntax of include directive:
#include //includes the header file stdio.h, standard input output header into the source code

Functions can be declared as well as defined in header files. But it is recommended only to declare functions and not to define in the header files. When we include a header file in our program we actually are including all the functions, macros and variables declared in it.

In case of pre-defined C standard library header files ex(stdio.h), the functions calls are replaced by equivalent binary code present in the pre-compiled libraries. Code for C standard functions are linked and then the program is executed. Header files with custom names can also be created.

Program: Custom header files example
/****************
Index: restaurant.h
****************/
int billAll(int food_cost, int tax, int tip);

/****************
Index: restaurant.c
****************/
#include
int billAll(int food_cost, int tax, int tip) {
int result;
result = food_cost + tax + tip;
printf("Total bill is %d\n",result);
return result;
}


What are the differences between formal arguments and actual arguments of a function?
Argument: An argument is an expression which is passed to a function by its caller (or macro by its invoker) in order for the function(or macro) to perform its task. It is an expression in the comma-separated list bound by the parentheses in a function call expression.

Actual arguments:
The arguments that are passed in a function call are called actual arguments. These arguments are defined in the calling function.

Formal arguments:
The formal arguments are the parameters/arguments in a function declaration. The scope of formal arguments is local to the function definition in which they are used. Formal arguments belong to the called function. Formal arguments are a copy of the actual arguments. A change in formal arguments would not be reflected in the actual arguments.



What is a pointer in C?
A pointer is a special variable in C language meant just to store address of any other variable or function. Pointer variables unlike ordinary variables cannot be operated with all the arithmetic operations such as '*','%' operators. It follows a special arithmetic called as pointer arithmetic.

A pointer is declared as:
int *ap;
int a = 5;

In the above two statements an integer a was declared and initialized to 5. A pointer to an integer with name ap was declared.

Next before ap is used
ap=&a;
This operation would initialize the declared pointer to int. The pointer ap is now said to point to a.

Operations on a pointer:
• Dereferencing operator ' * ': This operator gives the value at the address pointed by the pointer . For example after the above C statements if we give
printf("%d",*ap);

Actual value of a that is 5 would be printed. That is because ap points to a.

• Addition operator ' + ': Pointer arithmetic is different from ordinary arithmetic.


. What are the advantages of using pointers?
Pointers are special variables which store address of some other variables.

Syntax: datatype *ptr;
Here * indicates that ptr is a pointer variable which represents value stored at a particular address.

Example: int *p;
'p' is a pointer variable pointing to address location where an integer type is stored.

Advantages:
1. Pointers allow us to pass values to functions using call by reference. This is useful when large sized arrays are passed as arguments to functions. A function can return more than one value by using call by reference.
2. Dynamic allocation of memory is possible with the help of pointers.
3. We can resize data structures. For instance, if an array's memory is fixed, it cannot be resized. But in case of an array whose memory is created out of malloc can be resized.
4. Pointers point to physical memory and allow quicker access to data.



What are the differences between malloc() and calloc()?
Allocation of memory at the time of execution is called dynamic memory allocation. It is done using the standard library functions malloc() and calloc(). It is defined in "stdlib.h".

malloc(): used to allocate required number of bytes in memory at runtime. It takes one argument, viz. size in bytes to be allocated.

Syntax:
void * malloc(size_t size);


Example:
a = (int*) malloc(4);
4 is the size (in bytes) of memory to be allocated.

calloc(): used to allocate required number of bytes in memory at runtime. It needs two arguments viz.,
1. total number of data and
2. size of each data.

Syntax:
void * calloc(size_t nmemb, size_t size);
Example:
a = (int*) calloc(8, sizeof(int));
Here sizeof indicates the size of the data type and 8 indicates that we want to reserve space for storing 8 integers.

Differences between malloc() and calloc() are:
1. Number of arguments differ.
2. By default, memory allocated by malloc() contains garbage values. Whereas memory allocated by calloc() contains all zeros.


How to use realloc() to dynamically increase size of an already allocated array?
realloc(): This function is used to increase or decrease the size of any dynamic memory which is allocated using malloc() or calloc() functions.

Syntax: void *realloc(void *ptr, size_t newsize);

The first argument 'ptr' is a pointer to the memory previously allocated by the malloc or calloc functions. The second argument 'newsize' is the size in bytes, of a new memory region to be allocated by realloc. This value can be larger or smaller than the previously allocated memory. The realloc function adjusts the old memory region if newsize is smaller than the size of old memory.

If the newsize is larger than the existing memory size, it increases the size by copying the contents of old memory region to new memory region. The function then deallocates the old memory region. realloc function is helpful in managing a dynamic array whose size may change during execution.

Example: a program that reads input from standard input may not know the size of data in advance. In this case, dynamically allocated array can be used so that it is possible allocate the exact amount of memory using realloc function.