BPSC Assistant Programmer Exam 2021 — Question Solution | বিপিএসসি (সরকারি কর্ম কমিশন) সহকারী প্রোগ্রামার নিয়োগ পরীক্ষা ২০২১ — প্রশ্ন সমাধান
- BPSC
- Assistant Programmer
- 2021
- 8 questions · 0 MCQ, 8 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The BPSC Assistant Programmer exam was held in 2021. The paper had 8 written questions. The subjects asked most were Algorithms (2), Database (1) and Digital Logic (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
- Assistant Programmer
- Exam date
- 2021
- Questions
- 8 (0 MCQ, 8 written)
- Exam guide
- BPSC non-cadre IT posts · পিএসসি নন-ক্যাডার আইটি পদ
Briefly describe Unit testing, Smoke testing and Stress testing in software engineering.
Model answer
These three tests answer three different questions: does each small piece work (unit), is the new build healthy enough to test (smoke), and how does the system behave beyond its limits (stress)?
1. Unit testing
Unit testing checks the smallest testable part of the software (a function, method or class) in isolation from the rest of the system. It is the lowest level of testing, done during coding, usually by the developer who wrote the unit, and is mostly white-box and automated with frameworks such as JUnit, NUnit or pytest. Modules that the unit calls are replaced by stubs or mock objects, and a small driver calls the unit with test data, so a failure points straight to that unit.
Example: a function isLeapYear(year) is tested on its own with 2024 (expected true), 1900 (expected false) and 2000 (expected true).
2. Smoke testing
Smoke testing, also called build verification testing, is a quick, shallow check run on every new build to confirm that the most critical functions work: the application installs and starts, login works, the main screens open and one key transaction completes. If it fails, the build is rejected and sent back to the developers; detailed functional and regression testing starts only after it passes. (The name comes from hardware: switch the device on and see whether it smokes.)
Example: after each nightly build of an online shopping site, a 10-minute suite checks that the home page loads, a user can log in, add an item to the cart and open the checkout page.
3. Stress testing
A non-functional (performance) test, stress testing pushes the system beyond its specified maximum (more users, data or transactions than designed, or less memory and CPU) in order to find its breaking point, see how it fails and check that it recovers. A good system degrades gracefully: it slows down or shows a clear error, loses no data and returns to normal when the load falls. Load testing, by contrast, stays at the expected load.
Example: a result-publishing website designed for 20,000 simultaneous users is hit with 40,000 and then 60,000 virtual users from a tool such as Apache JMeter; testers note where errors begin and confirm that no records are corrupted.
| Aspect | Unit testing | Smoke testing | Stress testing |
|---|---|---|---|
| Type | Lowest level of testing, mostly white-box | Functional build check, black-box | Non-functional (performance) |
| Scope | One function, method or class | Critical features of the whole build | Whole system under extreme load |
| Done by | Developers | Testers or the CI pipeline | Performance testers |
| When | During coding | On every new build, before detailed testing | Late, after functional testing |
| Depth | Deep, but narrow | Wide, but shallow | Targets limits and failure behaviour |
Exam tip: unit = one piece in isolation; smoke = "is the build stable enough to test?"; stress = beyond the maximum load, to find the breaking point and check recovery.
What do you mean by DHCP server? Explain the benefits of using dedicated DHCP server. Briefly describe the main benefits of using IPv6 protocol.
Analyze and compare the Quick-sort and Merge-sort algorithms in terms of their time and space complexity.
Sign up free to see the model answers to written questions 2–3 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
How can you Implement AND, OR and NOT gates using only NAND and NOR gates? What is the main difference between Latch and Flip-flop?
Model answer
NAND and NOR are universal gates: NOT, AND and OR (and therefore any Boolean function) can be built from NAND gates alone or from NOR gates alone. A gate with its inputs tied together acts as an inverter, and De Morgan's law supplies the third gate. (X' means NOT X.)
1. AND, OR and NOT from NAND only
| Gate | NAND-only construction | Why it works | NAND gates |
|---|---|---|---|
| NOT A | one NAND, both inputs = A | (A·A)' = A' | 1 |
| A·B | NAND(A, B), then a NAND used as NOT | ((AB)')' = AB | 2 |
| A + B | invert A and B with two NANDs, then NAND(A', B') | (A'·B')' = A + B (De Morgan) | 3 |
flowchart LR
A1(["A"]) -->|"both inputs"| P1["NAND"]
P1 --> Y1(["A'"])
A2(["A"]) --> P2["NAND"]
B2(["B"]) --> P2
P2 -->|"(AB)'"| P3["NAND (inputs tied)"]
P3 --> Y2(["A·B"])
A3(["A"]) -->|"both inputs"| P4["NAND"]
B3(["B"]) -->|"both inputs"| P5["NAND"]
P4 -->|"A'"| P6["NAND"]
P5 -->|"B'"| P6
P6 --> Y3(["A + B"])
2. AND, OR and NOT from NOR only
| Gate | NOR-only construction | Why it works | NOR gates |
|---|---|---|---|
| NOT A | one NOR, both inputs = A | (A + A)' = A' | 1 |
| A + B | NOR(A, B), then a NOR used as NOT | ((A + B)')' = A + B | 2 |
| A·B | invert A and B with two NORs, then NOR(A', B') | (A' + B')' = A·B (De Morgan) | 3 |
flowchart LR
A1(["A"]) -->|"both inputs"| R1["NOR"]
R1 --> Y1(["A'"])
A2(["A"]) --> R2["NOR"]
B2(["B"]) --> R2
R2 -->|"(A+B)'"| R3["NOR (inputs tied)"]
R3 --> Y2(["A + B"])
A3(["A"]) -->|"both inputs"| R4["NOR"]
B3(["B"]) -->|"both inputs"| R5["NOR"]
R4 -->|"A'"| R6["NOR"]
R5 -->|"B'"| R6
R6 --> Y3(["A·B"])
Check of the De Morgan steps:
| A | B | A' | B' | NAND(A', B') | A + B | NOR(A', B') | A·B |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 |
With 2-input gates these counts (1, 2, 3 in each family) are the smallest possible.
3. Latch vs flip-flop
Main difference: a latch is level-sensitive — while its enable is active it is transparent and Q follows the input; a flip-flop is edge-triggered — it samples the input only at the active clock edge (rising or falling) and holds Q for the rest of the clock period.
| Point | Latch | Flip-flop |
|---|---|---|
| Triggering | level (enable high or low); a basic SR latch has no enable at all | clock edge only |
| Transparency | input changes pass straight to Q while enabled | Q changes at most once per active edge |
| Construction | 2 cross-coupled NOR or NAND gates (plus gating for an enable) | built from latches, e.g. master–slave (two latches in series), so more gates |
| Speed and size | faster, smaller | slower, larger |
| Timing | glitches during the enable pass through | needs setup/hold time, but timing is predictable |
| Typical use | simple storage, holding data on a bus | registers, counters, state machines |
Example: with enable/clock high, if D goes 0 → 1 → 0, a D latch's Q follows the 0 → 1 → 0 pulse; a rising-edge D flip-flop ignores it and keeps the value D had at the last rising edge.
Exam tip: OR from NAND and AND from NOR each need 3 gates (invert both inputs first); a latch is transparent while enabled, a flip-flop changes only on a clock edge.
Write a program in C/Java to find out the factorial of a number using recursion also write its iterative program.
Solve the recurrence relation: T(n) = 3T(n-1) + 2, T(1) = 1.
Consider a magnetic disk consisting of 16 heads and 400 cylinders. This disk has four 100-cylinder zones with the cylinders in different zones containing 160, 200, 240. and 280 sectors, respectively. Assume that each sector contains 512 bytes, average seek time between adjacent cylinders is 1 msec, and the disk rotates at 7200 RPM. Calculate the (a) disk capacity (b) maximum data transfer rate.
What is the domain in a relational database? Explain with an example. Show how you would use Alter table SQL command to add a domain on a database table.
Sign up free to see the model answers to written questions 5–8 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
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, ER Model & Design and Control Flow & Loops 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
- ER Model & Design Database · 101 other papers, 2015–20261
- Control Flow & Loops Programming · 76 other papers, 2015–20261
- Sorting Algorithms · 59 other papers, 2013–20261
- Testing & Quality Software Engineering · 52 other papers, 2016–20261
- Logic Gates Digital Logic · 45 other papers, 2011–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 Assistant Programmer exam (2021)?
- 8 written questions.
- Which subjects were asked most in the BPSC Assistant Programmer exam (2021)?
- Algorithms (2), Database (1) and Digital Logic (1), out of 8 questions.
- When was the BPSC Assistant Programmer exam held?
- In 2021. The exact day isn't in our records.
- Where can I find the BPSC Assistant Programmer 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