DUET CSE 2013-2014 - Previous Year
Reading mode — untimed, no attempt is recorded01.(a) Differentiate between an object and a class. [Object এবং class এর মধ্যে পার্থক্য নিরূপণ কর ।] (05)
Class হলো object-এর structure ও behavior-এর type definition; object হলো তার instance। যেমন class Student { ... }; একটি class এবং Student s;-এ s একটি object। Instance member data প্রতিটি object-এর জন্য পৃথক; static members class-এর মধ্যে shared।
01. (b)Mention the application areas of OOP. [OOP এর ব্যবহারের ক্ষেত্রগুলো উল্লেখ কর ।] (05)
- GUI ও event-driven applications
- Simulation ও modelling
- Games ও interactive systems
- Reusable libraries/frameworks
- Business/domain modelling
02.(a)Explain with an example, how object encapsulates data? [Object কিভাবে ডাটাকে এনক্যাপসুলেট করে তা উদাহরণের সাহায্যে ব্যাখ্যা কর। ] (04)
Encapsulation data ও associated methods-কে class-এ একত্র করে এবং access control দিয়ে implementation details আড়াল করে। নিচে private marks কেবল public methods দিয়ে ব্যবহার করা যায়।
#include <iostream>
class Student {
int marks = 0;
public:
void setMarks(int value) { marks = value; }
int getMarks() const { return marks; }
};
int main() {
Student s;
s.setMarks(85);
std::cout << s.getMarks() << '\n';
}
2. (b) Write a recursive program to find the nth term of the Fibonacci series in any structured programming language. [যেকোন স্ট্রাকচারড প্রোগ্রামিং ভাষায় Fibonacci সিরিজের n তম সংখ্যাটি খুঁজে বের করার recursive প্রোগ্রাম লিখ।] (06)
\[F_0=0,\quad F_1=1,\quad F_n=F_{n-1}+F_{n-2}\]
#include <stdio.h>
unsigned long long fib(unsigned int n) {
return n < 2 ? n : fib(n - 1) + fib(n - 2);
}
int main(void) {
int n;
if (scanf("%d", &n) != 1 || n < 0 || n > 40) return 1;
printf("%llu\n", fib((unsigned int)n));
return 0;
}এখানে indexing 0 থেকে। Simple recursion repeated calculation করে; বড় n-এর জন্য memoization ব্যবহার করা উচিত।
3. Given A = {1, 2, 3, 4}. Consider the following relation in A: R = {(1, 1), (2, 2), (2, 3), (3, 2), (4, 2), (4, 4)}. (a) Draw its (R's) directed graph (b) Is R (i) reflexive, (ii) symmetric, (iii) transitive or (iv) anti-symmetric? Explain reasons. [প্রদত্ত সেট A = {1, 2, 3, 4} এর রিলেশন R = {(1, 1), (2, 2), (2, 3), (3, 2), (4, 2), (4, 4)}। (a) ডাইরেক্টেড গ্রাফ অংকন কর (b) R কি (i) রিফ্লেক্সিভ, (ii) সিমেট্রিক (iii) ট্রানজিটিভ অথবা (iv) এন্টিসিমেন্ট্রিক? কারণ ব্যাখ্যা কর ।] (10)
Graph-এর directed edges: 1→1, 2→2, 2→3, 3→2, 4→2, 4→4।
| Property | সিদ্ধান্ত ও কারণ |
|---|---|
| Reflexive | না; (3,3) নেই |
| Symmetric | না; (4,2) আছে, (2,4) নেই |
| Transitive | না; (2,3),(3,2) আছে, কিন্তু (3,3) নেই via (3,2),(2,3) |
| Antisymmetric | না; (2,3),(3,2) আছে এবং 2 ≠ 3 |
04. (a) Briefly describe the basic data structure operations. [সংক্ষেপে মৌলিক ডাটা স্ট্রাকচার অপারেশনগুলো বর্ণনা কর ।] (05)
| Operation | কাজ |
|---|---|
| Traversal | সব element visit |
| Insertion | নতুন element যোগ |
| Deletion | Element বাদ |
| Search | নির্দিষ্ট element খোঁজা |
| Sort | নির্দিষ্ট order-এ সাজানো |
| Merge | দুই structure combine |
04. (b) Explain the types of linked lists. [Linked lists এর প্রকারভেদ আলোচনা কর ।] (05)
| Type | Links |
|---|---|
| Singly linked | Data ও next; শেষ next = NULL |
| Doubly linked | Previous এবং next |
| Circular singly linked | শেষ next প্রথম node |
| Circular doubly linked | শেষ next প্রথম node; প্রথম previous শেষ node |
05. (a) What are the main functions of database administrator? [ডাটাবেজ অ্যাডমিনিস্ট্রেটরের প্রধান কাজ কি কি?] (04)
- Schema ও physical storage design
- User/role permission ও security
- Integrity constraints
- Backup, restore ও disaster recovery
- Performance tuning ও monitoring
- Availability, capacity ও upgrade management
05. (b) What does SQL mean? Classify mapping cardinalities for a binary relationship set with examples. [SQL এর অর্থ কি? উদাহরণসহ একটি বাইনারি রিলেশনশিপ সেটের ম্যাপিং কার্ডিনালিটির শ্রেণিবিন্যাস কর । ] (06)
SQL = Structured Query Language। Mapping cardinality বোঝায় একটি entity-এর সঙ্গে অপর set-এর কত entity সম্পর্কিত হতে পারে।
| Type | উদাহরণ |
|---|---|
| One-to-one | এক country-এর একটি capital, model-এর assumptions সাপেক্ষে |
| One-to-many | এক department-এ বহু employee |
| Many-to-one | বহু employee-এর একটি department |
| Many-to-many | বহু student বহু course নেয় |
06. (a) Define system. State the key elements of system. [সিস্টেমের সংজ্ঞা দাও। সিস্টেমের মূল উপাদানগুলো লিখ ।] (05)
System হলো নির্দিষ্ট লক্ষ্য অর্জনে পরস্পর-সম্পর্কযুক্ত উপাদানের সমষ্টি।
- Input
- Processing
- Output
- Control ও feedback
- Boundary, environment ও interface
06. (b) Mention the steps of system development life cycle (SDLC). [SDLC এর ধাপগুলো লিখ ।] (05)
SDLC = System Development Life Cycle।
- Planning ও feasibility
- Requirements analysis
- Design
- Implementation
- Testing
- Deployment
- Maintenance
07. (a) What is the purpose of system calls? [সিস্টেম কল এর প্রয়োজনীয়তা কি?] (02)
System call user program-কে kernel-এর controlled interface দেয়। File/I/O, process, memory ও communication service চাইতে application system call করে; এতে privileged operations protection বজায় রেখে সম্পন্ন হয়।
07. (b) What is deadlock? Write the necessary conditions for deadlock. (08) [Deadlock কি? Deadlock এর প্রয়োজনীয় শর্তগুলো লিখ ।]
Deadlock-এ process-গুলোর একটি set একে অন্যের resource/event-এর জন্য অনির্দিষ্টকাল অপেক্ষা করে। প্রয়োজনীয় চার শর্ত:
- Mutual exclusion
- Hold and wait
- No preemption
- Circular wait
08. (a) How many instructions does \(\mathbf{8086\,}\mathbf{\mu}\text{P}\) have? Mention five data transfer instructions with their meaning. \(\mathbf{8086\,}\mathbf{\mu}\text{P}\) এ কতগুলো ইন্সট্রাকশন আছে? অর্থ সহকারে পাঁচটি ডাটা ট্রান্সফার ইন্সট্রাকশন উল্লেখ কর ।] (06)
সাধারণ textbook classification-এ 8086-এর 117টি basic instruction বলা হয়; aliases ও encodings গণনার পদ্ধতিতে সংখ্যা বদলাতে পারে।
| 8086 instruction | কাজ |
|---|---|
| MOV | Source থেকে destination-এ byte/word copy |
| PUSH | Word stack-এ রাখা |
| POP | Stack থেকে word নেওয়া |
| XCHG | দুই operand-এর value exchange |
| LEA | Memory operand-এর effective offset address নেওয়া |
MVI, LDA, STA ও LXI হলো 8085 mnemonics; 8086-এর তালিকায় এগুলো দেওয়া ভুল।
08. (b)Describe the flag register of \(\mathbf{8086\,}\mathbf{\mu}\text{P}\). ( \(\mathbf{8086\,}\mathbf{\mu}\text{P}\) এর ফ্ল্যাগ রেজিস্টার বর্ণনা কর ।) (04)
8086-এ একটি 16-bit FLAGS register আছে; এর 9টি flag সক্রিয়।
| Flag | কাজ |
|---|---|
| CF | Unsigned carry/borrow |
| PF | ফলাফলের নিচের 8 বিটে even parity |
| AF | Bit 3 থেকে bit 4-এ carry/borrow |
| ZF | ফলাফল শূন্য |
| SF | ফলাফলের sign bit |
| OF | Signed arithmetic overflow |
| TF | Single-step execution |
| IF | Maskable interrupt enable |
| DF | String operation-এর দিক: 0 হলে বৃদ্ধি, 1 হলে হ্রাস |
09. Identify the several layers of TCP/IP model and explain the protocols in transport layer. [TCP/IP মডেলের বিভিন্ন লেয়ারগুলো দেখাও এবং ট্রান্সপোর্ট লেয়ারের প্রোটোকলগুলো বর্ণনা কর ।] (10)
TCP/IP স্তর: Application → Transport → Internet → Link।
| TCP | UDP |
|---|---|
| Connection-oriented byte stream | Connectionless datagrams |
| Reliable, ordered delivery | Delivery/order guarantee নেই |
| Retransmission, flow ও congestion control | কম protocol overhead; application প্রয়োজনমতো reliability যোগ করে |
| File transfer, reliable application traffic | DNS queries, real-time media, games |
10.Design full adder circuit using NAND gates only. [শুধুমাত্র NAND gate ব্যবহার করে full adder সার্কিট ডিজাইন কর।] (10)
\[S=A\oplus B\oplus C_{in},\qquad C_{out}=AB+C_{in}(A\oplus B)\]
| A | B | Cin | S | Cout |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
নিচের 9টি two-input NAND connection পূর্ণ circuit নির্ধারণ করে:
| Gate | Connection |
|---|---|
| n1 | NAND(A,B) |
| n2 | NAND(A,n1) |
| n3 | NAND(B,n1) |
| P | NAND(n2,n3) |
| n4 | NAND(P,Cin) |
| n5 | NAND(P,n4) |
| n6 | NAND(Cin,n4) |
| S | NAND(n5,n6) |
| Cout | NAND(n1,n4) |
11. (a) Differentiate between FET and BJT. [FET ও BJT এর মধ্যে পার্থক্য লিখ।] (05)
| FET/JFET | BJT |
|---|---|
| Majority-carrier device | Bipolar carrier conduction |
| Gate voltage channel নিয়ন্ত্রণ করে | Base-emitter voltage ও base current-এর সঙ্গে collector current সম্পর্কিত |
| সাধারণত high input impedance | সাধারণত lower input impedance |
| Gate, drain, source | Base, collector, emitter |
Noise, gain এবং efficiency circuit ও device-এর ওপর নির্ভর করে; সব ক্ষেত্রে এক ধরনের device শ্রেষ্ঠ নয়।
11. (b) JFET প্রয়োগ গুলি লিখ। (05)
- High-input-impedance amplifier
- Source-follower buffer
- Analog switch
- Voltage-controlled resistor, উপযুক্ত operating region-এ
- Constant-current source
12. (a) From the circuit given below answer the following questions: [নিম্নের সার্কিট থেকে নীচের প্রশ্নগুলোর উত্তর লিখ।] (04)

