LearnIPAReviewHistoryAI
Profile
AboutHow I passedFeedback
LearnIPA
Review
History
Profile
LearnIPAReviewHistoryAI
Profile
AboutHow I passedFeedback
IPA FE Subject B 2026

Questions IPA Japan published in 令和8年度 基本情報技術者試験 科目B 公開問題, translated into English, with IPA's answers. ITPEC is based on the same exams, so they are good practice for ITPEC too.

Question 1

From the answer group below, select the correct answer to be inserted into blank in the program. Here, the array index starts at 1.

The following program moves the value of the last element of the integer-type array data to the first element. In doing so, the value of each element other than the last one is moved to the element one position after it.

[Program]
integer []: data ← {1, 2, 3, 4, 5, 6, 7, 8, 9}
integer: top, i
integer: len ← the number of elements in data
top ← data[len]
for (blank)
data[i] ← data[i - 1]
endfor
data[1] ← top

Answer group

Question 2

From the answer group below, select the correct answer to be inserted into blank in the program.

The function complement receives an 8-bit type value x as an argument, and returns the value that gives 00000000 when added to x. Addition of 8-bit type values is performed by regarding the values as unsigned binary numbers, and when an overflow occurs, the overflowed digit is ignored. The operators ∧, ∨, and ▽ represent bitwise logical product, logical sum, and exclusive logical sum, respectively.

[Program]
○ 8-bit: complement(8-bit: x)
8-bit: y
y ← blank
y ← y + 00000001
return y

Answer group

Question 3

From the answer group below, select the correct answer to be inserted into blank in the program. Here, the array index starts at 1.

When the argument given to the function func1 and the argument given to the function func2 are the same, the two functions return the same value. The program must not refer to any area outside the bounds of the array.

[Program]
○ integer: func1(integer: n)
if (n is 2 or less)
return 1
endif
return 2 × func1(n - 2) + func1(n - 1)
○ integer: func2(integer: n)
integer []: data ← {1, 1, 1}
integer: i
/* The loop is not executed when n is less than 3 */
for (increase i from 3 to n by 1)
data[1] ← data[2]
data[2] ← data[3]
data[3] ← blank
endfor
return data[3]

Answer group

Question 4

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.

A singly linked list is represented by two arrays, the array dataList and the array pointerList. dataList stores the values of the elements of the list, and pointerList stores the index of the element of dataList that corresponds to the next element of the list. The head of the singly linked list is the pair of dataList[1] and pointerList[1]. The element of pointerList that corresponds to the tail of the singly linked list is undefined. The elements of dataList that do not store values of elements of the singly linked list, and the corresponding elements of pointerList, are undefined.
The contents of dataList and pointerList handled by the program are shown in Figure 1. The index of the element next to the head is 3, stored in pointerList[1], and its value is 20, stored in dataList[3]. The index of the element after that is 2, stored in pointerList[3], and its value is 30, stored in dataList[2].

Index12345dataList10302040Index12345pointerList342
Note:Shading indicates that the element is undefined.

Figure 1 Contents of dataList and pointerList

The function orderList returns an array that stores the values of the singly linked list represented by dataList and pointerList in Figure 1, in order, following the singly linked list from its head. The array returned by the function orderList is shown in Figure 2.

Index123410203040

Figure 2 Array returned by the function orderList

[Program]
global: integer []: dataList ← {10, 30, 20, 40, undefined}
global: integer []: pointerList ← {3, 4, 2, undefined, undefined}
○ integer []: orderList()
integer: i, p ← 1
integer []: linearList ← {} // array with 0 elements
for (increase i from 1 to the number of elements in dataList by 1)
add the value of dataList[p] to the end of linearList
if (A is undefined)
exit the for block
endif
p ← B
endfor
return linearList

Answer group

OptionAB
Question 5

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.

