Accenture Pseudo c ode Accenture Pseudocode Questions 1 What will be the output of the following pseudocode ? A. 0 B. 5 C. 17 D. 10 Answer: B) 5 Accenture Pseudocode Questions 2 What will be the output of the following pseudocode for a = 0 , b =2 , c=6 ? [Note - If (x) gets executed if the value inside if() , i.e , x is not zero] A. 10 B. 12 C. 23 D. 2 0 Answer: c) 23 Accenture Pseudocode Questions 3 What will be the output of the following pseudocode ? A. 7 B. 2 C. 8 D. 15 Answer: A) 7 Accenture Pseudocode Questions 4 What will be the output of the following pseudocode ? A. 20 B. 4 C. 9 D. 8 Answer: D) 8 Accenture Pseudocode Questions 5 What will be the output of the following pseudocode for a = 0 , b =2 , c=6 ? A. 1 9 B. 15 C. 31 D. 9 Answer: B)15 Accenture Pseudocode Questions 6 What will be the output of the following pseudocode for a = 1 , b =2? A. 1 0 B. 8 C. 12 D. 22 Answer: A Accenture Pseudocode Questions 7 What will be the output of the following pseudocode ? A. Fine B. Nothing will be printed C. Fine Thankyou D. Thankyou Answer: A Accenture Pseudocode Questions 8 What will be the output of the following pseudocode for input a = 30, b = 60, C = 90? Integer a, b, c, sum Read a, b, c Set sum = a + b + c if ((sum EQUALS 180) and (a NOT EQUALS 0) and (b NOT EQUALS 0) and (c NOT EQUALS 0)) Print " Success" Otherwise Print "Fail" End if A. Success B. None of the mentioned options C. Error in the logic of the pseudocode D. Fail Answer: Option A Accenture Pseudocode Questions 9 What will be the output of the following pseudocode for a =1, b =2? Integer funn(Integer a, Integer b ) if(a<3 && b<4) return funn( a +1, b + 1) Else Return a + b End if End function funn() [Note: &&: Logical AND operator - the logical AND operator (&&) returns the Boolean value true (true () if both A. 8 B. 19 C. - 7 D. 7 Answer: Option D Accenture Pseudocode Questions 10 What will be the output of the following pseudocode? Integer a = 50, b = 23, c c = a + b c = c MOD b b = b + c a = a - b Print a, b, c [Note: MOD finds the remainder after the division of one number by another. For example, the 2 leaves a quotient of 2 and a remainder of 1) A. 23 27 4 B. 23 17 3 C. 77 27 4 D. 69 19 4 oio Answer: Option A Accenture Pseudocode Questions 11 What will be the output of the following pseudocode for a = 0 , b =2 C=6 ? A. 26 B. 20 C. 35 D. 23 Answer: D)23 Accenture Pseudocode Questions 12 What will be the output of the following pseudocode for a = 0 , b =2 C=6 ? A. 21 B. 11 C. 12 D. 2 2 Answer: D)22 Accenture Pseudocode Questions 13 What will be the output of the following pseudocode? A. 1 8 B. 22 C. 11 D. 35 Answer: A)18 Accenture Pseudocode Questions 14 What will be the output of the following pseudocode? A. 28 B. 19 C. 15 D. 11 Answer: Accenture Pseudocode Questions 1 5 What will be the output of the following pseudocode? A. 1 5 B. 5 C. 20 D. 10 Answer: A) 15 Accenture Pseudocode Questions 16 What will be the output of the following pseudocode for a = 1 , b = 0 ? A. 6 B. 2 C. 4 D. 0 Answer: Accenture Pseudocode Questions #17 What will be the output of the following pseudocode for a = 9, b = 7? Integer funn(Integer a, Integer b) Integer c Set c = 2 b = b mod c a = a mod c return a + b End function funn() [Note - mod finds the remainder after the division of one number by another. For example, the expression "5 mod 2 leaves a quotient of 2 and a remainder of 1.] A. 17 B. 5 C. 2 D. - 5 Answer: Option C Accenture Pseudocode Questions #18 What will be the output of the following pseudocode? Integer a, b, c Set a = 8, b = 6,c = 4if(a > b) a = b Else b = a End ifif(c> b) c = b Else b = c End if Print a + b + c A. 13 B. 17 C. 14 D. 23 Answer: C)14 Accenture Pseudocode Questions #19 What will be the output of the following pseudocode? Integer a, b, c Set a = 1, b = 1, c = 7 a = a + b if(a + b) if(b + (c ^ a)) a = 2 b = a End if End if Print a + b + c [Note - ^ is the bitwise exclusive OR operator that compares each bit of its first operand to the corresponding bit of other bit is, corresponding result bit i s set to 1. Otherwise, the corresponding result bit is set to 0. If(x) gets executed if the value inside ifo, i.e., x is not zero] A. 11 B. 6 C. 12 D. 22 Answer: A)11 We will come with more questions soon.. Thank You... !