0% found this document useful (0 votes)
7 views25 pages

Accenture Solved'24

The document contains a series of questions and answers related to computer science concepts, including UNIX commands, cryptography, data structures, and programming functions. It covers topics such as error handling, algorithm efficiency, and database characteristics. The answers provided indicate the correct responses to each question, reflecting knowledge in software development and system architecture.
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)
7 views25 pages

Accenture Solved'24

The document contains a series of questions and answers related to computer science concepts, including UNIX commands, cryptography, data structures, and programming functions. It covers topics such as error handling, algorithm efficiency, and database characteristics. The answers provided indicate the correct responses to each question, reflecting knowledge in software development and system architecture.
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/ 25

Q1) ANS: B. Control the accessing source of a zone transfer.

Q2) A binary program failed to run because it crashed due to lack of memory. Which of the
following is NOT an appropriate action to solve this issue?
Answer: C. Shorten the binary filename to save memory usage.
Q2) In UNIX-like OS, the authority for a certain file varies depending on the user who uses
Which of the following description is correct?
Answer: C. There is one owner and group in the file, and different authorities are given to the
user who is the owner, the users belonging to the group, and users of the other type.

Q3) In UNIX-like OS, when trying to execute a command called foo in the /home/bar
directory the error FOD CommandHat Found was displayed. Which command is used to
solve this error?
ANS: A. export PATH=/home/bar:$PATH

Q4) Choose the public-key cryptosystem that utilizes the fact that the complexity does not fit
within polynomial time.
ANS A. RSA
Q4) When browsing a website (https://example.com), the contents displayed on the
smartphone and the computer are different. Which statement below is not the cause?
Answer: C. Because the content of the website was tampered by a communication path. (O1
Preview+Perplexity)

Q5) Which is the description of CSRF (Cross-Site Request Forgery)?


ANS D.
Q6) Which is the cryptographic algorithm of forward secrecy (FS)?
ANS: B. To ensure that even if the long-term encryption key is compromised in the future,
the data encrypted with the short-term key will not be decrypted.

Q7) Which TCP port number of the server the Web browser will connect to when specifying
URL (Universal Resource Locator) as http://ftp.example.jp/index.cgi?port=123 in the Web
browser?
ANS: B. 80 (Perplexity+o1 mini)
Q7) What is it called when a specific character string is used as an input in the web
application to illegally manipulate the server-side database.
ANS D: SQL injection

Q8) Choose the correct description of database rollforward processing.


ANS B. Restore using a journal file after updating against a physical failure. (O1 MINI)
Q9) Mr. Aoki is planning to visit the shrine for New Years. However, the parking lot at the
shrine is very small. Once you park your car, you cannot leave until all of the cars that came
after you leave. Choose the data structure that best represents the situation in this parking
lot.
ANS: A. Stack
Q9) For the two variables x and y, execute the following procedure from 1 to 4. What is the
value of x when processing is over?
1. Assign 2 to x and assign 3 to y.
2. Assign y by y minus 1.
3. Assign the sum of the value of x and the value of y into x.
4. If y≠ 0, return to step 2. If y = 0, the process is terminated.
Fill in the blanks of the following sentences with half-width numbers:
When processing is finished, the value of x becomes
ANSWER: 5

Q10) Fill in the blanks of the following sentences with half-width digits.
I want to sort the sequence a = [5, 2, 8, 3, 1, 6, 7, 9] in ascending order by exchanging
adjacent numbers.
In this case, it is necessary to exchange at least —- times.
ANS:9 (o1 mini)
Q11) There is a staircase of n steps and you are on the bottom of the staircase, on the 0-th
step You can go up any of 1, 2, or 3 steps at a time.
Let us consider the problem of counting the number of step-taking patterns that will put you
on exactly the n-th step from the bottom.
For instance, if there are n = 4 steps, there are 7 patterns as follows. Each number is the
number of steps you take at one time.
1, 1, 1, 1.
2. 1, 1.
1, 2, 1.
1, 1, 2.
2.2.
1.3.
3.1.
For this problem, you implemented a function solve as follows. Note that all the variables are
multiple precision integers.function rec(1):
return 1
else:
ans:
if 111
ans + rec(1-1)
if 1 21
ans rec(1-2)
if % 3:
ans rec(1-3)
return ans
function solve(n): return recin)However, the program is too slow and it does not return the
answer for n = 1000 even if you wait a whole day. You want to speed up the program so that
it returns the answer in one second even if n is in the range between 1000 and 10000.
Which one of the following correctly states the reason the function is too slow and the
solution to fix the slowness?
ANS: C: Although rec(i) always returns the same value, every time rec(i) is called, it calls
the function three times recursively. That is why the program is so slow. We can speed up
the program by storing the value of rec(i) for each i when it is calculated for the first time, and
returning that value every time it is called thereafter.