(i) How many nodes exist in the circuit? [সার্কিটটিতে কতগুলো নোড আছে?]
(ii) How many branches exist in the circuit? [সার্কিটটিতে কতগুলো ব্রাঞ্চ আছে?]
(iii) How many loops exist in the circuit? [সার্কিটটিতে কতগুলো লুপ আছে?]
(iv) How many equations would be needed to determine the current being drawn from the power supply V1 [V1 এর মধ্য দিয়ে কি পরিমাণে তড়িৎ প্রবাহিত হচ্ছে তা বের করতে কতগুলো সমীকরণের দরকার হবে?]
প্রতি two-terminal element-কে branch ধরে: 5 resistor + 2 source = 7 branches। V2 ও middle resistor-এর junction-সহ মোট 5 nodes।
\[L=B-N+1=7-5+1=3\]
3টি independent mesh equation দিয়ে সমাধান করা যায়। Ideal voltage-source constraints ব্যবহার করে nodal analysis-এ 2টি independent unknown-node equation-ও যথেষ্ট; তাই equation count পদ্ধতির ওপর নির্ভরশীল।
12. (b) If a parallel combination of \(\mathbf{4\,}\mathbf{\Omega}\) and another unknown resistor are connected across a 12 V supply, where the total current is 5 A. Determine the value of unknown resistor. \(\mathbf{4\,}\mathbf{\Omega}\) এর একটি ও অজানা মানের আর একটি রোধকে সমান্তরালে সংযুক্ত করে 12 V সাপ্লাইয়ের সাথে যুক্ত করা হলে মোট 5A বিদ্যুৎ প্রবাহিত হয়। অজানা রোধের মান বের কর।] (06)

