Your next chapter starts hereExplore admission guide

DUET CSE 2013-2014 - Previous Year

Reading mode — untimed, no attempt is recorded
Back
Question 1a Programming

01.(a) Differentiate between an object and a class. [Object এবং class এর মধ্যে পার্থক্য নিরূপণ কর ।] (05)

Solution

Class হলো object-এর structure ও behavior-এর type definition; object হলো তার instance। যেমন class Student { ... }; একটি class এবং Student s;-এ s একটি object। Instance member data প্রতিটি object-এর জন্য পৃথক; static members class-এর মধ্যে shared।

Question 1b Programming

01. (b)Mention the application areas of OOP. [OOP এর ব্যবহারের ক্ষেত্রগুলো উল্লেখ কর ।] (05)

Solution
  1. GUI ও event-driven applications
  2. Simulation ও modelling
  3. Games ও interactive systems
  4. Reusable libraries/frameworks
  5. Business/domain modelling
Question 2a Programming

02.(a)Explain with an example, how object encapsulates data? [Object কিভাবে ডাটাকে এনক্যাপসুলেট করে তা উদাহরণের সাহায্যে ব্যাখ্যা কর। ] (04)

Solution

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';
}
Question 2b Programming

2. (b) Write a recursive program to find the nth term of the Fibonacci series in any structured programming language. [যেকোন স্ট্রাকচারড প্রোগ্রামিং ভাষায় Fibonacci সিরিজের n তম সংখ্যাটি খুঁজে বের করার recursive প্রোগ্রাম লিখ।] (06)

Solution

\[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 ব্যবহার করা উচিত।

Question 3 Historical: Discrete Mathematics

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)

Solution

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
Question 4a Data Structure

04. (a) Briefly describe the basic data structure operations. [সংক্ষেপে মৌলিক ডাটা স্ট্রাকচার অপারেশনগুলো বর্ণনা কর ।] (05)

Solution
Operationকাজ
Traversalসব element visit
Insertionনতুন element যোগ
DeletionElement বাদ
Searchনির্দিষ্ট element খোঁজা
Sortনির্দিষ্ট order-এ সাজানো
Mergeদুই structure combine
Question 4b Data Structure

04. (b) Explain the types of linked lists. [Linked lists এর প্রকারভেদ আলোচনা কর ।] (05)

Solution
TypeLinks
Singly linkedData ও next; শেষ next = NULL
Doubly linkedPrevious এবং next
Circular singly linkedশেষ next প্রথম node
Circular doubly linkedশেষ next প্রথম node; প্রথম previous শেষ node
Question 5a Database Management

05. (a) What are the main functions of database administrator? [ডাটাবেজ অ্যাডমিনিস্ট্রেটরের প্রধান কাজ কি কি?] (04)

Solution
  1. Schema ও physical storage design
  2. User/role permission ও security
  3. Integrity constraints
  4. Backup, restore ও disaster recovery
  5. Performance tuning ও monitoring
  6. Availability, capacity ও upgrade management
Question 5b Database Management

05. (b) What does SQL mean? Classify mapping cardinalities for a binary relationship set with examples. [SQL এর অর্থ কি? উদাহরণসহ একটি বাইনারি রিলেশনশিপ সেটের ম্যাপিং কার্ডিনালিটির শ্রেণিবিন্যাস কর । ] (06)

Solution

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 নেয়
Question 6a Historical: Software Development

06. (a) Define system. State the key elements of system. [সিস্টেমের সংজ্ঞা দাও। সিস্টেমের মূল উপাদানগুলো লিখ ।] (05)

Solution

System হলো নির্দিষ্ট লক্ষ্য অর্জনে পরস্পর-সম্পর্কযুক্ত উপাদানের সমষ্টি।

  1. Input
  2. Processing
  3. Output
  4. Control ও feedback
  5. Boundary, environment ও interface
Question 6b Historical: Software Development

06. (b) Mention the steps of system development life cycle (SDLC). [SDLC এর ধাপগুলো লিখ ।] (05)

Solution

SDLC = System Development Life Cycle।

  1. Planning ও feasibility
  2. Requirements analysis
  3. Design
  4. Implementation
  5. Testing
  6. Deployment
  7. Maintenance