Q12a) The following JavaScript function returns the number where the integer occurs in the
given array of integers a.
function find(a, x) {
for (let i=0; i<a.length; i++) {
if (a[1]= x) {
return i + 1;
} return -1;
}
ANS: C: If x is not found in array a, the function returns -1. (Perplexity+gpt4)
Q12b) Your friend wrote the following function in Java. She says the function should return
the average value of the given integer array Choose all of the correct statements about the
function from the following
static double mean(int[] a
int answer 0;
for (int 10; 1a.length; i++) {
answer a[1]
}
return answer/a.length;
ANS:
A. If the length of a is 0, the function does not return any value.
C. An integer overflow may occur when a is long and has some large elements.
(GPT4+Perplexity)
Q13)
Question:
You are teaching beginners A, B, and C at your company. The beginners wrote the following
functions. These functions receive an array of integers a and output the sum of all elements
in the array a. Choose all functions that work properly. At least one function works properly.

Functions:
Beginner A:

javascript
Copy code
function sum(a) {
let answer = 0;
for (let i = 0; i < a.length; i++) {
answer += a[i];
}
return answer;
}
Beginner B:

javascript
Copy code
function sum(a) {
let answer = 0;
for (let i = a.length; i > 0; i--) {
answer += a[i];
}
return answer;
}
Beginner C:

javascript
Copy code
function sum(a) {
let answer = 0;
let i = 0;
while (1) {
if (i == a.length) {
break;
}
answer += a[i];
i++;
}
return answer;
}
Choices:
A. Beginner A’s function
B. Beginner B’s function
C. Beginner C’s function

ANS:
A. Beginner A’s function
C. Beginner C’s function
Q14) This Java, function receives an input of array of integers arr and outputs true if there
are any neighboring array elements that have the same value in the array.
For example:
Given arr (0, 3, 2,2, 6, 1, 3), the elements 2, 2 are next to each other and are the same
value, so true is returned.
Given arr (e, 3, 2, 5, 6, 1, 3), there are no elements with the same values next to each other,
so false is returned.
static boolean contain Consecutive (int[] arr) {
for (int i=0; 11; i++) {
if ([]) {
return true;
return false;Choose the appropriate formula to enter into [11. [2] to make the function work.
A: i < arr.length-1; arr[i] == arr[i+1]
B: i < arr.length-1; arr[i] == arr[i-1]
C: i < arr.length; arr[i] == arr[i-1]
D: i < arr.length; arr[i] == arr[i+1]
E. All the above are incorrect

ANS: B) [1]: arr.length - 1 [2]: arr[i] == arr[i+1] (O1 MINI+Perplexiy)

Q15) Choose the description that is incorrect regarding the differences between in-memory
databases and traditional databases like MySQL or PostgreSQL
ANS B.In-memory databases are resilient to the physical failure of an HDD or SSD, making
data loss less likely compared to storage-based databases.
Q16) Choose the description that is incorrect regarding serverless architecture.
Ans C.Even when instances scale up, serverless architecture has the feature of zero-seco
nd initialization, allowing the application to start processing requests instantly.
(Perplexity+Mini)

Q17) Choose the two Incorrect options regarding SLOs (service level otijectives) and SLAs
(servic level agreements) in the context of site reliability engineering
ANS: (Perplexity+O1)
A.If an SLO is breached, there is a possibility of pursuing legal liability such as damages
B.Within the boundaries of meeting the SLO, the SRE team is allowed to intentionally cause
outages if there are reasonable justifications.

Q18) Microservice architecture provides many benefits over monolithic architecture. Which
is/are the advantage(s) of microservice architecture? Select all correct options.

ANS: ACD (Perplexity)


Q19) What are Docker images and Docker containers? Choose the correct option.
ANS: D Docker images are files used to create Docker containers (GPT4+O1 MINI)

Q20) Which of the following is/are true about ChatOps? Choose all of the correct answers
ANS: ACD
A.It aims to create a centralized location where everyone's actions, tools, notification s. and
diagnoses happen in full view.
C.It contributes to creating a transparent team culture by bringing information that h as been
strongly dependent on a small set of employees to a centralized location.
D.It is not only for technical teams but also for non-technical teams such as sales, m arketing
and finance. It can give a clear understanding of what is actually going on in the
infrastructure and who is responsible for which systems and what each pers on does.
def main():
# Read input
n, x = map(int, input().split()) # n is the number of participants, x is the legal age
ages = list(map(int, input().split())) # ages of the participants
# Check if there is anyone below the legal age
for age in ages:
if age < x:
print("Soft Drink")
return
# If all are of legal age
print("Alcohol")
# Execute the main function
if __name__ == "__main__":
main()
def main():
# Read input
X =float(input().strip())
# Find the smallest integer Y such that X- Y < 1
Y =int(X) # The largest integer less than or equal to X will be the smallest Y
# Output the result
print(Y)
# Execute the main function
if __name__ == "__main__":
main()

You might also like