10th November 2015 12:06 PM | |
sumit | Re: Tech Mahindra Recent Placement Papers Here I am gving you the placement paper for the Tech Mahindra 1. #include * What is wrong in the following problem main() { int i,j; j = 10; i = j++ - j++; printf("%d %d", i,j); } ans: 0, 12 2.#include * 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 * / 3.#include #include #include /* This is asked in PCS Bombay walk-in-interview * What is wrong in the following code */ main() { char *c; c = "Hello"; printf("%s\n", c); } /*ans:- Hello, The code is successfully running */ 4. #include /* This problem is given in PCS BOMBAY walk-in-interview. * 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 */ 5.#include /* This is given in PCS Bombay walk-in-interview */ /* 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 */ 6.#include main() Tech Mahindra Recent Placement Papers 1) Quantitative Aptitude : 10 Minutes (Total Question 16) 1) There are total 15 people. 7 speaks french and 8 speaks spanish. 3 do not speak any language. Which part of total people speaks both languages. Ans: 1/5 2) A jogger wants to save ¼th of his jogging time. He should increase his speed by how much %age. Ans: 33.33 % 3) a is an integer. Dividing 89 & 125 gives remainders 4 & 6 respectively. Find a ? Ans: 17 4) In a office work is distribute between p persons. If 1/8 members are absent then work increased for each person. Ans : Section 2: Non- Verbal (10 Questoins) 1) Question based on cubes. In which fill the blank box. 2) 120, 315, 300, 345, ? ---- 390 3) 2,1, 4, 3, 6, 6, 8, 10, 10, ?, ? --- 12, 15 4) Questions based on figure rotation 5) Section 3: Analytical Section 1) A Child is saying numbers 1, 2, 3, 4. When he says 1 Another child puts white marble in a box. On saying 2 he puts Blue marble and on saying 3 he puts red marble. When child says 4 other child take out white and blue marble. Child says some no. in a sequence then questions are based on the no. of marbles in the box. Like this 1,1,2,3,1, 4, 1,1,3,2,2,4,111… a) Find the no. of Blue marble in the box …..2 b) Find the no. of White --------do----------- ----2 c) No. of red marbles ------- 7 2) Questions based on logical reasoning (R. S. Agrawal) a) all pens are hens. All hens are doctor. (I) all pens are doctor. (II) all doctors are pen. Ans: Only first conclusion is correct. 4. Flow Chart |
10th November 2015 12:02 PM | |
Unregistered | Tech Mahindra Recent Placement Papers Sir I am preparing for the Tech Mahindra Recent Placement exam so xan you please provide me the placement paper |