Questions IPA Japan published in 令和5年度 基本情報技術者試験 科目B 公開問題, translated into English, with IPA's answers. ITPEC is based on the same exams, so they are good practice for ITPEC too.
From the answer group below, select the correct combination of answers to be inserted into A and B in the program. Here, the array index starts at 1.
The function findPrimeNumbers returns an array that stores all the prime numbers, and only the prime numbers, less than or equal to the integer given as the argument. Here, the integer given to the argument is 2 or greater.
Answer group
From the answer group below, select the correct answer to be inserted into blank in the description.
In the following program, when the procedure proc2 is called, blank are output in this order.
Answer group
From the answer group below, select the correct answer to be inserted into blank in the description. Here, the array index starts at 1.
The following procedure sort sorts the elements of the global integer-type array data, from the index given by the argument first to the index given by the argument last, in ascending order. Here, first < last. When the procedure sort is called as sort(, the output when the line /*** α ***/ is executed for the first time is “blank”.
Answer group
From the answer group below, select the correct answer to be inserted into blank in the description. Here, the array index starts at 1.
The function add stores the positive integer value specified by the argument in the global integer-type array hashArray. It returns true if the value has been stored, and returns false if the value could not be stored. Here, which element of hashArray the integer value should be stored in is determined by using the functions calcHash1 and calcHash2.
The procedure test calls the function add to store positive integers in hashArray. The content of hashArray immediately after the processing of the procedure test has finished is blank.
Answer group
From the answer group below, select the correct combination of answers to be inserted into A and B in the program. Here, the array index starts at 1.
Cosine similarity is a measure of the similarity of the directions of two vectors. The function calcCosineSimilarity receives the real-type arrays vector1 and vector2, each of which has n (n ≥ 1) elements, and returns the cosine similarity of the two arrays. When the array vector1 is {a1, a2, …, an} and the array vector2 is {b1, b2, …, bn}, the cosine similarity is calculated by the following formula. Here, it is assumed that neither the array vector1 nor the array vector2 has 0 stored in all of its elements.
a1b1 + a2b2 + … + anbn√a21 + a22 + … + a2n √b21 + b22 + … + b2n
Answer group
Company A runs an advertising production business for broadcasting companies and transportation companies. To improve the efficiency of its human resources operations, Company A decided to consider outsourcing its human resources operations. Figure 1 shows the work that Company A will outsource (hereinafter, work B).
Figure 1 Work B
Company C, a candidate outsourcing contractor, made the following proposal to Company A about work B.
Figure 2 Scan function of the multifunction printer (excerpt)
Before concluding an outsourcing contract with Company C, Company A concluded a non-disclosure agreement. After that, Company A sent a questionnaire to Company C, received the answers, and conducted an assessment of the information security risks in the outsourcing. As a result, the findings in Figure 3 were made.
Figure 3 Findings
Therefore, Company A assessed that leaving the initial settings as they are poses an information security risk to Company A, and that a countermeasure of changing them from the initial settings is necessary.
Answer group