Your next chapter starts hereExplore admission guide

DUET CSE 2017-2018 - Previous Year

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

01. (a) Write down a program in C language that takes three sides of a triangle as input and determine whether they from a valid triangle or not. [C language- এ একটি প্রোগ্রাম লিখ যা ত্রিভুজের তিনটি বাহু ইনপুট হিসাবে নিবে এবং ওই বাহু তিনটি দ্বারা সঠিক ত্রিভুজ গঠিত হবে কিনা তা নির্ধারণ করবে।] (08)

Solution
#include <stdio.h>

int main(void) {
    double a, b, c;
    if (scanf("%lf%lf%lf", &a, &b, &c) != 3) return 1;
    int valid = a > 0 && b > 0 && c > 0
        && a + b > c && a + c > b && b + c > a;
    puts(valid ? "Valid triangle" : "Invalid triangle");
    return 0;
}
Question 1b Programming

01. (b) Write down the difference between local and global variable in C language? [C language- এ লোকাল এবং গ্লোবাল ভেরিয়েবলের মধ্যকার পার্থক্য লিখ।] (06)

Solution
LocalGlobal
Block/function-এর ভিতরে declaredFunction-এর বাইরে file scope-এ declared
Scope enclosing blockDeclaration visible এমন scope-এ ব্যবহারযোগ্য
Automatic local সাধারণত block শেষ হলে শেষ হয়; static local টিকে থাকেStatic storage duration: program চলাকালীন টিকে থাকে
Explicit initializer না থাকা automatic local-এর value indeterminateUninitialized global zero-initialized
Question 2a Historical: Discrete Mathematics

02. (a) Suppose a coin is flipped three times. What is the probability of getting a tail twice and a head once? [একটি মুদ্রাকে তিনবার নিক্ষেপ করা হল। দুই বার টেইল ও একবার হেড পাওয়ার সম্ভাবনা কত?] (07)

Solution

Fair ও independent coin toss ধরে favorable ফল HTT, THT, TTH।

\[P=\binom32(1/2)^3=\boxed{3/8}\]

Question 2b Historical: Discrete Mathematics

(b) Define tautology. Prove that \(\left( \left( \mathbf{A}\mathbf{\rightarrow}\mathbf{B} \right)\mathbf{\land}\mathbf{A} \right)\mathbf{\rightarrow}\mathbf{B}\) is a tautology using a truth table. [Tautology এর সংজ্ঞা দাও। Truth table দ্বারা প্রমাণ কর যে, \(\left( \left( \mathbf{A}\mathbf{\rightarrow}\mathbf{B} \right)\mathbf{\land}\mathbf{A} \right)\mathbf{\rightarrow}\mathbf{B}\) একটি tautology।] (07)

Solution

সকল truth assignment-এ সত্য compound proposition হলো tautology।

ABA → B(A → B) ∧ A((A → B) ∧ A) → B
FFTFT
FTTFT
TFFFT
TTTTT
Question 3a Data Structure

03. (a) Briefly explain stack data structure with an example. [Stack ডাটা-স্ট্রাকচার উদাহরণসহ সংক্ষেপে ব্যাখ্যা কর।] (06)

Solution

Stack হলো LIFO data structure। Push top-এ যোগ করে, pop top থেকে সরায়। Recursion-এ প্রতিটি call-এর return address, arguments ও local context সংরক্ষিত হয়; সর্বশেষ call প্রথমে return করে।

push(10): [10]
push(20): [10, 20] <- top
pop(): returns 20; stack = [10]
Question 3b Data Structure

(b) What are the advantages and disadvantages of binary search algorithm? [বাইনারি সার্চ অ্যালগরিদম এর সুবিধা- অসুবিধা গুলো কি কি?] (08)

Solution

Binary search sorted random-access sequence-এর search interval প্রতি ধাপে অর্ধেক করে।

  1. Average/worst-case time \(O(\log n)\); best case \(O(1)\)।
  2. Iterative implementation-এ extra space \(O(1)\)।
  3. ডেটা sorted রাখতে হয়; sorting/update-এর খরচ থাকে।
  4. Linked list-এ middle access সরাসরি হয় না, তাই array-এর মতো সুবিধা পাওয়া যায় না।