\[I_4=12/4=3\,\mathrm A,\quad I_R=5-3=2\,\mathrm A\]
\[R=12/2=\boxed{6\,\Omega}\]
(i) What is the output of the following code? [নিম্নের কোডের আউটপুট কি?]
int sum, i;
sum = 0;
for (i = 0; i < 5; i++)
if (i%3 == 1)
sum = sum + i;
else
sum = sum + 1;
printf ("%d", sum);- a. 5
- b. 6
- c. 7
- d. 8
i = 0,1,2,3,4-এ যোগ হয় 1,1,1,1,4; sum = 8।
(ii) Which functions(s) will every class contain? [কোন ফাংশন/ফাংশনগুলো প্রতিটি class এ থাকে?]
- a. constructor
- b. destructor
- c. both (a) and (b)
- d. none of the above
C++ class-এ constructor ও destructor থাকে; প্রয়োজন অনুযায়ী compiler implicit declaration দেয়।
(iii) If X and Y be the sets then the set \(\left( \mathbf{X - Y} \right)\mathbf{\cup}\left( \mathbf{Y - X} \right)\mathbf{\cup}\left( \mathbf{X}\mathbf{\cap}\mathbf{Y} \right)\) is equal to ----- [যদি X এবং Y সেট হয় তবে \(\left( \mathbf{X - Y} \right)\mathbf{\cup}\left( \mathbf{Y - X} \right)\mathbf{\cup}\left( \mathbf{X}\mathbf{\cap}\mathbf{Y} \right)\) এই সেটের মান হবে -----]
- a. \(X\cup Y\)
- b. \(X^c\cup Y\)
- c. \(X\cap Y\)
- d. \(X^c\cap Y\)
তিন disjoint অংশ একত্রে X union Y।
(iv) What is the probability of getting a sum of 9 from two throws of a dice? [একটি ডাইস দুইবার ছুঁড়লে তাদের সমষ্টি 9 হওয়ার সম্ভাবনা কত?]
- a. \(1/8\)
- b. \(1/9\)
- c. \(1/6\)
- d. \(1/12\)
অনুকূল জোড়া (3,6),(4,5),(5,4),(6,3): 4/36 = 1/9।
(v) The binary code of \(\left( \mathbf{21.125} \right)_{\mathbf{10}}\) is ----- [ \(\left( \mathbf{21.125} \right)_{\mathbf{10}}\) এর বাইনারি -----]
- a. 10101.001
- b. 10101.010
- c. 10100.001
- d. 10100.111
21 = 10101 এবং 0.125 = 0.001 binary।
(vi) In a R-L-C series circuit, resonant frequency is ----- [R-L-C সিরিজ সার্কিটে রেজোন্যান্ট ফ্রিকোয়েন্সি -----]
- a. \(f_{r} = 2\pi\sqrt{\text{LC}}\)
- b. \(f_{r} = \frac{1}{2\pi\sqrt{\text{LC}}}\)
- c. \(f_{r} = 2\pi f\)
- d. none of the above
\(f_r=1/(2\pi\sqrt{LC})\)।
(vii) A table column that contains values that are primary key values in another table is ----- [একটি টেবিলের কলাম যা অন্য টেবিলের প্রাইমারী কি ধারণ করে তা -----]
- a. primary key
- b. candidate key
- c. foreign key
- d. unique key
অন্য relation-এর referenced key-কে নির্দেশ করে foreign key।
(viii) In the relational mode, cardinality is termed as ----- [রিলেশনাল মোডে কার্ডিনালিটি দ্বারা বোঝায় -----]
- a. number of attributes
- b. number of tuples
- c. number of tables
- d. number of constraints
Cardinality = tuple/row count; degree = attribute count।
(ix) Router operates in which layer of OSI reference model ----- [OSI রেফারেন্স মডেলের কোন লেয়ারে রাউটার কাজ করে -----]
- a. layer 4 (Transport layer)
- b. Layer 3 (Network layer)
- c. layer 1 (Physical layer)
- d. layer 7 (Application layer)
Router network layer (layer 3)-এ IP routing করে।
(x) Black box testing sometimes called ----- [কখনও কখনও ব্ল্যাক বক্স টেস্টিংকে ----- বলা হয়]
- a. data flow testing
- b. behavioral testing
- c. loop testing
- d. graph based testing
Black-box testing externally visible behavior পরীক্ষা করে।
(xi) Which module gives control of the CPU to the process selected by the short-term scheduler? [শর্ট-টার্ম সিডিউলার দ্বারা নির্ধারিত কোন মডিউলটি CPU এর নিয়ন্ত্রণ প্রসেসকে প্রদান করে?]
- a. dispatcher
- b. interrupt
- c. scheduler
- d. none of the above
Dispatcher CPU control হস্তান্তর করে।
(xii) Method of transmission in which transmission takes place in both directions, but only one direction at a time, is called ----- [যে ট্রান্সমিশন পদ্ধতিতে উভয় দিকে ট্রান্সমিশন হয়, কিন্তু একই সময়ে শুধু একদিকেই হয় তাকে বলে -----]
- a. simplex
- b. four wire circuit
- c. full duplex
- d. half duplex
দুইদিকে যায়, একসঙ্গে নয়: half duplex।
(xiii) ‘Siemens’ or Mho ($\mho$) is the unit of ----- [‘Siemens’ অথবা Mho ($\mho$) কার ইউনিট -----]
- a. conductance
- b. admittance
- c. both (a) and (b)
- d. None of the above
Conductance এবং admittance উভয়ের SI unit siemens।
(xiv) Two bulbs marked 200 watts-250 V and 100 watts-250 V are connected in series to 250 V supply. The consumed power by the circuit is ----- [200 watts-250 V ও 100 watts-250 V চিহ্নিত দুইটি বাল্ব 250 V সাপ্লাইয়ের সাথে সিরিজে সংযুক্ত করা হয়েছে। সার্কিটটি মোট পাওয়ার গ্রহণ করবে -----]
- a. 33 watts
- b. 200 watts
- c. 300 watts
- d. 67 watts
\(R_1=250^2/200=312.5\,\Omega, R_2=625\,\Omega; P=250^2/937.5\approx66.67\,\mathrm W\)।
(xv) Physical memory is broken into fixed-sized blocks are called ----- [Physical মেমোরির নির্দিষ্ট আকারের বিভক্ত block কে বলে -----]
- a. frames
- b. pages
- c. backing store
- d. None of the above
Physical memory blocks = frames।