0% found this document useful (0 votes)
109 views7 pages

Accenture Mock Test - 9 21

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views7 pages

Accenture Mock Test - 9 21

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

7/24/24, 8:21 PM Accenture Mock Test - 9

Accenture Mock Test - 9


pankaj114477pankaj@gmail.com Switch accounts

* Indicates required question

PSEUDO CODE

10 QUESTIONS, 10 MINS

Q.1 What will be the output of the following pseudocode? * 1 point

Integer j, m
Set m = 1, j = 1
Integer a[3] = {0, 1, 0}
a[0] = a[0] + a[1]
a[1] = a[1] + a[2]
a[2] = a[2] + a[0]
if(a[0])
a[j] = 5
End if
m = m + a[j]
Print m

A. 3

B. 2

C. 6

D. 4

https://docs.google.com/forms/d/e/1FAIpQLSdPGKyVc17BoxnV0OcgdFZFUpGBRb2DaUFnjjmm2XqaJy1e4Q/formResponse 1/7
7/24/24, 8:21 PM Accenture Mock Test - 9

Q.2 What will be the output of the following pseudocode for k = 150? * 1 point

fun (integer k)
if(k>155)
return
end if
print k
fun(k+2)
print k
End of function fun()

A. 150 152 154

B. 150 152 154 154 152 150

C. 150

D. None of the mentioned

Q.3 What will be the output of the following pseudocode? * 1 point

Integer a, n, b
Set a = 0, n = 0, b
for(each n from 0 to 4)
n=n+1
if(n EQUALS 3)
Print 'Hello World'
end if
Jump out of the loop
End for
Print n

A. 2

B. 1

C. 3

D. Hello World

https://docs.google.com/forms/d/e/1FAIpQLSdPGKyVc17BoxnV0OcgdFZFUpGBRb2DaUFnjjmm2XqaJy1e4Q/formResponse 2/7
7/24/24, 8:21 PM Accenture Mock Test - 9

Q.4 What will be the output of the following pseudocode? * 1 point

Integer a[5], b[5], c[5], k, l


Set a[5] = {5, 9, 7, 3, 1}
Set b[5] = {2, 4, 6, 8, 10}
for(each k from 0 to 4)
c[k] = a[k] - b[k]
end for
for(each 1 from 0 to 4)
Print c[1]
end for

A. 7 13 13 11 11

B. 3 5 1 -5 -9

C. -3 -5 -1 5 9

D. None

Q.5 How many times ‘A’ will be printed in the following pseudocode? * 1 point

Integer a, b, c
for (a = 0 to 4)
for (b = 0 to 2)
if (a is greater than b)
Print 'A'
End if
End for
End for

A. 8

B. 7

C. 9

D. 10

https://docs.google.com/forms/d/e/1FAIpQLSdPGKyVc17BoxnV0OcgdFZFUpGBRb2DaUFnjjmm2XqaJy1e4Q/formResponse 3/7
7/24/24, 8:21 PM Accenture Mock Test - 9

Q.6 What will be the output of the following pseudocode? * 1 point

Integer p, q, r
Set q = 13
for (each p from 1 to 4)
r = q mod p
p=p+5
q=p+r
end for
r=q/5
Print q, r

A. 6 4

B. 1 3

C. 7 2

D. 6 1

Q.7 What will be the output of the following pseudocode? * 1 point

Integer x
Set x = 259
if(x EQUALS 0)
Print '0'
otherwise if(x MOD 9 EQUALS 0)
Print '9'
otherwise
Print x MOD 9
end if

A. 8

B. 16

C. 7

D. None

https://docs.google.com/forms/d/e/1FAIpQLSdPGKyVc17BoxnV0OcgdFZFUpGBRb2DaUFnjjmm2XqaJy1e4Q/formResponse 4/7
7/24/24, 8:21 PM Accenture Mock Test - 9

Q.8 What will be the output of the following pseudocode? * 1 point

Integer a, b
et a = 12, b = 25
a = (a + b) MOD 2
b=b=a
a = a + b - 13
Print a, b

A. -11 1

B. -12 00

C. 11 22

D. 37 24

Q.9 What will be the output of the following pseudocode? * 1 point

Integer a, b, c
Set a = 4, b = 4, c = 4
if (a & (b ^ b) & c)
a = a >> 1
End if
Print a + b + c

A. 16

B. 24

C. 8

D. 12

https://docs.google.com/forms/d/e/1FAIpQLSdPGKyVc17BoxnV0OcgdFZFUpGBRb2DaUFnjjmm2XqaJy1e4Q/formResponse 5/7
7/24/24, 8:21 PM Accenture Mock Test - 9

Q.10 What will be the output of the following pseudocode for a = 10, b = 11? * 1 point

Integer funn(Integer a, Integer b)


if(0)
return a - b – funn(-7, -1)
End if
a=a+a+a+a
return a
End function funn()

A. 40

B. 30

C. 44

D. 0

Back Next Clear form

Never submit passwords through Google Forms.

This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy

Forms

https://docs.google.com/forms/d/e/1FAIpQLSdPGKyVc17BoxnV0OcgdFZFUpGBRb2DaUFnjjmm2XqaJy1e4Q/formResponse 6/7
7/24/24, 8:21 PM Accenture Mock Test - 9

https://docs.google.com/forms/d/e/1FAIpQLSdPGKyVc17BoxnV0OcgdFZFUpGBRb2DaUFnjjmm2XqaJy1e4Q/formResponse 7/7

You might also like