Skip to content
Past paper

BTCL; Assistant Manager (Technical); Exam: 2023 (BUET)প্রশ্ন ও সমাধান

Set by
BTCL
Post
Assistant Manager
Exam date
2023
Conducted by
BUET
Questions
5 (0 MCQ, 5 written)
Exam guide
Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
  • Cloud & Emerging Tech · ক্লাউড ও উদীয়মান প্রযুক্তি 1
  • Cyber Security · সাইবার নিরাপত্তা 1
  • Database · ডেটাবেজ 1
  • Networking · নেটওয়ার্কিং 1
  • Programming · প্রোগ্রামিং 1
Written question 1Cyber Security

Explain buffer overflow attack with an example.

Model answer

A buffer overflow occurs when a program writes more data into a fixed-size buffer than it can hold, so the extra bytes spill into adjacent memory — potentially overwriting control data such as a saved return address, allowing an attacker to hijack program execution.

Vulnerable example (C)

#include <stdio.h>
#include <string.h>
void greet() {
    char username[10];
    gets(username);              // no bounds checking!
    printf("Hello, %s!\n", username);
}

gets() never checks length. Input longer than 9 characters (plus the null terminator) overwrites memory past username[9] — including, on the stack, saved registers and the return address of greet().

Stack layout during the overflow

graph TD
  A["Low memory: username buffer (10 bytes)"] --> B["Saved base pointer"]
  B --> C["Return address"]
  D["Attacker input longer than 10 bytes"] -.overwrites.-> A
  D -.overwrites.-> B
  D -.overwrites.-> C
  C --> E["Execution jumps to attacker-controlled address"]

By carefully crafting the input, an attacker can overwrite the return address with the address of injected shellcode, causing the CPU to execute arbitrary attacker code once greet() returns.

Impact

  • Crash / denial of service.
  • Arbitrary code execution with the privileges of the vulnerable process.
  • Privilege escalation if the process runs as root/admin.

Prevention

  • Use bounds-checked functions: fgets() instead of gets(), strncpy instead of strcpy.
  • Enable stack canaries, ASLR (Address Space Layout Randomization), and DEP/NX (non-executable stack).
  • Use memory-safe languages or static/dynamic analysis tools for legacy C/C++ code.

Exam takeaway: Buffer overflows exploit the absence of bounds checking on writes to fixed-size buffers; the single most direct fix at the code level is replacing unsafe functions like gets()/strcpy() with their bounded counterparts.

Written question 2Cloud & Emerging Tech

Explain reinforcement learning in the field of Machine Learning?

Model answer

Reinforcement Learning (RL) is a machine-learning paradigm in which an agent learns to make a sequence of decisions by interacting with an environment, receiving a reward signal after each action, and adjusting its behavior to maximize cumulative reward over time — without being told the correct action directly (unlike supervised learning).

Core components

Component Role
Agent Learner/decision-maker
Environment External system the agent acts on
State (s) Current situation the agent observes
Action (a) Choice the agent makes at state s
Reward (r) Feedback signal after taking action a
Policy (π) Agent's strategy: state -> action

The agent-environment loop

graph LR
  Agent -- Action a_t --> Env[Environment]
  Env -- Reward r_t, New State s_t+1 --> Agent

Worked example

Training an agent to play a simple grid game: state = current cell, actions = {up, down, left, right}, reward = +10 for reaching the goal, -1 per step (to encourage shortest paths), -100 for falling into a trap. Over many episodes, the agent updates its policy (e.g., via Q-learning: Q(s,a) <- Q(s,a) + α[r + γ·max Q(s',a') − Q(s,a)]) so that it increasingly favors actions leading to higher long-term reward, eventually converging on the shortest safe path to the goal.

Key trade-off

  • Exploration (trying new actions to discover better rewards) vs exploitation (using the best-known action so far) — balancing these (e.g., via ε-greedy policies) is central to RL.

Applications

Game playing (AlphaGo, Atari), robotics control, self-driving cars, recommendation systems, resource allocation.

Exam takeaway: RL differs from supervised learning because it learns from delayed, scalar reward signals through trial-and-error interaction, not from labeled input-output pairs.

Written question 3Programming

Suppose you have an array. The array contains elements from 0 to 10. This array also contains 0. To replace these 0s, write a program in C/C++ language.

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 4Networking

Given IP address 192.168.1.50, Subnet Mask: 255.255.255.240. Find the valid IP range. Also find Network address and Broadcast address.

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 5Database

Left joning and inner joining of a table.

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers · Government IT officer posts guide