BPSC Maintenance Engineer Exam 2021 — Question Solution | বিপিএসসি (সরকারি কর্ম কমিশন) রক্ষণাবেক্ষণ প্রকৌশলী নিয়োগ পরীক্ষা ২০২১ — প্রশ্ন সমাধান
- BPSC
- Maintenance Engineer
- 2021
- 8 questions · 0 MCQ, 8 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The BPSC Maintenance Engineer exam was held in 2021. The paper had 8 written questions. The subjects asked most were Algorithms (2), Software Engineering (2) and Cyber Security (1). This page lists every question, with 2 answered and explained; the rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
বিপিএসসি (সরকারি কর্ম কমিশন) রক্ষণাবেক্ষণ প্রকৌশলী নিয়োগ পরীক্ষার (২০২১) এই প্রশ্নপত্রে ৮টি প্রশ্ন ছিল, বেশিরভাগ অ্যালগরিদম ও সফটওয়্যার ইঞ্জিনিয়ারিং থেকে। এখানে ২টি প্রশ্নের ব্যাখ্যাসহ উত্তর দেওয়া আছে; বাকিগুলো ফ্রি অ্যাকাউন্টে খোলে।
- Organisation
- BPSC
- Post
- Maintenance Engineer
- Exam date
- 2021
- Questions
- 8 (0 MCQ, 8 written)
- Exam guide
- BPSC non-cadre IT posts · পিএসসি নন-ক্যাডার আইটি পদ
(a) Write a program in C/C++/Java to perform binary search on a list of integer numbers.
(b) Write a program in C/C++/Java to identify the largest number of given 3 numbers.
(a) Compare and contrast array and linked list.
(b) Draw a binary tree of 5 elements. Now list out the elements in (i) Pre-order (ii) Post-order and (iii) In-order traversal of the tree.
(a) Compare and contrast between Quick sort and Merge sort in terms of their time and space complexity.
(b) Write down a pseudocode/program to generate all possible permutation for a given word.
(a) How does a browser retrieve IP address from URL?
(b) What is NAT? Mention its advantages.
(c) Explain IPTV and VOIP.
(d) What is DNS? "TCP/IP is used in DNS" - justify the statement.
Sign up free to see the model answers to written questions 1–4 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) What is referential integrity? How do you impose in your database design?
(b) Describe the application of trigger in database.
(c) Describe the difference between CHAR and VARCHAR data type.
Model answer
(a) Referential integrity and how to impose it
Referential integrity is the rule that every foreign key value must either match an existing primary (or unique) key value in the referenced (parent) table or be NULL. No row may point to something that does not exist (no "orphan" rows).
Example: DEPARTMENT(dept_id PK, dept_name) and EMPLOYEE(emp_id PK, name, dept_id FK). An employee with dept_id = 99 when there is no department 99 violates referential integrity.
It can be broken by: inserting/updating a child row with a non-existent key, or deleting/updating a parent key that child rows still use.
erDiagram
DEPARTMENT ||--o{ EMPLOYEE : "dept_id refers to"
Imposing it in the design:
- Give the parent a primary key and declare the foreign key on the child:
CREATE TABLE department (
dept_id INT PRIMARY KEY,
dept_name VARCHAR(50) NOT NULL
);
CREATE TABLE employee (
emp_id INT PRIMARY KEY,
name VARCHAR(50) NOT NULL,
dept_id INT,
CONSTRAINT fk_emp_dept FOREIGN KEY (dept_id)
REFERENCES department(dept_id)
ON DELETE SET NULL
ON UPDATE CASCADE
);
- Choose what happens when a referenced parent row changes:
| Referential action | Effect on child rows |
|---|---|
| NO ACTION / RESTRICT (default) | Parent delete/update is rejected while children refer to it |
| CASCADE | Children are deleted/updated along with the parent |
| SET NULL | Child foreign key becomes NULL |
| SET DEFAULT | Child foreign key gets its default value |
- Add
NOT NULLto the foreign key if the relationship is mandatory (every employee must have a department). - Use triggers only for rules a foreign key cannot express (e.g., conditional references).
With the tables above holding department (10, 'ICT') and employee (1, 'Rahim', 10): inserting (2, 'Karim', 99) is rejected (there is no department 99); changing department 10 to 20 changes Rahim's dept_id to 20 (CASCADE); then deleting department 20 sets Rahim's dept_id to NULL (SET NULL).
(b) Applications of triggers
A trigger is a stored block that the DBMS runs automatically when INSERT, UPDATE or DELETE happens on a table (Event → Condition → Action), BEFORE or AFTER the change, per row or per statement.
Applications:
- Enforcing complex business rules that CHECK or FOREIGN KEY cannot express (minimum balance, no salary cut).
- Audit trail — record old and new values, user and time of every change.
- Maintaining derived data — update stock quantity when an order row is inserted, keep totals in step.
- Auto-generating values — IDs, created/updated timestamps.
- Synchronising/replicating data to history or copy tables.
- Security and validation — block changes outside office hours or by unauthorised users.
- Alerts — insert a notification when stock falls below a level.
Example (SQLite syntax) — a bank account must keep at least 500 Tk:
CREATE TRIGGER trg_min_balance
BEFORE UPDATE OF balance ON account
FOR EACH ROW
WHEN NEW.balance < 500
BEGIN
SELECT RAISE(ABORT, 'Minimum balance 500 must be kept');
END;
UPDATE account SET balance = 300 … is rejected; balance = 1200 succeeds. Keep triggers short: hidden or chained triggers make DML slower and harder to debug.
(c) CHAR vs VARCHAR
| Point | CHAR(n) | VARCHAR(n) |
|---|---|---|
| Length | Fixed — always n characters | Variable — only the actual length, up to n |
| Padding | Shorter values padded with spaces on the right | No padding |
| Extra bytes | None | Length prefix: 1 byte (2 bytes if values can exceed 255 bytes) |
| Maximum (MySQL) | 255 characters | 65,535 bytes (shared with the row-size limit) |
| Speed | Slightly faster for fixed-size data | Small overhead to read the length; saves space |
| Best for | Fixed-length codes: 'M'/'F', country code 'BD', postcode | Names, addresses, e-mails |
Storage example (MySQL, single-byte character set):
| Value | CHAR(4) stored | Bytes | VARCHAR(4) stored | Bytes |
|---|---|---|---|---|
| '' | '····' (4 spaces) | 4 | '' | 1 |
| 'ab' | 'ab··' | 4 | 'ab' | 3 |
| 'abcd' | 'abcd' | 4 | 'abcd' | 5 |
So VARCHAR saves space for values of varying length, but for values that always fill the column CHAR is smaller.
Exam tip: referential integrity = FOREIGN KEY … REFERENCES plus an ON DELETE/ON UPDATE action; a trigger fires automatically; CHAR is fixed and padded, VARCHAR is variable with a length prefix.
(a) What is Agile? Mention its four values.
(b) What are the resources you need to access a web enabled application?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) What is 2-factor authentication? Describe it with example.
(b) Distinguish between http and https.
Model answer
(a) Two-factor authentication (2FA)
Definition: Two-factor authentication is a security method that verifies a user's identity with two factors from two different categories, instead of a password alone. If one factor is stolen, the account is still protected by the other.
The three factor categories:
| Category | Meaning | Examples |
|---|---|---|
| Something you know | Knowledge | Password, PIN |
| Something you have | Possession | Mobile phone receiving an OTP, smart card, hardware security key |
| Something you are | Inherence (biometric) | Fingerprint, face, iris |
2FA uses any two different categories, e.g. password + OTP, or card + PIN. Two items from the same category (password + security question) are not 2FA.
sequenceDiagram
participant U as User
participant S as Server
participant P as User phone
U->>S: Username and password - factor 1, something you know
S->>P: Password correct, one-time code sent
U->>S: Enters the code - factor 2, something you have
S-->>U: Both factors valid, access granted
Example 1 – ATM withdrawal: the bank card (something you have) + the PIN (something you know). A thief with only the card, or only the PIN, cannot withdraw money.
Example 2 – online banking: after the password, the bank sends a 6-digit OTP to the registered mobile number; access is granted only when both are correct.
Why it helps: it blocks most attacks that rely on a stolen or reused password, such as credential stuffing and simple phishing. SMS OTP is the weakest option (SIM-swap, phishing relay), so authenticator-app codes (TOTP) or FIDO2 security keys/passkeys are preferred; NIST SP 800-63B treats SMS as a restricted authenticator.
(b) HTTP vs HTTPS
HTTPS is HTTP over TLS (Transport Layer Security; older versions were called SSL). TLS encrypts the HTTP messages and proves the server's identity with a certificate.
| Basis | HTTP | HTTPS |
|---|---|---|
| Full form | HyperText Transfer Protocol | HyperText Transfer Protocol Secure |
| Security | Data sent in plain text; can be read or changed in transit | Data encrypted by TLS (1.2/1.3); confidentiality and integrity |
| Server authentication | None | Server proves its identity with a digital certificate issued by a Certificate Authority (CA) |
| Default port | 80 | 443 |
| URL scheme | http:// |
https:// (browser shows a padlock) |
| Protocol stack | HTTP → TCP → IP | HTTP → TLS → TCP → IP |
| Certificate needed | No | Yes |
| Speed | No handshake overhead | Small TLS handshake cost (1-RTT in TLS 1.3); modern HTTP/2 is used by browsers only over HTTPS |
| Use | Non-sensitive public content (now discouraged) | Logins, banking, e-commerce, and practically all websites today |
Note: HTTPS protects the data in transit; it does not prove that the website itself is honest — a phishing site can also have a valid certificate.
Exam tip: 2FA = two factors of different types (know + have / are); HTTPS = HTTP + TLS encryption + certificate, port 443 vs HTTP port 80.
Assume that you are going to implement an ecommerce site of "XYZ" company. The CEO of the company is Mr. X. You have to identify the following:
(i) Stakeholder
(ii) Functional requirements
(iii) Non-functional requirements
(iv) Deployment requirements
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Keep going with a free account · ফ্রি অ্যাকাউন্টে যা যা করতে পারবেন
6 more answers from this paper open with a free account.
এই প্রশ্নপত্রের আরও ৬টি উত্তর, ধাপে ধাপে ব্যাখ্যাসহ, ফ্রি অ্যাকাউন্টে খুলবে।
Free account · 1 day of Premium free
Paper analysis · প্রশ্নপত্র বিশ্লেষণ
Its questions come from 8 syllabus chapters; IP Addressing & Subnetting, Sorting and Requirements & Design lead, with 1 each. IP Addressing & Subnetting is asked in 133 other papers too (2012–2026).
Its biggest topics · প্রধান টপিক
Questions in this paper, and how many of our other papers ask the topic
- IP Addressing & Subnetting Networking · 133 other papers, 2012–20261
- Sorting Algorithms · 59 other papers, 2013–20261
- Requirements & Design Software Engineering · 50 other papers, 2016–20261
- Cryptography Cyber Security · 49 other papers, 2012–20261
- Keys & Relational Model Database · 42 other papers, 2016–20251
- Searching Algorithms · 39 other papers, 2016–20261
From our own past papers: each question filed under one syllabus chapter. Practice and held questions are not counted.
Questions about this paper · সাধারণ প্রশ্ন
- How many questions were in the BPSC Maintenance Engineer exam (2021)?
- 8 written questions.
- Which subjects were asked most in the BPSC Maintenance Engineer exam (2021)?
- Algorithms (2), Software Engineering (2) and Cyber Security (1), out of 8 questions.
- When was the BPSC Maintenance Engineer exam held?
- In 2021. The exact day isn't in our records.
- Where can I find the BPSC Maintenance Engineer exam (2021) question solution?
- On this page: 2 of the 8 questions are shown with worked answers. The rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers