Mahindra Satyam Placement Paper Whole Testpaper KITS-03 Mar 2011

Posted by FreshersWorld

7 Jan, 2012

Mahindra Satyam

1. Which of the following statement(s) is(are) not true

a. Literate workers have small families than illiterate workers.

b. Families with 2 or less than 2 children are commoner than families

with 3 or more children.

c. 2 children families constitute 60% of the families of workers.

d. More the no. of children a worker has the more illiterate he is.

e. None the above statement is true.

Ans: e

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

Ans: Rs.800/-

3. Sum of money at compound interest amounts of thrice itself in 3 years. In how many years will it take 9 times itself.

Ans: 6

4. Two trains in the same direction at 50 & 32 kmph respectively. A man in the slower train observes the 15 seconds elapse before the faster train completely passes him. What is the length of faster train ?

Ans: 75m

5. x% of y is y% of ?

Ans: x

6. A man spending half of his salary for house hold expenses, 1/4th for rent, 1/5th for travel expenses, a man deposits the rest in a bank. If his monthly deposits in the bank amount 50. What is his monthly salary ?

Ans: 1000

7. The population of a city increases @ 4% p.a. That is an additioanl annual increase of 4% of the population due to this influx of job seekers, the % increase in population after 2 years is

8. The ratio of no. of boys & girls in a school is 3:2 Out of these ?% the boys & 25% of girls are scholarship holders. % of students who are not scholarship holders.?

9. 15 Men take 21 days of 8 hrs. each to do a piece of work. How many days of 6 hrs. each would do if 21 women take. If 3 women do as much work of 2 men.

Ans: 30

10. a cylinder ingot 6cms in diameter and 6 cms in height is and spheres all of the same size are made from the material obtained.what is the diameter of each sphere?

Ans:3cms

11. rectangular plank of sqrt(2)meters wide can be placed so that it is on either side of the diagonal of a square shown below.what is the area of the plank?

Ans:7sqrt(2)

12. the difference b/w the compound interest payble half yearly and the simple interest on a certain sum cont out at 10% p.a for 1 year is Rs 25 what is the sum

Ans:10,000

13. what is the smallest n0 by which 2880 must be divided in order to make it a perfect square ?

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

Ans: c

14.a father is 30 times more than his son however he will be only thrice as old as the son what is father,s present age ?

Ans: 40

15. If a boat is moving in upstream with velocity of 14 km/hr and goes downstream with a velocity of 40 km/hr, then what is the speed of the stream ?

(a) 13 km/hr

(b) 26 km/hr

(c) 34 km/hr

(d) none of these

Ans: A

16 . Find the value of ( 0.75 * 0.75 * 0.75 - 0.001 ) / ( 0.75 * 0.75 - 0.075 + 0.01)

(a) 0.845

(b) 1.908

(c) 2.312

(d) 0.001

Ans: A

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

(a) 3 days

(b) 8/9 days

(c) 4 days

(d) can,t say

Ans: B

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

(a) 210 kms

(b) 30 kms

(c) 20 kms

(c) none of these

Ans: B

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

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

(a) 6

(b) 8

(c) 7

(d) data insufficient

Ans: C

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

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

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

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

(a) 40%

(b) 55%

(c) 35%

(d) 30%

Ans: D

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

(a) 110 men

(b) 130 men

(c) 100 men

(d) none of these

Ans: A

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

(a) Rs. 500

(b) Rs. 600

(c) Rs. 800

(d) Rs. 900

Ans: C

27. If a sum of money compound annually amounts of thrice itself in 3 years. In how many years will it become 9 times itself.

(a) 6

(b) 8

(c) 10

(d) 12

Ans A

28. Two trains move in the same direction at 50 kmph and 32 kmph respectively. A man in the slower train observes the 15 seconds elapse before the faster train completely passes by him. What is the length of faster train ?

(a) 100m

(b) 75m

(c) 120m

(d) 50m

Ans B

29. How many mashes are there in 1 squrare meter of wire gauge if each mesh