Question 4a Database Management

04. (a) Write down the SQL command to find a student named “Bob” and his mother’s name is “Alice” from the “Student Info” table. [“Student Info” টেবিল হতে একটি ছাত্র খুঁজে বের করার জন্য SQL কমান্ডটি লিখ যার নাম “Bob” এবং যার মায়ের নাম “Alice”।] (07)

Solution

Column নাম source-এ নির্দিষ্ট নেই; student_namemother_name ধরে standard SQL:

SELECT *
FROM "Student Info"
WHERE student_name = 'Bob'
  AND mother_name = 'Alice';
Question 4b Database Management

(b) What are the advantages of relational database system over traditional file system? [গতানুগতিক ফাইল সিস্টেম অপেক্ষা রিলেশনাল ডাটাবেস সিস্টেমের সুবিধাগুলি কি কি?] (07)

Solution
  1. নিয়ন্ত্রিত redundancy ও consistency।
  2. Constraints দিয়ে data integrity।
  3. Authorization ও access control।
  4. Transactions ও concurrent access।
  5. Backup এবং crash recovery।
  6. Data independence ও SQL query।
Question 5a Historical: Software Development

05. (a) Mention the phases of SDLC. Which techniques are used for system design? [SDLC এর ধাপগুলো উল্লেখ কর। সিস্টেম ডিজাইনে কোন কোন টেকনিক ব্যবহৃত হয়?] (08)

Solution

SDLC = System Development Life Cycle।

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

System-design techniques: structured design/DFD, ER modelling, UML class/sequence diagrams, modular design এবং prototyping।

Question 5b Historical: Software Development

(b) Define and classify the feasibility study. [ফিজিবিলিটি স্টাডি এর সংজ্ঞা এবং শ্রেণিভেদ লিখ।] (06)

Solution

Feasibility study নির্ধারণ করে প্রকল্পটি বাস্তবায়নযোগ্য ও উপযোগী কি না।

Typeপ্রশ্ন
Technicalপ্রয়োজনীয় technology/skills আছে?
EconomicBenefit কি cost justify করে?
OperationalUsers/organisation গ্রহণ ও চালাতে পারবে?
Scheduleসময়সীমায় করা যাবে?
Legalআইন ও contractual requirements পূরণ করবে?
Question 6a Operating System

06. (a) What is throughput, turnaround time, waiting time, and response time? [Throughput, turnaround time, waiting time এবং response time বলতে কি বুঝ?] (08)

Solution
Metricসংজ্ঞা
Throughputপ্রতি unit time-এ completed process সংখ্যা
Turnaround timeCompletion time − arrival time
Waiting timeReady queue-এ মোট অপেক্ষা
Response timeপ্রথম CPU service/response time − arrival time
Question 6b Operating System

06. (b) Write down the data structure of Process Control Block (PCB). [প্রসেস কন্ট্রোল ব্লক (PCB)-এর ডাটা স্ট্রাকচার লিখ।] (06)

Solution
  1. Process identifier (PID)
  2. Process state
  3. Program counter
  4. CPU registers ও saved context
  5. Scheduling information: priority, queue links
  6. Memory information: page/segment tables
  7. I/O status ও open files
  8. Accounting ও ownership information
Question 7a Computer Fundamentals

07. (a) What is cache memory? What do you understand by dual core processor? [Cache memory কি? Dual core processor বলতে কি বুঝ?] (06)

Solution

Cache হলো CPU-এর কাছে থাকা ছোট ও দ্রুত memory, যেখানে সম্প্রতি/ঘন ঘন ব্যবহৃত data এবং instruction রাখা হয়; এতে average memory-access time কমে।

Dual-core processor-এ একই chip/package-এ দুটি processing core থাকে। Parallel task execution সম্ভব; single-thread program স্বয়ংক্রিয়ভাবে দ্বিগুণ দ্রুত হয় না।