In this question, a representation by an integer-type array in which only one element is 1 and the other elements are 0 is called a One-Hot representation. As shown in the figure, the function oneHotEncoding receives as its argument a string-type array of one or more elements in which names of colors are stored, converts each element into a One-Hot representation based on the names of colors contained in the array (three kinds in the example in the figure), and stores them in an array of integer-type arrays and returns it. An example of conversion by the function oneHotEncoding is shown in the figure.

Example of argument: {"Red", "Green", "Blue", "Red"}

↓

One-Hot representation of "Red": {1, 0, 0}

One-Hot representation of "Green": {0, 1, 0}

One-Hot representation of "Blue": {0, 0, 1}

↓

Return value corresponding to the example of argument: {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 0}}

Figure Example of conversion by the function oneHotEncoding

[Program]
○ integer [][]: oneHotEncoding(string []: colors)
integer: i, j, k
string []: colorVector ← {} // array with 0 elements
integer []: tempVector
integer [][]: oneHotVector ← {} // array with 0 elements
/* Create the list of names */
for (increase i from 1 to the number of elements in colors by 1)
if (the value of colors[i] is not stored in any element of colorVector)
add A to the end of colorVector
endif
endfor
/* Convert to One-Hot representation */
for (increase j from 1 to the number of elements in colors by 1)
tempVector ← {} // array with 0 elements
for (increase k from 1 to the number of elements in colorVector by 1)
if (B)
add 1 to the end of tempVector
else
add 0 to the end of tempVector
endif
endfor
add tempVector to the end of oneHotVector
endfor
return oneHotVector

Answer group

OptionAB
Question 6

Company A is an advertising agency with 1,000 employees. At Company A, the file server that each department has installed on Company A’s internal network is managed by the operations staff of the department that installed it. When a department uses a new cloud service, the department signs the contract with the approval of the person responsible for the department, and the department’s operations staff manage the service.
The Sales Department uses a file server that the Sales Department installed on Company A’s internal network (hereinafter, server Y) and a cloud service for customer management (hereinafter, service Z). Each employee of the Sales Department is assigned a general user account of server Y, and can edit all files on server Y. In addition, each employee of the Sales Department is assigned a general user account of service Z, and the operations staff of the Sales Department are assigned administrator accounts of server Y and service Z.

In preparation for the occurrence of information security incidents related to cloud services, the information security department established rules on the management of logs of the cloud services used by each department, as shown in Figure 1.

1. Acquisition of logsAcquire the following logs•Logs of login and logout (hereinafter, login logs)•Logs of important operations in the cloud service and their success or failure2. Items of logsAt least the following must be recorded•The name of the target account, the date and time in Japan Standard Time, and the operation performed3. Access management of logs•Ensure that only the operations staff can access the logs•When logs are exported from the cloud service and stored, store the logs on the department’s own file server installed on the internal network, and ensure that only the operations staff can access them•Assign more than one person as the operations staff•Require two-factor authentication for logins of the operations staff to the cloud service4. Retention period of logs•Ensure that logs for at least the past one year can be referred to5. Countermeasures against falsification•Ensure that logs cannot be written or erased, even by the operations staff

Figure 1 Rules on the management of logs of the cloud services used by each department

Section Manager B, the information security leader of the Sales Department, investigated whether the rules in Figure 1 were complied with, with the cooperation of Chief C of the operations staff and the information security department.
Section Manager B summarized the current operations of service Z that violate the rules in Figure 1, as shown in Table 1.

Table 1 Current operations that violate the rules in Figure 1

Item No.Current operation
(i)The logs of service Z are overwritten, starting from the oldest logs, when the free space falls to a certain value or below.
(ii)Service Z was operated by two persons of the Sales Department, Chief C and Chief D, but since Chief D left the company last month, it is currently operated by Chief C only.
(iii)The dates and times in the logs of service Z are recorded in UTC.
(iv)All logs of service Z are exported at the end of every month and stored on server Y.
QuestionFrom the answer group below, select the combination that lists all of, and only, the item numbers of the operations in Table 1 that violate rule 3 in Figure 1.

Answer group

LearnIPA
Review
History
Profile