is 8mm long and 5mm wide ?

(a) 2500

(b) 25000

(c) 250

(d) 250000

Ans B

30. x% of y is y% of ?

(a) x/y

(b) 2y

(c) x

(d) can,t be determined

Ans: C

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

(a) 15%

(b) 16.66%

(c) 12%

(d) 9%

Ans B

32. A man spends half of his salary on household expenses, 1/4th for rent, 1/5th for travel expenses, the man deposits the rest in a bank. If his monthly deposits in the bank amount 50, what is his monthly salary ?

(a) Rs.500

(b) Rs.1500

(c) Rs.1000

(d) Rs. 900

Ans C

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

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

35. 15 men take 21 days of 8 hrs. each to do a piece of work. How many days of 6 hrs. each would it take for 21 women if 3 women do as much work as 2 men?

(a) 30

(b) 20

(c) 19

(d) 29

Ans: A

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

(a) 5 cms

(b) 2 cms

(c) 3 cms

(d) 4 cms

Ans C

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

Ans :7*(2)1/2

38. The difference b/w the compound interest payble half yearly and the simple interest on a certain sum lent out at 10% p.a for 1 year is Rs 25. What is the sum?

(a) Rs. 15000

(b) Rs. 12000

(c) Rs. 10000

(d) none of these

Ans C

39. What is the smallest number by which 2880 must be divided in order to make it into a perfect square ?

(a) 3

(b) 4

(c) 5

(d) 6

Ans: C

40. A father is 30 years older than his son however he will be only thrice as old as the son after 5 years what is father,s present age ?

(a) 40 yrs

(b) 30 yrs

(c) 50 yrs

(d) none of these

Ans: A

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

42. If an item costs Rs.3 in ,99 and Rs.203 in ,00.What is the % increase in price?

(a) 200/3 %

(b) 200/6 %

(c) 100%

(d) none of these

Ans: A

Directions: For questions 43-52 fill the missing number or letter in the given series

43. a, c, e, g, _

(a) h

(b) i

(c) d

(d) j

Ans: B

44. a, e, i, m, q, u, _, _

(a) y,c

(b) b,f

(c) g,i

(d) none

Ans: A

45. ay , bz , cw , dx ,__

(a) gu

(b) ev

(c) fv

(d) eu

Ans: D

46. 1, 2, 3, 5, 7, 11, __

(a) 15

(b) 9

(c) 13

(d) 12

Ans: C

47. kp , lo , mn , __

(a) nm

(b) np

(c) op

(d) pq

Ans: A

48. R,M,__,F,D,__

(a) I, C

(b) A, Q

(c) L, N

(d) B, Q

Ans: A

49. ___, ayw, gec, mki, sqo

(a) awx

(b) usq

(c) prs

(d) lmn

Ans: B

50. 1, 3, 4, 8, 15, 27, __

(a) 60

(b) 59

(c) 43

(d) 50

Ans D

51. 0, 2, 3, 5, 8, 10, 15, 17, 24, 26,__

(a) 45

(b) 55

(c) 35

(d) 48

Ans: C

52. 2, 5, 9, 19, 37,__

(a) 64

(b) 55

(c) 75

(d) 40

Ans C

Directions for questions 53 to 58: Select the alternative that logically follows form the two given statements.

53. All scientists are fools. All fools are literates.

(a)All literates are scientists

(b) All scientists are literates

(c) No scientists are literates

(d) Both (a) and (b) are correct

Ans: B

54. No apple is an orange. All bananas are oranges.

(a) All apples are oranges

(b) Some apples are oranges

(c) No apple is a banana

(d) None of the above

Ans: A

55. All pens are elephants. Some elephants are cats.

(a) Some pens are cats

(b) No pens are cats

(c) All pens are cats

(d) None of the above

Ans: D

56. All shares are debentures.No debentures are deposits.

(a) All shares are deposits

(b) Some shares are deposits

(c) No shares are deposits

(d) None of the above