Question 7b Microprocessor & Microcomputer

(b) Briefly describe the flag register of 8086 processor. [সংক্ষেপে 8086 প্রসেসর এর ফ্ল্যাগ রেজিস্টারগুলো বর্ণনা কর।] (08)

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 8a Data Communication & Computer Network

08. (a) Briefly describe two well known data transport protocols provided by the internet transport layer, and indicate what type of application might use that service. [Internet transport layer এর বহুল প্রচলিত দুটি data transport protocol- এর সংক্ষিপ্ত বিবরণ দাও এবং তা কোন ধরণের application- এ ব্যবহৃত হয়ে থাকে, তা লিখ।] (08)

Solution
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 8b Data Communication & Computer Network

(b) What are the topologies used in computer networking? [কম্পিউটার নেটওয়ার্কে কি কি টপোলজি ব্যবহৃত হয়?] (06)

Solution
  1. Bus: shared backbone।
  2. Star: central switch/hub-এর সঙ্গে পৃথক link।
  3. Ring: cyclic neighbour connection।
  4. Mesh: একাধিক/সব node pair-এর connection।
  5. Tree: hierarchical structure।
  6. Hybrid: একাধিক topology-এর সমন্বয়।
Question 9a Digital Electronics

09. (a) Express the Boolean function F = A + B'C as a standard sum of minterms. [ $F = A + B'C$ Boolean function- টি standard sum of minterm- এ প্রকাশ কর।] (06)

Solution

\[F=A+\bar BC=\bar A\bar BC+A\bar B\bar C+A\bar BC+AB\bar C+ABC\]

\[\boxed{F=\sum m(1,4,5,6,7)}\]

Variable order A,B,C; A most significant bit।

Question 9b Historical: Electrical Machines

(b) A 200V d.c. shunt motor running at 1000 rpm takes an armature current of 17.5A. It is required to reduce the speed to 600 rpm. What must be the value of resistance to be inserted in the armature circuit if the original armature resistance is 0.4$\Omega$? Take armature current to be constant during this process. [1000 rpm এ চলন্ত একটি 200V d.c. সান্ট মোটর 17.5 A আর্মেচার কারেন্ট গ্রহণ করে। এটির গতি কমিয়ে 600 rpm করতে হবে। যদি মূল আর্মেচার রেজিস্ট্যান্স 0.4Ωহয় তবে আর্মেচার সার্কিটে অতিরিক্ত কত রেজিস্ট্যান্স যুক্ত করতে হবে? এই প্রক্রিয়া চলাকালীন সময়ে আর্মেচার কারেন্ট constant থাকবে।] (08)

Solution

\[E_1=200-17.5(0.4)=193\,\mathrm V,\quad E_2=193(600/1000)=115.8\,\mathrm V\]

\[R_{total}=\frac{200-115.8}{17.5}=4.81143\,\Omega,\quad R_{added}=\boxed{4.41143\,\Omega}\]

Shunt flux ও armature current অপরিবর্তিত ধরে।

Question 10.1 Programming

i) What will be the value of x after executing the following statements? [নিম্নলিখিত statement সমূহ execute করার পরে x এর মান কি হবে?] int x = 25, y = 13; x = (x < y) ? (x + y) : (x - y);

  • a. 25
  • b. 38
  • c. 12
  • d. 13
Solution

25 < 13 false; x = 25 - 13 = 12।

Question 10.2 Programming

ii) When you pass an array as an argument to a function, what is actually passed? [যখন তুমি কোন array- কে ফাংশনের argument হিসাবে pass করবে, তখন প্রকৃতপক্ষে কি pass হবে?]

  • a. All the elements of the array
  • b. The first element of the array
  • c. Address of the first element of the array
  • d. Address of the last element of the array
Solution

সাধারণ array argument first element-এর pointer-এ convert হয়।

Question 10.3 Data Structure

