45th BCS Written (CSE-971), Exam 31 January 2024 — Question Solution | বিসিএস নিয়োগ পরীক্ষা ২০২৪ — প্রশ্ন সমাধান
- BCS
- 31 January 2024
- 8 questions · 0 MCQ, 8 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The 45th BCS Written (CSE-971), exam was held on 31 January 2024. The paper had 8 written questions. The subjects asked most were Algorithms (1), Cloud & Emerging Tech (1) and Data Structures (1). This page lists every question, with 1 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
- BCS
- Exam date
- 31 January 2024
- Questions
- 8 (0 MCQ, 8 written)
- Exam guide
- BCS (ICT and CSE cadre) · বিসিএস (আইসিটি ও সিএসই ক্যাডার)
(a) Define problem solving technique. Write the differences between structured programming and object-oriented programming.
(b) How can we initialize 1-D array? How can we pass the array to a function in C?
(c) Write a C program to sum all digits of a 5-digit number. Draw the flowchart of this program.
(d) What is assembly language? Write its features. Write a program in assembly language to add and multiply two numbers.
(a) Write the decimal, octal and binary form of the number (E)16. Write the next four numbers in the following hexadecimal sequences: 6FC, 6FE,,,,.
(b) What is Boolean function? How can we simplify the following Boolean function?
F=A'B'C+A'BC+ AB'
(c) Write the 2's Complement of (+55)10. Show the differences between clocked J-K flip-flop and clocked D-flip-flop.
(d) Determine the truth table of (A⊕B) ∨ (¬A) ∨ (¬C).
(e) Draw the logic circuit of two input multiplexer. Compare between multiplexer and demultiplexer.
(a) What are differences between Breadth first search (BFS) and Depth first search (DFS)? For what sort of problems it is better to use BFS than DFS?
(b) Write the advantages and disadvantages of using linked list instead of using array.
(c) Define time complexity of an algorithm. Mention in brief-why is the worst-case Complexity of Quicksort O(n²).
(d) Is it possible to apply Binary search in a sorted linked list? Justify your answer with proper example.
(e) Suppose that in-order and preorder traversal of a binary tree are dbeafcg and abdecfg respectively. What will be the post-order traversal of the Binary tree?
(a) Draw a block diagram of Intel 8086 microprocessor. Write the features of 8086 microprocessor.
(b) What is the meaning of the following program status word for 8086?
| S | Z | AC | P | CY |
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 |
(c) Why is memory segmentation needed in 8086 microprocessor? What is the technique to generate 20-bit physical address in a 16-bit microprocessor?
(d) Why does addressing mode require in microprocessor? Describe immediate addressing mode and indexed addressing mode with examples for the 8086 microprocessor.
(e) Define Interrupt with example. If the processor speed is 1.8GHz, find the corresponding time period.
(a) Write the Mergesort algorithm to sort n elements using divide and conquer strategy.
(b) Define feasible solution and optimal solution. Write the greedy algorithm to generate the single-source shortest path of a graph.
(c) Consider a sum of subset problem n = 4, w = (w1, w2, w3, w4) = (11, 13, 24, 6) and m = 30. Find all possible subsets of w that sum to m. Draw the possible solution space tree of this problem and indicate the answer nodes.
(d) Define the following terms with example: Backtracking, NP, NP-Hard, and NP-complete problem.
(e) Define deadlock in operating system. Draw a proper diagram to show a deadlock situation and discuss in brief.
(a) What is normalization? Discuss BCNF with an example.
(b) Define functional dependency. Write Armstrong's axioms property of it.
(c) Describe the inconsistency state from the following transaction (if any).
| T1 | T2 |
|---|---|
| read (A) | |
| A := A - 5 | read (A) |
| Write (A) | temp := A * 0.12 |
| read (B) | A := A - temp |
| B := B + 50 | Write (A) |
| Write (B) | Write (B) |
| commit | B := B + temp |
| Write (B) | |
| commit |
(d) Write the responsibilities of a software engineer to design a software.
(e) What is software testing? Write the differences between following terms?
(i) Blackbox testing and whitebox testing
(ii) Verification and Validation.
Sign up free to see the model answers to written questions 1–6 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
(a) Define HTTP and DNS. Suppose that mygov.bd is a domain name. How does this DNS work?
(b) TCP and UDP are the example of transport layer protocol. What are the differences between these two protocols?
(c) What are the differences among Virus, Worms and Trojan horse?
(d) Discuss circuit switching and packet switching techniques with appropriate diagram. Define topologies in a network. Design a LAN for setting up a computer lab using BUS topology.
Model answer
(a) HTTP and DNS; how DNS resolves mygov.bd
HTTP (HyperText Transfer Protocol): an application-layer, request–response protocol used to transfer web resources (HTML pages, images, JSON) between a client (browser) and a web server. It runs over TCP, port 80 (HTTP/1.1 and HTTP/2); HTTPS is HTTP over TLS on port 443, and the newer HTTP/3 runs over QUIC on UDP port 443. HTTP is stateless: each request is independent (cookies or sessions add state). Common methods are GET, POST, PUT and DELETE; replies carry status codes such as 200 OK and 404 Not Found.
DNS (Domain Name System): a hierarchical, distributed naming system that translates human-readable domain names such as mygov.bd into IP addresses (A record for IPv4, AAAA for IPv6; other records include MX, NS and CNAME). Queries normally use UDP port 53; TCP port 53 is used for zone transfers and large replies.
Name hierarchy of mygov.bd: root (.) → top-level domain bd → second-level domain mygov (→ host www for www.mygov.bd).
How DNS resolves mygov.bd
sequenceDiagram
autonumber
participant C as Client browser and OS
participant R as Recursive resolver of the ISP
participant Root as Root name server
participant TLD as bd TLD name server
participant A as Authoritative name server of mygov.bd
participant W as Web server of mygov.bd
C->>R: Recursive query, A record of mygov.bd?
R->>R: Check cache, miss
R->>Root: Iterative query, mygov.bd?
Root-->>R: Referral to the bd name servers
R->>TLD: Iterative query, mygov.bd?
TLD-->>R: Referral to the name servers of mygov.bd
R->>A: Iterative query, A record of mygov.bd?
A-->>R: IP address, e.g. 203.0.113.10, with TTL
R-->>C: Answer, stored in cache for the TTL
C->>W: TCP or TLS connection, then HTTP GET request
W-->>C: HTTP 200 OK with the web page
Steps in words
- The browser and the operating system first look in their own DNS caches (and the hosts file).
- On a miss, the client sends a recursive query to the configured resolver (usually the ISP's): "give me the final answer".
- The resolver asks a root server, which does not know mygov.bd but refers it to the name servers of .bd.
- The .bd TLD server refers the resolver to the authoritative name servers of mygov.bd.
- The authoritative server returns the A record (IP address) with its TTL.
- The resolver caches the answer for the TTL and returns it to the client.
- The browser opens a TCP (or TLS) connection to that IP address and sends an HTTP GET request; the server replies with the page.
Steps 3–5 are iterative queries: each server returns either the answer or a referral, and the resolver does the chasing.
Caching example: if the A record of mygov.bd has a TTL of 3600 s, a second lookup 20 minutes later is answered straight from the resolver's cache; after the hour expires the resolver must ask the authoritative server again.
Exam tip: DNS lookup order: local cache → recursive resolver → root → TLD (.bd) → authoritative server → IP returned and cached by TTL. Only after that does HTTP begin.
(b) Differences between TCP and UDP
Both work at the transport layer and use port numbers for process-to-process delivery. TCP (Transmission Control Protocol) gives reliable, connection-oriented delivery; UDP (User Datagram Protocol) gives fast, connectionless, best-effort delivery.
| Basis | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented: 3-way handshake (SYN, SYN-ACK, ACK) before data, and connection release after | Connectionless: no setup, each datagram is sent independently |
| Reliability | Reliable: sequence numbers, acknowledgements, timeout and retransmission | Unreliable, best-effort: no ACK, no retransmission |
| Ordering | Delivers data in the order sent | No ordering; datagrams may arrive out of order |
| Flow control | Yes (sliding window, receiver's window size) | None |
| Congestion control | Yes (slow start, congestion avoidance) | None |
| Header size | 20–60 bytes | Fixed 8 bytes |
| Data unit | Byte stream, carried in segments | Independent messages (datagrams) |
| Speed and overhead | Slower, more overhead | Faster, lower delay |
| Broadcast / multicast | Not supported (one-to-one only) | Supported |
| Error handling | Checksum, and lost or damaged segments are resent | Checksum only; a damaged datagram is simply discarded |
| Typical uses (port) | HTTP 80, HTTPS 443, FTP 20/21, SMTP 25, SSH 22 | DNS 53, DHCP 67/68, SNMP 161, TFTP 69, VoIP, live streaming, online games |
Exam tip: choose TCP when every byte must arrive correctly (web, e-mail, file transfer); choose UDP when speed matters more than occasional loss (voice, video, DNS queries).
(c) Differences among Virus, Worm and Trojan horse
All three are malware (malicious software), but they differ in how they live and spread.
| Basis | Virus | Worm | Trojan horse |
|---|---|---|---|
| Definition | Malicious code that attaches itself to a host program or file and runs when the host runs | Stand-alone program that copies itself from computer to computer over a network | Malicious program disguised as useful or legitimate software |
| Needs a host file | Yes | No | No (it is itself the disguised program) |
| Self-replication | Yes (infects other files) | Yes (copies itself to other machines) | No |
| Needs user action to spread | Yes (running an infected file, sharing a USB drive) | No; spreads automatically through network vulnerabilities | Yes; the user is tricked into installing it |
| Spreading speed | Moderate | Fastest | Slow (one victim at a time) |
| Main harm | Corrupts, modifies or deletes files and programs | Eats bandwidth, memory and CPU; can carry a harmful payload | Opens a backdoor, steals data (passwords, bank details), gives remote control |
| Remote control by attacker | Not normally | Usually autonomous; some drop a backdoor | Common (remote-access Trojans) |
| Examples | CIH (Chernobyl), Melissa macro virus | Morris worm (1988), WannaCry (2017) | Zeus banking Trojan |
Protection: updated antivirus, prompt OS and software patches, a firewall, and never opening unknown attachments or installing software from untrusted sites.
Exam tip: virus = needs a host; worm = spreads by itself over the network; Trojan = disguise, does not replicate.
(d) Circuit switching, packet switching, topology and a BUS-topology lab LAN
1. Circuit switching
A dedicated physical path (circuit) is set up between sender and receiver before any data flows, and a fixed share of every link on that path (a time slot in TDM or a frequency band in FDM) stays reserved for the whole call. It has three phases: circuit setup → data transfer → circuit release (teardown). Example: the traditional telephone network (PSTN).
graph LR
A["Telephone A"] --- S1["Switch 1"]
S1 ==>|"reserved channel"| S2["Switch 2"]
S2 ==>|"reserved channel"| S3["Switch 3"]
S3 --- B["Telephone B"]
S1 -.- S4["Switch 4 (not used by this call)"]
S4 -.- S3
- Advantages: guaranteed bandwidth, constant delay after setup, data arrives in order.
- Disadvantages: setup delay; the reserved channel is wasted during silence; a new call is blocked when no circuit is free.
Worked example: a 640,000-bit file sent over a circuit that gets 1 of 24 TDM slots on a 1.536 Mbps link, with 0.5 s setup time. Circuit rate = 1.536 Mbps ÷ 24 = 64 kbps. Transfer time = 640,000 ÷ 64,000 = 10 s. Total = 0.5 + 10 = 10.5 s.
2. Packet switching
The message is divided into packets, each with a header holding the source and destination addresses and a sequence number. Each router uses store-and-forward: it receives the whole packet, checks it, and sends it on the best available link. No resources are reserved; links are shared by all users (statistical multiplexing).
- Datagram approach (connectionless, used by IP): each packet is routed independently, may take a different path and may arrive out of order; the receiver reorders them.
- Virtual-circuit approach (connection-oriented, e.g. X.25, Frame Relay, ATM): a logical path is set up first and all packets follow it.
graph LR
A["Sender A"] -->|"P1, P2, P3"| R1["Router R1"]
R1 -->|"P1, P3"| R2["Router R2"]
R1 -->|"P2"| R3["Router R3"]
R2 -->|"P1, P3"| R4["Router R4"]
R3 -->|"P2"| R4
R4 -->|"P2, P1, P3 arrive"| B["Receiver B: reorders to P1, P2, P3"]
| Basis | Circuit switching | Packet switching |
|---|---|---|
| Path | Dedicated, fixed for the whole session | Shared; datagrams may take different paths |
| Setup | Required before data | Not required (datagram) |
| Resource reservation | Yes | No |
| Bandwidth use | Wasted when idle | Efficient |
| Delay | Setup delay, then constant | Variable (queuing at routers), jitter |
| Order of data | Always in order | May arrive out of order |
| Under heavy load | New calls blocked | Packets delayed or dropped |
| Charging | Usually by time | Usually by data volume |
| Example | PSTN telephone | Internet (IP) |
3. Network topology
Topology is the arrangement of the nodes (computers, servers, printers, switches) and the links that connect them. Physical topology is the actual layout of cables and devices; logical topology is the path the data really follows.
| Topology | Arrangement |
|---|---|
| Bus | All nodes tap into one shared backbone cable |
| Star | Every node has its own link to a central hub or switch |
| Ring | Each node links to two neighbours, forming a closed loop |
| Mesh | Nodes are interconnected; full mesh of n nodes needs n(n − 1) ÷ 2 links |
| Tree | Star networks joined in a hierarchy |
| Hybrid | A mix of two or more of the above |
4. LAN design for a computer lab using BUS topology
Requirement (example): 20 student PCs, 1 file server (instructor PC), 1 network printer and Internet access, i.e. 23 devices including the router.
[T]===+=========+=========+=== ... ===+=========+=========+===[T]
| | | | | |
Server PC-01 PC-02 PC-20 Printer Router ---> ISP / Internet
[T] = 50-ohm terminator (one end grounded)
+ = BNC T-connector on each device's NIC
=== = single RG-58 thin-coaxial backbone (10BASE2), at most 185 m
Design steps:
- Backbone: lay one RG-58 thin coaxial cable (10BASE2 Ethernet, 10 Mbps) along the lab benches. A segment may be at most 185 m long and carry at most 30 devices; 23 devices fit in one segment.
- Connection of each device: every PC, the server, the printer and the router has an Ethernet NIC with a BNC port; a BNC T-connector joins the NIC directly to the backbone, with at least 0.5 m of cable between taps.
- Terminators: fit a 50-ohm terminator at both ends of the backbone (one end grounded) to absorb the signal and stop reflections. A missing terminator stops the whole network.
- Access method: all devices share the cable in one collision domain using CSMA/CD; a frame sent by one PC travels both ways along the bus and every NIC reads it, but only the addressed NIC keeps it.
- IP plan: network 192.168.10.0/24; router (default gateway) 192.168.10.1; file server 192.168.10.2; printer 192.168.10.3; PC-01 to PC-20 = 192.168.10.11 to 192.168.10.30; DNS server address given by the router or ISP.
- Expansion: for more than 30 devices or more than 185 m, add a repeater and a second segment, following the 5-4-3 rule (at most 5 segments, 4 repeaters, 3 populated segments).
Advantages: cheapest and least cable; easy to set up for a small lab; no central device needed.
Disadvantages: a single break in the backbone or a missing terminator takes the whole lab down; collisions rise as more PCs transmit; faults are hard to locate; only 10 Mbps is shared by all.
Exam tip: in a bus design always show the single backbone, a tap or T-connector for every node and a terminator at both ends; this is what distinguishes it from a star (central hub or switch).
(a) What are the types of Agent in AI and write their tasks.
(b) Discuss adversarial search in AI with an example.
(c) What is overfitting in machine learning? How can we avoid overfitting in machine learning?
(d) Define supervised learning, unsupervised learning, and reinforcement learning. What are the purposes of using them?
(e) What is multiplexing in data communication? Write the differences between TDM and FDM.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Keep going with a free account · ফ্রি অ্যাকাউন্টে যা যা করতে পারবেন
7 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; OSI & TCP/IP Models, Sorting and Number Systems & Codes lead, with 1 each. OSI & TCP/IP Models is asked in 112 other papers too (2012–2026).
Its biggest topics · প্রধান টপিক
Questions in this paper, and how many of our other papers ask the topic
- OSI & TCP/IP Models Networking · 112 other papers, 2012–20261
- Sorting Algorithms · 59 other papers, 2013–20261
- Number Systems & Codes Digital Logic · 55 other papers, 2015–20261
- AI & Machine Learning Cloud & Emerging Tech · 49 other papers, 2017–20261
- Pointers, Arrays & Strings Programming · 44 other papers, 2016–20261
- Arrays & Linked Lists Data Structures · 38 other papers, 2017–20251
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 45th BCS Written (CSE-971), exam (2024)?
- 8 written questions.
- Which subjects were asked most in the 45th BCS Written (CSE-971), exam (2024)?
- Algorithms (1), Cloud & Emerging Tech (1) and Data Structures (1), out of 8 questions.
- When was the 45th BCS Written (CSE-971), exam held?
- On 31 January 2024.
- Where can I find the 45th BCS Written (CSE-971), exam (2024) question solution?
- On this page: 1 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