Ans: C

57. Many fathers are brothers. All brothers are priests.

(a) No father is a priest

(b) Many fathers are not priests

(c) Many fathers are priests

(d) Both (b) and (c)

Ans: B

58. Some green are blue. No blue are white.

(a) No green are white

(b) Some green are white

(c) No green are white

(d) None of the above

Ans: B

59. If the word "CODING" is represented as DPEJOH , then the word "CURFEW" can be represented?

(a) dvsgfx

(b) dvshfx

(c) dgshfx

(d) dtsgfy

Ans: A

60. If in a certain code "RANGE" is coded as 12345 and "RANDOM" is coded as 123678, then the code for the word "MANGO" would be

(a) 82357

(b) 84563

(c) 82346

(d) 82543

Ans: D

Directions for questions 61-63:

In a class of 150 students 55 speak English;85 speak Telugu and 30 speak neither English nor Telugu

61. How many speak both English and Telugu?

(a) 10

(b) 15

(c) 20

(d) 12

Ans: C

62.How many speak only Telugu?

(a) 55

(b) 45

(c) 65

(d) none of the above

Ans:C

63.How many speak at least one of the two languages?

(a) 120

(b) 100

(c) 250

(d) 50

Ans: A

64. What is wrong in the following problem

main() {

int i,j;

j = 10;

i = j++ - j++;

printf("%d %d", i,j);

}

ans: 0, 12

65 . What is the output of the following problem

main() {

int j;

for(j=0;j<3;j++)

foo();

}

foo() {

static int i = 10;

i+=10;

printf("%d\n",i);

}

/* Out put is (***since static int is used i value is retained between

* 20 function calls )

* 30

* 40

*/

66. What is wrong in the following code

main()

{ char *

c;

c = "Hello";

printf("%s\n", c);

}

ans:- Hello, The code is successfully running

67 . What is the final value of i and how many times loop is

Executed ?

*/

main()

{ int i,j,k,l,lc=0;

/* the input is given as 1234 567 */

printf("Enter the number string:<1234 567 \n");

scanf("%2d%d%1d",&i,&j,&k);

for(;k;k--,i++)

for(l=0;l

printf("%d %d\n",i,l);}

printf("LOOPS= %d\n", lc-1);

} /*

Ans: I 16, and loop is executed for 169 times

68. What is the output of the following program

*/

main() {

union {

int a;

int b;

int c;

} u,v;

u.a = 10;

u.b = 20;

printf("%d %d \n",u.a,u.b);

} /*

Ans : The latest value assigned to any of the union member will be present in the union members so answer is 20 20

69.

main()

{

float i, j;

scanf("%f %f", &i, &j);

printf("%.2f %.3f", i, j);

}

Ans:- 123.34 3. 234

70. What is the out put of the following problem ?

*/

main()

{ char *

str =

"

12345";

printf("%c %c %c\n", *str, *(str++), *(str++));

} /*

Ans: 3 2 1

71. Write a macro statement to find maximum of a,b

#define max(a,b) (ab)?a:b

main()

{ int a,b;

a=3;

b=4;

printf("%d",max(a,b));

}

output : 4

72. What is the output of the following coding

*/

main()