iii) In how many steps would the binary search algorithm be halted if it were to search for the value 17, in the set S = {2, 3, 5, 7, 11, 13, 17, 19, 23}? [Binary search algorithm কতগুলি ধাপে শেষ হবে যদি 17- এর জন্য S সেটে অনুসন্ধান করা হয়, যেখানে সেট S = {2, 3, 5, 7, 11, 13, 17, 19, 23}?]

  • a. one
  • b. two
  • c. three
  • d. four
Solution

11 তারপর 17: 2 comparison।

Question 10.4 Data Structure

iv) A graph G is called a ______, if it is a connected acyclic graph. [একটি গ্রাফ G যদি সংযুক্ত ও এসাইক্লিক হয় তবে তাকে ______ বলে?]

  • a. cyclic graph
  • b. regular graph
  • c. tree
  • d. planar graph
Solution

Connected acyclic undirected graph হলো tree।

Question 10.5 Database Management

v) The term ______ is used to refer to a table row. [টেবিলের row চিহ্নিত করার জন্য ______ ব্যবহৃত হয়।]

  • a. attribute
  • b. tuple
  • c. field
  • d. instance
Solution

Tuple হলো relation-এর row।

Question 10.6 Historical: Software Development

vi) Which model shows the sequence of activities in the process along with their inputs, outputs, and dependencies? [কোন মডেলটি ইনপুট, আউটপুট, এবং ডিপেন্ডেন্সিস এর সাথে তার প্রসেসে ধারা প্রদর্শন করে?]

  • a. Data flow model
  • b. Workflow model
  • c. Role/Action model
  • d. Activity model
Solution

Workflow model activities-এর sequence এবং dependencies দেখায়; data-flow model মূলত data movement দেখায়।

Question 10.7 Operating System

vii) Physical memory is broken into fixed-sized blocks called ______. [Physical মেমোরীর নির্দিষ্ট আকারের বিভক্ত ব্লককে ______ বলে।]

  • a. frames
  • b. pages
  • c. backing store
  • d. none of these
Solution

Physical frame, logical page।

Question 10.8 Operating System

viii) With paging there is no ______ fragmentation. [Paging এ কোন ______ fragmentation নেই।]

  • a. internal
  • b. external
  • c. either type of
  • d. none of these
Solution

Paging external fragmentation দূর করে; internal fragmentation থাকতে পারে।

Question 10.9 Microprocessor & Microcomputer

ix) Which of the following instructions is not valid? [নিম্নের কোন ইন্সট্রাকশন টি সঠিক নয়?]

  • a. MOV AX, BX
  • b. MOV DS, 5000H
  • c. MOV AX, 5000H
  • d. PUSH AX
Solution

Segment register-এ immediate সরাসরি MOV করা যায় না; আগে general register-এ নিতে হয়।

Question 10.10 Data Communication & Computer Network

x) ______ Which layer of OSI model perform the encryption/decryption? [OSI model এর কোন layer-টি encryption বা decryption করে?]

  • a. Network layer
  • b. Presentation layer
  • c. Application layer
  • d. Data Link layer
Solution

OSI presentation layer data representation/encryption-এর দায়িত্ব বর্ণনা করে।

Question 10.11 Computer Fundamentals

xi) ______ is used to store BIOS programs? [BIOS প্রোগ্রাম সংরক্ষণ করতে ______ ব্যবহৃত হয়।]

  • a. ROM chips
  • b. CMOS storage
  • c. Hard disk
  • d. MOSFET
Solution

BIOS firmware nonvolatile ROM/flash memory-তে থাকে।

Question 10.12 Basic Electricity

xii) Two resistance of 100 Ω and zero Ω are connected in parallel. The overall resistance will be ______. [100 Ω এবং zero $\Omega$ এর দুটি রেজিস্টেন্স সমান্তরালে সংযুক্ত থাকলে মোট রেজিস্টেন্স ______ হবে।]

  • a. 100 Ω
  • b. 50Ω
  • c. 25 Ω
  • d. zero Ω
Solution

Ideal zero-ohm parallel branch short circuit তৈরি করে; equivalent resistance zero।