Question 7a Operating System

07. (a) What is the purpose of system calls? [সিস্টেম কল এর প্রয়োজনীয়তা কি?] (02)

Solution

System call user program-কে kernel-এর controlled interface দেয়। File/I/O, process, memory ও communication service চাইতে application system call করে; এতে privileged operations protection বজায় রেখে সম্পন্ন হয়।

Question 7b Operating System

07. (b) What is deadlock? Write the necessary conditions for deadlock. (08) [Deadlock কি? Deadlock এর প্রয়োজনীয় শর্তগুলো লিখ ।]

Solution

Deadlock-এ process-গুলোর একটি set একে অন্যের resource/event-এর জন্য অনির্দিষ্টকাল অপেক্ষা করে। প্রয়োজনীয় চার শর্ত:

  1. Mutual exclusion
  2. Hold and wait
  3. No preemption
  4. Circular wait
Question 8a Microprocessor & Microcomputer

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)

Solution

সাধারণ textbook classification-এ 8086-এর 117টি basic instruction বলা হয়; aliases ও encodings গণনার পদ্ধতিতে সংখ্যা বদলাতে পারে।

8086 instructionকাজ
MOVSource থেকে destination-এ byte/word copy
PUSHWord stack-এ রাখা
POPStack থেকে word নেওয়া
XCHGদুই operand-এর value exchange
LEAMemory operand-এর effective offset address নেওয়া

MVI, LDA, STA ও LXI হলো 8085 mnemonics; 8086-এর তালিকায় এগুলো দেওয়া ভুল।

Question 8b Microprocessor & Microcomputer

08. (b)Describe the flag register of \(\mathbf{8086\,}\mathbf{\mu}\text{P}\). ( \(\mathbf{8086\,}\mathbf{\mu}\text{P}\) এর ফ্ল্যাগ রেজিস্টার বর্ণনা কর ।) (04)

Solution

8086-এ একটি 16-bit FLAGS register আছে; এর 9টি flag সক্রিয়।

Flagকাজ
CFUnsigned carry/borrow
PFফলাফলের নিচের 8 বিটে even parity
AFBit 3 থেকে bit 4-এ carry/borrow
ZFফলাফল শূন্য
SFফলাফলের sign bit
OFSigned arithmetic overflow
TFSingle-step execution
IFMaskable interrupt enable
DFString operation-এর দিক: 0 হলে বৃদ্ধি, 1 হলে হ্রাস
Question 9 Data Communication & Computer Network

09. Identify the several layers of TCP/IP model and explain the protocols in transport layer. [TCP/IP মডেলের বিভিন্ন লেয়ারগুলো দেখাও এবং ট্রান্সপোর্ট লেয়ারের প্রোটোকলগুলো বর্ণনা কর ।] (10)

Solution

TCP/IP স্তর: Application → Transport → Internet → Link।

TCPUDP
Connection-oriented byte streamConnectionless datagrams
Reliable, ordered deliveryDelivery/order guarantee নেই
Retransmission, flow ও congestion controlকম protocol overhead; application প্রয়োজনমতো reliability যোগ করে
File transfer, reliable application trafficDNS queries, real-time media, games
Question 10 Digital Electronics

10.Design full adder circuit using NAND gates only. [শুধুমাত্র NAND gate ব্যবহার করে full adder সার্কিট ডিজাইন কর।] (10)

Solution

\[S=A\oplus B\oplus C_{in},\qquad C_{out}=AB+C_{in}(A\oplus B)\]

ABCinSCout
00000
00110
01010
01101
10010
10101
11001
11111

নিচের 9টি two-input NAND connection পূর্ণ circuit নির্ধারণ করে:

GateConnection
n1NAND(A,B)
n2NAND(A,n1)
n3NAND(B,n1)
PNAND(n2,n3)
n4NAND(P,Cin)
n5NAND(P,n4)
n6NAND(Cin,n4)
SNAND(n5,n6)
CoutNAND(n1,n4)
nand full adder
Question 11a Digital Electronics