{ int len=4;

char *st="12345678";

st = st -len;

printf("%c\n",*st);

} /*

Ans :It will print some junk value

73.

main()

{

func(1);

}

func(int i){

static char *str ={ "One","Two","Three","Four"};

printf("%s\n",str[i++]);

return;

}

Ans:- Two

74.

#include

main()

{ int i;

for (i=1;i<100; i++)

printf("%d %0x\n",i,i);

}

Ans:- I is from 1 to 99 for the first format, for the second format 1to9, ato f, 10 to 19,1ato1f, 20 to 29, etc

75 . In the following code please write the syntax for assing a value of 10 to field x of s and id_no 101 of s

struct {

int x;

int y;

union {

int id_no;

char *name;

}b;

}s,*st;

main()

{s

t = &s;

st-x=10;

st-b.id_no = 101;

printf("%d %d\n",s..x,s.b.id_no);

}

Ad Blocker Detected

We have noticed that you have an ad blocker enabled which restricts ads served on the site.
Please disable it to continue using Downloadmela.

Mahindra Satyam1. Which of the following statement(s) is(are) not true

a. Literate workers have small families than illiterate workers.

b. Families with 2 or less than 2 children are commoner than families

with 3 or more children.

c. 2 children families constitute 60% of the families of workers.

d. More the no. of children a worker has the more illiterate he is.

e. None the above statement is true.

Ans: e2. In simple interest what sum amounts of Rs.1120/- in 4 years and Rs.1200/- in 5 years.

Ans: Rs.800/-3. Sum of money at compound interest amounts of thrice itself in 3 years. In how many years will it take 9 times itself.

Ans: 64. Two trains in the same direction at 50 & 32 kmph respectively. A man in the slower train observes the 15 seconds elapse before the faster train completely passes him. What is the length of faster train ?

Ans: 75m5. x% of y is y% of ?

Ans: x6. A man spending half of his salary for house hold expenses, 1/4th for rent, 1/5th for travel expenses, a man deposits the rest in a bank. If his monthly deposits in the bank amount 50. What is his monthly salary ?

Ans: 10007. The population of a city increases @ 4% p.a. That is an additioanl annual increase of 4% of the population due to this influx of job seekers, the % increase in population after 2 years is

8. The ratio of no. of boys & girls in a school is 3:2 Out of these ?% the boys & 25% of girls are scholarship holders. % of students who are not scholarship holders.?

9. 15 Men take 21 days of 8 hrs. each to do a piece of work. How many days of 6 hrs. each would do if 21 women take. If 3 women do as much work of 2 men.

Ans: 3010. a cylinder ingot 6cms in diameter and 6 cms in height is and spheres all of the same size are made from the material obtained.what is the diameter of each sphere?

Ans:3cms11. rectangular plank of sqrt(2)meters wide can be placed so that it is on either side of the diagonal of a square shown below.what is the area of the plank?

Ans:7sqrt(2)12. the difference b/w the compound interest payble half yearly and the simple interest on a certain sum cont out at 10% p.a for 1 year is Rs 25 what is the sum

Ans:10,00013. what is the smallest n0 by which 2880 must be divided in order to make it a perfect square ?

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

Ans: c14.a father is 30 times more than his son however he will be only thrice as old as the son what is father,s present age ?

Ans: 4015. If a boat is moving in upstream with velocity of 14 km/hr and goes downstream with a velocity of 40 km/hr, then what is the speed of the stream ?

(a) 13 km/hr

(b) 26 km/hr

(c) 34 km/hr

(d) none of these

Ans: A16 . Find the value of ( 0.75 * 0.75 * 0.75 - 0.001 ) / ( 0.75 * 0.75 - 0.075 + 0.01)

(a) 0.845

(b) 1.908

(c) 2.312

(d) 0.001

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

(a) 3 days

(b) 8/9 days

(c) 4 days

(d) can,t say

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

(a) 210 kms

(b) 30 kms

(c) 20 kms

(c) none of these

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

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

(a) 6

(b) 8

(c) 7

(d) data insufficient

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

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

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

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

(a) 40%

(b) 55%

(c) 35%

(d) 30%

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

(a) 110 men

(b) 130 men

(c) 100 men

(d) none of these

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

(a) Rs. 500

(b) Rs. 600

(c) Rs. 800

(d) Rs. 900

Ans: C27. If a sum of money compound annually amounts of thrice itself in 3 years. In how many years will it become 9 times itself.

(a) 6

(b) 8

(c) 10

(d) 12

Ans A28. Two trains move in the same direction at 50 kmph and 32 kmph respectively. A man in the slower train observes the 15 seconds elapse before the faster train completely passes by him. What is the length of faster train ?

(a) 100m

(b) 75m

(c) 120m

(d) 50m

Ans B29. How many mashes are there in 1 squrare meter of wire gauge if each mesh

is 8mm long and 5mm wide ?

(a) 2500

(b) 25000

(c) 250

(d) 250000

Ans B30. x% of y is y% of ?

(a) x/y

(b) 2y

(c) x

(d) can,t be determined

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

(a) 15%

(b) 16.66%

(c) 12%

(d) 9%

Ans B32. A man spends half of his salary on household expenses, 1/4th for rent, 1/5th for travel expenses, the man deposits the rest in a bank. If his monthly deposits in the bank amount 50, what is his monthly salary ?

(a) Rs.500

(b) Rs.1500

(c) Rs.1000

(d) Rs. 900

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

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

35. 15 men take 21 days of 8 hrs. each to do a piece of work. How many days of 6 hrs. each would it take for 21 women if 3 women do as much work as 2 men?

(a) 30

(b) 20

(c) 19

(d) 29

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

(a) 5 cms

(b) 2 cms

(c) 3 cms

(d) 4 cms

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

Ans :7*(2)1/238. The difference b/w the compound interest payble half yearly and the simple interest on a certain sum lent out at 10% p.a for 1 year is Rs 25. What is the sum?

(a) Rs. 15000

(b) Rs. 12000

(c) Rs. 10000

(d) none of these

Ans C39. What is the smallest number by which 2880 must be divided in order to make it into a perfect square ?

(a) 3

(b) 4

(c) 5

(d) 6

Ans: C40. A father is 30 years older than his son however he will be only thrice as old as the son after 5 years what is father,s present age ?

(a) 40 yrs

(b) 30 yrs

(c) 50 yrs

(d) none of these

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

42. If an item costs Rs.3 in ,99 and Rs.203 in ,00.What is the % increase in price?

(a) 200/3 %

(b) 200/6 %

(c) 100%

(d) none of these

Ans: ADirections: For questions 43-52 fill the missing number or letter in the given series43. a, c, e, g, _

(a) h

(b) i

(c) d

(d) j

Ans: B44. a, e, i, m, q, u, _, _

(a) y,c

(b) b,f

(c) g,i

(d) none

Ans: A45. ay , bz , cw , dx ,__

(a) gu

(b) ev

(c) fv

(d) eu

Ans: D46. 1, 2, 3, 5, 7, 11, __

(a) 15

(b) 9

(c) 13

(d) 12

Ans: C47. kp , lo , mn , __

(a) nm

(b) np

(c) op

(d) pq

Ans: A48. R,M,__,F,D,__

(a) I, C

(b) A, Q

(c) L, N

(d) B, Q

Ans: A49. ___, ayw, gec, mki, sqo

(a) awx

(b) usq

(c) prs

(d) lmn

Ans: B50. 1, 3, 4, 8, 15, 27, __

(a) 60

(b) 59

(c) 43

(d) 50

Ans D51. 0, 2, 3, 5, 8, 10, 15, 17, 24, 26,__

(a) 45

(b) 55

(c) 35

(d) 48

Ans: C52. 2, 5, 9, 19, 37,__

(a) 64

(b) 55

(c) 75

(d) 40

Ans CDirections for questions 53 to 58: Select the alternative that logically follows form the two given statements.53. All scientists are fools. All fools are literates.

(a)All literates are scientists

(b) All scientists are literates

(c) No scientists are literates

(d) Both (a) and (b) are correct

Ans: B54. No apple is an orange. All bananas are oranges.

(a) All apples are oranges

(b) Some apples are oranges

(c) No apple is a banana

(d) None of the above

Ans: A55. All pens are elephants. Some elephants are cats.

(a) Some pens are cats

(b) No pens are cats

(c) All pens are cats

(d) None of the above

Ans: D56. All shares are debentures.No debentures are deposits.

(a) All shares are deposits

(b) Some shares are deposits

(c) No shares are deposits

(d) None of the above

Ans: C57. Many fathers are brothers. All brothers are priests.

(a) No father is a priest

(b) Many fathers are not priests

(c) Many fathers are priests

(d) Both (b) and (c)

Ans: B58. Some green are blue. No blue are white.

(a) No green are white

(b) Some green are white

(c) No green are white

(d) None of the above

Ans: B59. If the word "CODING" is represented as DPEJOH , then the word "CURFEW" can be represented?

(a) dvsgfx

(b) dvshfx

(c) dgshfx

(d) dtsgfy

Ans: A60. If in a certain code "RANGE" is coded as 12345 and "RANDOM" is coded as 123678, then the code for the word "MANGO" would be

(a) 82357

(b) 84563

(c) 82346

(d) 82543

Ans: DDirections for questions 61-63:In a class of 150 students 55 speak English;85 speak Telugu and 30 speak neither English nor Telugu

61. How many speak both English and Telugu?

(a) 10

(b) 15

(c) 20

(d) 12

Ans: C62.How many speak only Telugu?

(a) 55

(b) 45

(c) 65

(d) none of the above

Ans:C63.How many speak at least one of the two languages?

(a) 120

(b) 100

(c) 250

(d) 50

Ans: A64. What is wrong in the following problem

main() {

int i,j;

j = 10;

i = j++ - j++;

printf("%d %d", i,j);

}

ans: 0, 1265 . What is the output of the following problem

main() {

int j;

for(j=0;j<3;j++)

foo();

}

foo() {

static int i = 10;

i+=10;

printf("%d\n",i);

}

/* Out put is (***since static int is used i value is retained between

* 20 function calls )

* 30

* 40

*/

