You are on page 1of 50
913923, 145 PM Placement Capgemini 01 @ Hiitbullseye Placement Capgemini 01 Section : Cognitive Ability Games DIRECTIONS for the question: Solve the following question and mark the most appropriate option, Question No. :1 ‘Which option will replace the question mark? opines as NR pare ep ante fo Option D is eliminated, because & part ie. left part does not fit and pattern doentt follow. Thus, option B is the answer. DIRECTIONS for the question: Solve the following question and mark the most appropriate option, Question No. :2 ‘An envelope made of a single piece of paper is taken, and a few cuts are made on it The envelope and the cuts are shown below. Kdently the resulting figure when the envelope is unfolded? about blank 1150 913923, 145 PM Placement Capgemini Ot Placement Capgemini 01 3) a D) Explanation:- Going by options, only option B satisfies the mirror type image so formed on opening the envelope after cutting. DIRECTIONS for the question: Solve the following question and mark the most appropriate option. Question No.3 Shown in the four figures A, 8, C, and D on the right, are broken lines drawn on a transparent sheet, Fach figure is folded over along the dotted lines as shown. Identity the correct option that will generate the motif shown on the left. “ j Oo _ 4. b 2) 3 > RRS KS . about blank 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 Going by options, part is common in all options except option 4, hence itis eliminated because the line is required to form petal when we fold the paper yt A Option 2 also gets eliminated, since on right side part is common except in option 2 which is necessary to form diagonal of a petal shape. Option 3 also gets eliminated because the middle partie. is necesary to form curve of a petal Hence, Option A is the answer DIRECTIONS for the question: Solve the following question and mark the most appropriate option. Question No. :4 The figure below shows the top view, the front view, and the side view of a three-dimensional solid object. What is the minimum number of surfaces that a solid with these views, can have? Assume that there are no hidden lines. KLA KA Ay12 B14 G16 0)30 Explanatio Below image shows the 3D view and the corresponding front and top view. The solid is nothing but a dice. No. 1 denotes the curved surface in 3D view. The same surface will be visible in both the front, top and left side views. So, surface 1 shouldn't be counted thrice, but only once. about blank 2150 913923, 145 PM Placement Capgemini Ot hitbullseye Placement Capgemini 01 Left side view 1 1 Front view 2 2 ee. Following this logic, No. of surfaces in the top view = 5 No. of surfaces in the bottom view = 5 No. of surfaces in the front view = 1 No. of surfaces in the left side view = 1 'No. of surfaces in the back view = 1 No. of surfaces inthe right side vie Total = $45+1+1+1+1 = 14 DIRECTIONS for the question: Solve the following question and mark the most appropriate option Question No. :5 about blank 4180 913923, 145 PM Placement Capgemini Ot oe hitbullseye = Placement Capgemini 01 ‘Which option correctly represents the top view for the given perspective view? Perspective View A) 8) | 9 | D) Explanation:- There is a grey big piece and the pink piece is intersecting it through the centre, also the pink piece which is behind seems to be bigger as compared to the piece of front sid. The image shows the grey piece overlapping the pink and this eliminates option 8. Option A eliminates as pink piece is of same size from both sides. Option C eliminates as front side isnot bigger as shown. Hence D is the correct answer. DIRECTIONS for the question: Solve the following question and mark the most appropriate option, Question No. :6 Shown below is an image with straight lines, in which, a tilted-square has been cut out. From the given options identify the missing cut out of the square that completes the original image. "FH "LY “BS "Ad If we complete the figure like this, about blank 5150 913923, 145 PM Placement Capgemini Ot Placement Capgemini 01 Also, there is point of intersection on one side of the thick line and two intersections on the other side of thick line. So, for option A on flipping it, satisfies and hence itis the answer. DIRECTIONS for the question: Solve the following question and mark the most appropriate option, Question No. :7 A T-shirt with folding marks and the folding sequence is shown on the left. The folding is done backwards and perfectly along the lines. After completing all the folds, the T-shitt is then turned around. Identify the correct folded T-shitt from the options on the right. A) 8) 9 D fy ) Ke~d SN MW I Going by options, a Central part should be rotated. So, option A and D gets eliminated. Option B also gets eliminated because of thickness of the pattern. Hence, option C is the answer DIRECTIONS for the question: Solve the following question and mark the most appropriate option, Question No. :8 about blank 6150 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 How should the two solids be joined in order to form a tetrahedron? A)ciag.be — B)afbg.ci Ceci bf D) cj. ae,dh Explanation:- A tetrahedron is basically a four sided triangular suface like Completing fig. 2, by rotating fig.1 and placing on the fig.2, we get option B as answer. or Tetrahedron is formed by four equal triangles, including the triangle on the base. In the given figure, ich forms the base triangle. Nowy three more triangular faces are remaining. The two longer sideas are if ig and the corresponding longer sides on the cut part are ac, be. So, the possible combinations are ci af bg or ci df ag ci bf dg DIRECTIONS for the question: Solve the following question and mark the most appropriate option. Question No. :9 Perspective view of an object is shown below. The objects rotated 180 degrees around y-axis (when viewed from a point on the positive y- axis towards the origin) and then similarly rotated 180 degrees around z-axis. Which ofthe following perspective view options will be the result of the rotations? Assume positive x and y axes point in the direction ofthe viewer. about blank 7180 913923, 145 PM Placement Capgemini Ot hitbullseye — Placement Capgemini 01 a J 8) ° D) We can solve this by taking a U-shaped as base ie. This is firstly rotating by 180 degree, then it changes its postion and on again rotating along z-axis, this U-shaped again flip over but remains the base. So, oly option A satisfies DIRECTIONS for the question: Solve the following question and mark the most appropriate option. Question No. : 10 ‘A cube and a truncated cone are shown below. The cube has dimensions 10 x 10 x 10 units, The truncated cone has a base diameter of 12 Units, height of 17 units and top diameter of 6 units. Imagine these two solids are intersecting while positioned coaxially on the same base. Further imagine the cube vanishes completely along with the intersected portion of the truncated cone. What remains? r \ a DH OD about blank iso 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 Explanation:- Since, the edge of cube is 10 and the height of cone is 11 units, so cone is slightly longer than cube. Also, Base diameter is 12 units and edge of cube is 10 units. So, there is some portion which is away from the edge of cube. So, Option B gets eliminated, Also, for height of cone there isa single circle shown above, however there may be some thickness above when placed coaxially So, option D gets cancelled. Similarly, C the thickness in the top part is more and is eliminated, So, option A is the answer. x DIRECTIONS for the question: Solve the following question and mark the best possible option. Question No. :11 Which of the following will nat be a number of the series 1, 8, 27, 64, 125, ..2 A)256 8) 729 C512) 1000 Explanatio The given series is the cubes of natural number 256 is not a cube of a natural number in the given series Hence option A isthe answer: DIRECTIONS for the question: Solve the following question and mark the best possible option. Question No. : 12 Two series are given below 2,3,5,7,11 101, 97, 89, 83, The least common number of the two series is A)2 B)101 C11 0)53 Explanatior Here, both the series are the series of prime numbers. Also, In the second series, prime numbers are written in the reverse order. Hence, the least number common to both is 2: Hence Ist option is the answer. about blank 9150 913923, 145 PM Placement Capgemini 1 (iptitiniisoyq.eniPlacement-Gapgemini'Ot the correct values to get the desired answers. Question No. : 13, B+O -Oxe-o0 47.9.3 B)893 87,2 0983 Explanation:- It can be solved by using options By using option B we get 13+8-9x2=3 Option 8 DIRECTION for the question: Which ofthe following options have the correct values to get the desired answers Question No. : 14 Ox“-2-O-0 A234 B23 432 D213 Explanation:- It can be solved by using options By using option A we get 2x 14-7243=4 Option A DIRECTION for the question: Which of the following options have the correct values to get the desired answers. Question No. : 15 xO +O +4-00-G=10 A)29,3 B)7.64 03,87 D)7,4,7 Explanation: It can be solved by using options By using option C we get 253 +8+4-60-7= 10 Option C DIRECTIONS for the questi 1: Solve the following question and mark the best possible option, Question No. : 16 Three views of a cube following a particular motion are given bellow: GB G8 What is the letter opposite to A? about blank 10150 913923, 145 PM Placement Capgemini 1 eo bullseye — Placement Capgemini 01 AH 8)P OB DM Explanation:- from figure |, Mand K cannot be opposite to H, from figure I, P and 8 cannot be opposite to H, Hence opposite to H is A. DIRECTIONS for the question: Solve the following question and mark the best possible option. Question No. : 17 From the given blocks when 10 is at the bottom, which number will be at the top ? AB B12 Q6 DA Explanation:- 2, 4 and 6 cannot be opposite to 10. Also from figure 2, we can say that 6 is opposite to 2. And 4 is opposite to 8. Hence opposite of 10 has to be 12. DIRECTIONS for the question: Solve the following grid based question such that one element can only occur once, in any row or any column and find the value of "2" Question No. : 18 « ly |p [o p io ly |« @ z a“ Y y |« |o |B AY BB Qa DO Explanation: As one element can occur once in any row or any column so B will replace ?. Option B DIRECTIONS for the question: jolve the question and mark the best possible answer Question No. : 19 Start at one of the corner letters and spital clockwise round the perimeter, finishing at the center letter to spell out a nine-letter word. Identify the missing letters in Row 1 and Row 2 to make a meaningful word. a E R E = o P a about blank 180 913923, 145 PM Placement Capgemini 1 eo bullseye — Placement Capgemini 01 AT BLT OTV BTL Explanation: The word can start with an A or E Substitute from the answer choices. The correct word is EVAPORATE. Tis inthe 1* row and V is in the 24 DIRECTIONS for the question: Solve the following question and mark the most appropriate option, Question No. : 20 Find the number of triangles in the given figure. A)S B)6 Q9 oj 10 Explanation: 4 Xt Tox Lo" The triangles present are 2ABJ, AEH, 2ADG, ACBD, ACIG, ACF, AEDF, AEBI, AGFH, Al/H. There are a total of 10 triangles present in the figure. DIRECTIONS for the question: Read the information given below and answer the question that follows. Question No. : 21 Seven teachers at a B-school ~ Anand, Lalit, Prashant, Rajanikant, Shridhar, Vishal, Yogesh ~ have enrolled in a Faculty Development Programme on Teaching Case Studies. At the end of the programme, the teachers must analyse and discuss a case before the trainers and the directors of their institute, Each teacher must discuss a case in exactly one field ~ Financial Management, Operations Management or Marketing Management. Lalit discussed a case on Marketing Management. ‘Anand and Rajanikant discussed cases in the same field of management. Yogesh discussed a case on either Financial Management or Operations Management, Shridhar and Yogesh discussed cases in different fields of management. ‘Anand and Vishal discussed cases in different fields of management, Half as many teachers discussed cases on Financial Management as discussed cases on Marketing Management. Which of the following group of teachers cannot have discussed cases in the same field of management? A) Anand, Lalit, Rajanikant 8) Lalit, Prashant, Vishal) Lalit, Vishal, Yogesh) Prashant, Rajanikant, Anand Explanation:- about blank 12150 913923, 145 PM Placement Capgemini 1 eo bullseye — Placement Capgemini 01 From the given information, we know that Lalit discussed a case on Marketing Management and Yogesh discussed a case on either Financial Management or Operations Management. Since Lalit and Yogesh have discussed cases in different fields of management, the answer is option 3 DIRECTIONS for the question: Read the information given below and answer the question that follows. Question No. : 22 Seven teachers at a B-school ~ Anand, Lalit, Prashant, Rajanikant, Shridhar, Vishal, Yogesh ~ have enrolled in a Faculty Development Programme on Teaching Case Studies. At the end of the programme, the teachers must analyse and discuss a case before the trainers and the directors of their institute, Each teacher must discuss a case in exactly one field ~ Financial Management, Operations Management or Marketing Management. Lalit discussed a case on Marketing Management. ‘Anand and Rajanikant discussed cases in the same field of management. Yogesh discussed a case on either Financial Management or Operations Management. Shridhar and Yogesh discussed cases in different fields of management. © Anand and Vishal discussed cases in different fields of management. ‘© Half as many teachers discussed cases on Financial Management as discussed cases on Marketing Management. Which of the following cannot be true? A) Only Prashant discussed a case on Financial Management 8) Rajanikant discussed a case on Operations Management © Shridhar discussed a case on Operations Management) Vishal discussed a case on Financial Management Explanation: In option 1, suppose Prashant is the only teacher discussing a case on Financial Management. Yogesh must then discuss a case on Operations Management. Since Lalit is discussing a case on Marketing Management, there should be one other teacher discussing @.case in the same field. So, Anand and Rajanikant must discuss a case on Operations Management. Now, Shridhar and Vishal cannot discuss a case on Operations Management or Financial Management and must therefore discuss cases on Marketing ‘Management. in this case, there would be three teachers discussing cases on Marketing Management, which is not twice as much 15 the number of teachers discussing cases on Financial Management. Hence option 1. DIRECTIONS for the question: Read the information given below and answer the question that follows. Question No. : 23 Seven teachers at a B-school ~ Anand, Lalit, Prashant, Rajanikant, Shridhar, Vishal, Yogesh ~ have enrolled in a Faculty Development Programme on Teaching Case Studies. At the end of the programme, the teachers must analyse and discuss a case before the trainers and the directors of their institute, Each teacher must discuss a case in exactly one field ~ Financial Management, Operations Management or Marketing Management. ‘© Lalit discussed a case on Marketing Management. ‘Anand and Rajanikant discussed cases in the same field of management. Yogesh discussed a case on either Financial Management or Operations Management, Shridhar and Yogesh discussed cases in different fields of management. ‘Anand and Vishal discussed cases in different fields of management, Half as many teachers discussed cases on Financial Management as discussed cases on Marketing Management. Which of the following is true? ‘A) Rajanikant and Yogesh each discussed cases on Financial Management while Vishal discussed a case on Operations Management about blank 13150 913923, 145 PM Placement Capgemini 1 eo bullseye — Placement Capgemini 01 8) Prashant, Shridhar and Vishal discussed cases on Financial Management, Operations Management and Marketing Management respectively Vishal, Rajanikant and Shridhar discussed cases on Financial Management, Marketing Management and Operations Management respectively 0) Lalit discussed a case on Operations Management while Prashant and Vishal each discussed cases on Marketing Management Explanation: In option 1, if Rajanikant and Yogesh discuss cases on Financial Management, then Anand also discusses a case on Financial Management. In this case, there should be six teachers discussing cases on Marketing Management. This is not possible. So, option Tis fats. In option 2, if Vishal discusses a case on Marketing Management, the other teacher discussing a case on Marketing Management is Lalit. Since Shridhar discusses a case on Operations Management, Yogesh must discuss a case on Financial Management. Since Prashant and Yogesh discuss cases on Financial Management, there should be four teachers discussing cases on Marketing ‘Management, Since Anand and Vishal discuss cases in different fields, this would not be possible. So option 2 is false. Option 4 is obviously false as the original information clearly states that Lalit discusses a case on Marketing management. DIRECTIONS for the question: Read the information given below and answer the question that follows. Question No. : 24 Seven teachers at a B-school ~ Anand, Lalit, Prashant, Rajanikant, Shridhar, Vishal, Yogesh - have envolled in a Faculty Development Programme on Teaching Case Studies. At the end of the programme, the teachers must analyse and discuss a case before the trainers and the directors of their institute. Each teacher must discuss a case in exactly one field ~ Financial Management, Operations Management or Marketing Management. «Lalit discussed a case on Marketing Management, ‘© Anand and Rajanikant discussed cases in the same field of management. ‘= Yogesh discussed a case on either Financial Management or Operations Management, ‘© Shridhar and Yogesh discussed cases in different fields of management. © Anand and Vishal discussed cases in different fields of management. ‘© Half as many teachers discussed cases on Financial Management as discussed cases on Marketing Management. I exactly one teacher discussed a case on Operations Management, which of the following must be true? AA) Prashant discussed a case on Financial Management 8) Rajanikant discussed a case on Marketing Management ©) Vishal discussed a case on Operations Management _D) None of these Explanation: Ifexactly one teacher discussed o case on Operations Management, then 2 teachers must discuss cases on Financial Management and four teachers must discuss cases on Marketing Management. if Anand and rajnikant discuss on Finacial Management, Yogesh con Operational Management and Lalit, Vishal Shridhar and Prashant on Marketing management, then none of the options ore true. Section : PseudoCode DIRECTIONS for the question: Mark the best option: Question No. : 25 For the following C program about blank also 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 define AREAW)G. 14%) maind) float 11=6.25,2=2.5,a; a=AREA(C1); printf("\n Area of the circle is %6f", a); a=AREA(2); printf("\n Area of the circle is %6f*, a); ) What is the output? A) area of the circle is 122.656250, area of the circle is 19625000 _B) 122.656250, 19.625000 ©) area of the circle is 122.7, area of the circle is 19.6 D) 122.7, 19.6 Explanatior DIRECTIONS for the questi 1: Mark the best option’ Question No. : 26 What is the output of the following program? include using namespace std; class base ‘ int valt, val2; publi: int goto ‘ vvall = 100; val2 = 300; ) fiend float mean (base ob); » float mean (base ob) ‘ return float (ob.valt + ob.val2) / 2; > int main 0 ‘ base obj: obj.get 0; cout << mean (obj; return 0; ) A)300 8) 150 c) 100) 200, Explanation: DIRECTIONS for the question: Mark the best option: Question No. : 27 Follow the code snippet and chose the correct statement(s) about blank 15150 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 int x void £20 ‘ int x= 15 // linet x=2 f line? x iiine 3 ) AA) The statement in line 1 throws a compilation error 8) In line 2, x=2 is assigned to the global x ) Inline 3, x=2 is assigned to the global x and line 2 throws compilation error) Both A and 8 Explanatior DIRECTIONS for the question: Mark the best option: Question No. : 28 What will be the output of the following C program? void count(int n) { static int printf("%d ", n); printed % ats; if(n > 1) countin-1); printf(%d *, d; y int maing € count(3); ) A)312213444 B)312111222 03122134 Explanation: DIRECTIONS for the question: Mark the best option: Question No. : 29 The value printed by the following program is void flint®p, int m) ‘ m=m+5; “p= tp +m; return; ) void maing ‘ intiz5, j=10, 18; print (96d! 4); ) about blank by3121112 16150 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 A)10 8)20 30 9/40 Explanation:- For, address is passed. For, value is passed. So in function fp will contain address of t and m will contain value 10. Ist statement off will change m to 15. Then 15 wil be added to value at address p. It will make i = 5+15 = 20.j will remain 10. print statement will print 20+10 = 30, DIRECTIONS for the question: Mark the best option: Question No. : 30 What will be the content of ‘file.’ after executing the following program? #include int maing. ‘ E “pt, “Mp2; fp1=fopent’ fp2=fopent(filec’, ~w"); fpute'A fp1); fpute('B, fp2); fclose(fp1); fclose(fp2); return 0; oes D) Error in opening file flet.c DIRECTIONS for the quest Mark the best option: Question No. : 31 The following C function takes two ASCII strings and determines whether one is an anagram of the other. An anagram of a string ss a string obtained by permuting the letters in int anagram (char *a, char *b) { int count (128, j for ( = 0; j < 128;j++) count(] = 0; i=o; while (ff 88 UD ( & 8; ) for ( = 0;j < 128;j+#) if (count jl) return 0; return 1; ) Choose the correct alternative for statements A and B AJA: count [afi]++ and B: count{b{]]- 8) A: count (afj]]++ and B : count{b[]]++ ©) A: count [afj++]}++ and B: count{bGj]]-_) A: count [af}++and B : count{bfj++]- Explanatior Increments the Count by 1 at each index that is equal to the ASCII value of the alphabet itis pointing at B: Decrements the count by 1 at each index that is equal to the ASCII value of the alphabet itis pointing at. Also it increments the about blank ‘Ti80 913923, 145 PM Placement Capgemini 1 eo bullseye — Placement Capgemini 01 loop counter for next iteration. {fone string is permutation of other there would have been equal increments and decrements at each index of array and So count should contain zero at each indexthat is what the loop checks at last and if any non-zero elements is found, it returns 0 indicating that strings are not anagram to each other. DIRECTIONS for the question: Mark the best option: Question No. : 32 Follow the code snippet and chose the correct statement(s) int 3; void fund) ‘ int a=1; // statement 1 Uf statement 2 Ui statement 3 A) The statement 1 throws a compilation efror _B) In statement 2, a=2 is assigned to the global a ) In statement 3, a=2 is assigned to the global a and line 2 throws compilation error D) Both A and B Explanation:: DIRECTIONS for the question: Mark the best option: Question No. : 33 {(char *p) ‘ IO}? fle prt; print ("6c",*p); ) if the above function is call with f(Aabcd) what is the output? A)aABCD —B) debaA C) Abd _D) Compilation Error Explanation: DIRECTIONS for the question: Mark the best option: Question No. : 34 Predict the output of char *concat (char *s1,char *52) ‘ int it = strlen(st),i2 = strlen(s2),j char s{256); strepy(s.s2); for (i=i1,j=0;j < i j++, i++) slil = s2U); about blank 18150 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 sl= 0; return 5; ) main() ‘ puts(concat("NEWDELH, “KOLKATA’); ) A) KOLKATA 8) NEW DELHI KOLKATA) KOLKATA NEW DELHI Explanatior DIRECTIONS for the question: Mark the best option Question No. : 35 What will be output of following program? include sia > include string int main int register a scanf('%a 8) printf'%aa); return 0; ) Iiita=25 A)25. B)Address C)0 —_D) Compliation error Explanatior DIRECTIONS for the question: Mark the best option: Question No. : 36 What is the output of this program? include Using namespace std int main () ‘ int y; 3; cout << hex < int maing. return 0; ) Aya 8) 0000000) 97.000000_D) runtime error Explanation:- DIRECTIONS for the question: Mark the best option: Question No. : 44 # include main () ‘ char ch = ‘A’ while (ch about blank 22150 913923, 145 PM e hitbullseye Placement Capgemini 1 Placement Capgemini 01 switch(ch) ( case 'A’; case 'B’ case 'C'; case 'D’ ch+ +; continue; case’: case F's ch+ +; ) putchar(ch}; ) What will be the output of the above program? A) ABCDEF will be displayed 8) FG will be displayed Explanatior DIRECTIONS for the quest Mark the best option Question No. : 45 about blank ©)EFG will be displayed 0) EF will be displayed 23150 913923, 145 PM Placement Capgemini Ot oe hitbullseye — Placement Capgemini 01 * Finclude using namespace std; lass p { protected: intwicth, height; public: Void set values (int int b) { width ~ a; height ~ b; ) Virtual int area (void = 0 1 class r: public p { public: int area (void) { return (wicth * height); ) ij lass t: public p { public int area (void) { retum (width * height /2); 1 i int main () { rect; tig: 1 ppoly! = arect; ™ ppoly2 - atrgl ppoly1->set values (4, 5); ppoly2->set values (4, 5) cout areal) : cout << ppoly2 > area(); totum 0; } A) 1020 8)20 10 0) 2010 DIRECTIONS for the question: Mark the best option: Question No. : 46 about blank 2450 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 “include using namespace std int main) { int age = 0; tyt if (age <0) { throw "Positive Number Reauired’ } cout << ago; } catch{const char “Messag=) { cout << "Error: << Message: } return O; ) A)O B) ErrorPositive Number Required C) compile time error _D) None of the mentioned Explanatior 0 DIRECTIONS for the question: Mark the best option: Question No. : 47 What will be the output of following program ? includecsteio n> intmain) c rint960 RPE Kay return 0: ) )3,0,0,0 8) 0, 3, 0.000000, 2.000000 ¢) 0,0,0,0 D) Error) None of the above Explanatior DIRECTIONS for the question: Mark the best option Question No. : 48 Consider the following program fragment about blank ) All of the above 25150 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 fonidigit = O3agit <9; aig +) C igi = agn 2, igh + A)Infinite B)9 C)4 D)O_£) None of the above Explanation:- DIRECTIONS for the question: Mark the best option: Question No. : 49 Point out the error, if any in the for loop. ‘indudecstdio.h> intmaing ‘ intiet; font) { antec +), imo-10) break: } return ) AA) There should be a condition in the for loop 8) The two semicolons should be dropped. ©) The for loop should be replaced with while loop D) Noerror_£} All ofthe above Explanatior DIRECTIONS for the question: Mark the best option Question No. : 50 kyle is working on a loop that will execute several lines of code multiple times within a program, Each time the code executes the program should prompt the user to enter in a test grade, He is debating between the following two program statement setups A. for(int index = 0; grade < index: indext+) ‘System out print Please enter another grade) crade= keyboard readDouble(); B. for (int index= 0; grade < index; index++) 4 ‘System out pant ‘Please enter another grade), ‘grade keyboard read Doubled, ) about blank 26150 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 Which statement below best outlines the choice (A or B) Kyle should make concerning his code. AA) The code within section A or 8 would allow the person to enter the grade multiple times 8) The code within section A would be the best selection because the () brackets indicate a decision must be made within a program, ©) The for loop is structured incorrectly in both A and B meaning Kyle should rewrite the code statement. DyThe code within section B is the best selection because the () brackets allow both lines of code to be executed each time the loop occurs. ) None of the above Explanatior DIRECTIONS for the question: Mark the best option: Question No. :51 What will be output if you will compile and execute the following c code? void main ints 0 char *pr=(enar*) Print) 164 0) Compiler error _£) None of above DIRECTIONS for the question: Mark the best option: Question No. : 52 What will be output if you will compile and execute the following c code? void main imanto; prinli(%4d %d %edaats +a): ) A)I21111 B)121010 117112) 101012) Compiler error Explanation:- DIRECTIONS for the question: Mark the best option: Question No. : 53 What will be the output of following ? about blank 2780 913923, 145 PM Placement Capgemini 1 eo hitbullseye — Placement Capgemini 01 void man) { int suite = stch(suite { case 0: prints momning time") case 1 prints evening te"), } A)Error B) Its morning time _C) Its evening time Explanation:- DIRECTIONS for the question: Mark the best option: Question No. : 54 fnciude

You might also like