11. (a) Differentiate between FET and BJT. [FET ও BJT এর মধ্যে পার্থক্য লিখ।] (05)

Solution
FET/JFETBJT
Majority-carrier deviceBipolar carrier conduction
Gate voltage channel নিয়ন্ত্রণ করেBase-emitter voltage ও base current-এর সঙ্গে collector current সম্পর্কিত
সাধারণত high input impedanceসাধারণত lower input impedance
Gate, drain, sourceBase, collector, emitter

Noise, gain এবং efficiency circuit ও device-এর ওপর নির্ভর করে; সব ক্ষেত্রে এক ধরনের device শ্রেষ্ঠ নয়।

Question 11b Digital Electronics

11. (b) JFET প্রয়োগ গুলি লিখ। (05)

Solution
  1. High-input-impedance amplifier
  2. Source-follower buffer
  3. Analog switch
  4. Voltage-controlled resistor, উপযুক্ত operating region-এ
  5. Constant-current source
Question 12a Basic Electricity

12. (a) From the circuit given below answer the following questions: [নিম্নের সার্কিট থেকে নীচের প্রশ্নগুলোর উত্তর লিখ।] (04)

Question diagram

(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 এর মধ্য দিয়ে কি পরিমাণে তড়িৎ প্রবাহিত হচ্ছে তা বের করতে কতগুলো সমীকরণের দরকার হবে?]

Solution

প্রতি 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 পদ্ধতির ওপর নির্ভরশীল।

Question 12b Basic Electricity

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)

Question diagram

Solution

\[I_4=12/4=3\,\mathrm A,\quad I_R=5-3=2\,\mathrm A\]

\[R=12/2=\boxed{6\,\Omega}\]

Question 13.1 Programming

(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
Solution

i = 0,1,2,3,4-এ যোগ হয় 1,1,1,1,4; sum = 8।

Question 13.2 Programming

(ii) Which functions(s) will every class contain? [কোন ফাংশন/ফাংশনগুলো প্রতিটি class এ থাকে?]

  • a. constructor
  • b. destructor
  • c. both (a) and (b)
  • d. none of the above
Solution

C++ class-এ constructor ও destructor থাকে; প্রয়োজন অনুযায়ী compiler implicit declaration দেয়।

Question 13.3 Historical: Discrete Mathematics

(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\)
Solution

তিন disjoint অংশ একত্রে X union Y।

Question 13.4 Historical: Discrete Mathematics

(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\)
Solution

অনুকূল জোড়া (3,6),(4,5),(5,4),(6,3): 4/36 = 1/9।

Question 13.5 Digital Electronics

(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
Solution

21 = 10101 এবং 0.125 = 0.001 binary।

Question 13.6 Basic Electricity

(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
Solution

\(f_r=1/(2\pi\sqrt{LC})\)।

Question 13.7 Database Management

(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
Solution

অন্য relation-এর referenced key-কে নির্দেশ করে foreign key।

Question 13.8 Database Management

(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
Solution

Cardinality = tuple/row count; degree = attribute count।

Question 13.9 Data Communication & Computer Network

(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)
Solution

Router network layer (layer 3)-এ IP routing করে।

Question 13.10 Historical: Software Development

(x) Black box testing sometimes called ----- [কখনও কখনও ব্ল্যাক বক্স টেস্টিংকে ----- বলা হয়]

  • a. data flow testing
  • b. behavioral testing
  • c. loop testing
  • d. graph based testing
Solution

Black-box testing externally visible behavior পরীক্ষা করে।

Question 13.11 Operating System

(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
Solution

Dispatcher CPU control হস্তান্তর করে।

Question 13.12 Data Communication & Computer Network

(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
Solution

দুইদিকে যায়, একসঙ্গে নয়: half duplex।

Question 13.13 Basic Electricity

(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
Solution

Conductance এবং admittance উভয়ের SI unit siemens।

Question 13.14 Basic Electricity

(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
Solution

\(R_1=250^2/200=312.5\,\Omega, R_2=625\,\Omega; P=250^2/937.5\approx66.67\,\mathrm W\)।

Question 13.15 Operating System

(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
Solution

Physical memory blocks = frames।