66. What is wrong in the following code

main()

{ char *

c;

c = "Hello";

printf("%s\n", c);

}

ans:- Hello, The code is successfully running

67 . What is the final value of i and how many times loop is

Executed ?

*/

main()

{ int i,j,k,l,lc=0;

/* the input is given as 1234 567 */

printf("Enter the number string:<1234 567 \n");

scanf("%2d%d%1d",&i,&j,&k);

for(;k;k--,i++)

for(l=0;l

printf("%d %d\n",i,l);}

printf("LOOPS= %d\n", lc-1);

} /*

Ans: I 16, and loop is executed for 169 times

68. What is the output of the following program

*/

main() {

union {

int a;

int b;

int c;

} u,v;

u.a = 10;

u.b = 20;

printf("%d %d \n",u.a,u.b);

} /*

Ans : The latest value assigned to any of the union member will be present in the union members so answer is 20 2069.

main()

{

float i, j;

scanf("%f %f", &i, &j);

printf("%.2f %.3f", i, j);

}

Ans:- 123.34 3. 23470. What is the out put of the following problem ?

*/

main()

{ char *

str =

"

12345";

printf("%c %c %c\n", *str, *(str++), *(str++));

} /*

Ans: 3 2 171. Write a macro statement to find maximum of a,b

#define max(a,b) (ab)?a:b

main()

{ int a,b;

a=3;

b=4;

printf("%d",max(a,b));

}

output : 4

72. What is the output of the following coding

*/

main()

{ int len=4;

char *st="12345678";

st = st -len;

printf("%c\n",*st);

} /*

Ans :It will print some junk value73.

main()

{

func(1);

}

func(int i){

static char *str ={ "One","Two","Three","Four"};

printf("%s\n",str[i++]);

return;

}

Ans:- Two74.

#include

main()

{ int i;

for (i=1;i<100; i++)

printf("%d %0x\n",i,i);

}

Ans:- I is from 1 to 99 for the first format, for the second format 1to9, ato f, 10 to 19,1ato1f, 20 to 29, etc

75 . In the following code please write the syntax for assing a value of 10 to field x of s and id_no 101 of s

struct {

int x;

int y;

union {

int id_no;

char *name;

}b;

}s,*st;

main()

{s

t = &s;

st-x=10;

st-b.id_no = 101;

printf("%d %d\n",s..x,s.b.id_no);

}