Your next chapter starts hereExplore admission guide

DUET CSE 2011-2012 - Previous Year

Reading mode — untimed, no attempt is recorded
Back
Question 1a Programming Source ambiguity: see solution note

1. (a) Find out the output from the given module of program. [নিম্নে C প্রোগ্রামিং এর একটি অংশ দেওয়া হল, অংশটি থেকে আউটপুট এর মান কি কি হবে বের কর?]

void main ()
{
int a, b, c, d;
a = 15;
b = 10;
c = ++a-b;
printf(“a=%d b=%d c=%d\n”, a, b, c);
d = b ++ + a;
printf(“a=%d b=%d d=%d\n”, a, b, d);
printf(“a/b=%d\n”, a%b);
printf(a%%b=%d\n”, a%b);
printf(“a*=b=%d\n”,a*=b);
printf(“%d\n”,(c>d)? 1:0);
printf(“%d\n”, (c<d)? 1;0);
}
Solution

Printed program-এ string quotes নেই এবং শেষ ternary-তে colon-এর বদলে semicolon আছে; তাই মূল code compile হয় না। Quotes ও ternary ঠিক করলে, এবং source-এর a%b expression অপরিবর্তিত রাখলে:

a = 16 b = 10 c = 6
a = 16 b = 11 d = 26
a/b = 5
a%b = 5
a*=b = 176
0
1

তৃতীয় line-এর label a/b হলেও calculation a%b; সত্যিই a/b করলে integer result 1।

Question 1b Programming

1. (b) Write a program in C language to print the first 10 fibonacci number using recursion function. [রিকারসন ফাংশন ব্যবহার করে প্রথম 10 টি fibonacci number প্রিন্ট করার জন্য C ভাষায় একটি প্রোগ্রাম লিখ।]

Solution
#include <stdio.h>

unsigned int fib(unsigned int n) {
    return n < 2 ? n : fib(n - 1) + fib(n - 2);
}

int main(void) {
    for (unsigned int i = 0; i < 10; ++i)
        printf("%u%c", fib(i), i == 9 ? '\n' : ' ');
    return 0;
}

Output: 0 1 1 2 3 5 8 13 21 34

Question 2a Programming

2. (a) What are the main features of OOP? [OOP এর প্রধান বৈশিষ্ট্যগুলো কি?]

Solution
  1. Encapsulation: data ও methods একই class-এ রাখা এবং access control।
  2. Abstraction: প্রয়োজনীয় interface প্রকাশ, implementation লুকানো।
  3. Inheritance: base class থেকে behaviour reuse/extend।
  4. Polymorphism: একই interface দিয়ে বিভিন্ন implementation।

Class, object এবং message/method call OOP-এর মৌলিক ধারণা।

Question 2b Programming

(b) Distinguish between static binding and dynamic binding. [Static binding এবং dynamic binding এর মধ্যে পার্থক্য কর।]

Solution
Static bindingDynamic binding
Compile-time-এ function নির্বাচনRun-time object type অনুযায়ী নির্বাচন
উদাহরণ: overload, non-virtual memberউদাহরণ: virtual function override
Declared type/argument type গুরুত্বপূর্ণBase reference/pointer দিয়ে derived virtual method call
Question 3a Historical: Discrete Mathematics

3. (a) Suppose A and B are sets and $|\text{A}| = 140$, $|\text{B}| = 90$.

(i) Find $|\text{A} \cup \text{B}|$ given that $|\text{A} \cap \text{B}| = 36$. (ii) Find $|\text{A} \cap \text{B}|$ given that $|\text{A} \cup \text{B}| = 150$.

[মনে কর, A ও B একটি সেট এবং $|\text{A}| = 140$, $|\text{B}| = 90$। (i) যদি $|\text{A} \cap \text{B}| = 36$ হয় তাহলে $|\text{A} \cup \text{B}|$ এর মান নির্ণয় কর। (ii) যদি $|\text{A} \cup \text{B}| = 150$ হয় তাহলে $|\text{A} \cap \text{B}|$ এর মান নির্ণয় কর।]

Solution

\[|A\cup B|=|A|+|B|-|A\cap B|\]

\[\text{(i)}\quad|A\cup B|=140+90-36=194\]

\[\text{(ii)}\quad|A\cap B|=140+90-150=80\]

Question 3b Historical: Discrete Mathematics

3. (b) How many strings of three decimal digits are possible? If the string (i) do not contain the same digit three times (ii) begin with an odd digit (iii) have exactly three digits that are 9s. [তিন দশমিক সংখ্যার কতগুলো স্ট্রিং হবে যদি...]

(Top left text continues from the previous page's sub-questions)

[(i) একই অংক তিনবার না ধারণ করে (ii) বিজোড় অংক দ্বারা শুরু হয় (iii) তিনটি অংকেই 9 আছে।]

Solution

String-এ leading zero অনুমোদিত। প্রতিটি অবস্থানে 10টি digit।

\[N=10^3=1000\]

  1. তিন digit একই নয়: \(1000-10=990\)।
  2. Odd digit দিয়ে শুরু: \(5\times10\times10=500\)।
  3. ঠিক তিনটি 9 আছে: শুধু 999, অর্থাৎ 1টি।
Question 4a Data Structure

4. (a) Which data structure is used to perform recursion and why? [কোন ডাটা স্ট্রাকচার রিকারশন সম্পন্ন করতে ব্যবহার করা হয় এবং কেন?]

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 4b Data Structure

4. (b) Compare link list with array. Give an algorithm for adding a new node at the end of single-linked-list. [লিংকড্ লিস্ট ও অ্যারের তুলনা কর। Single-linked-list এর শেষে একটি নতুন নোড যুক্ত করার অ্যালগরিদম লিখ।]

Solution
ArraySingly linked list
Contiguous storageNodes pointer দিয়ে যুক্ত
Indexed access O(1)Indexed access O(n)
Middle insertion O(n)Known predecessor থাকলে insertion O(1)
কম per-element overheadপ্রতি node-এ next pointer লাগে
append(head, value):
    node = new Node(value, null)
    if head == null: return node
    current = head
    while current.next != null:
        current = current.next
    current.next = node
    return head

Tail pointer রাখলে append O(1), না থাকলে O(n)।

Question 5 Database Management

5. What is Weak Entity set? State the disadvantage of conventional file processing system. [Weak Entity set বলতে কি বুঝ? প্রচলিত File processing system এর অসুবিধাগুলো লিখ।]

Solution

Weak entity-এর নিজস্ব পূর্ণ key নেই; owner entity-এর key এবং partial key মিলে তাকে শনাক্ত করে। উদাহরণ: Employee(ID)-এর Dependent(Name), key = (ID, Name)।

  1. File system-এ data duplication ও inconsistency।
  2. Data isolation ও ad-hoc access কঠিন।
  3. Integrity ও security policy ছড়িয়ে থাকে।
  4. Concurrent update, atomicity ও recovery সামলানো কঠিন।
Question 6a Historical: Software Development

6. (a) What is software reuse? Mention the various aspects of software reuse. [সফটওয়্যার এর পুনঃব্যবহার বলতে কি বুঝ? সফটওয়্যার পুনঃব্যবহারের বিভিন্ন উপায়গুলো উল্লেখ কর।]

Solution

Software reuse হলো আগে তৈরি asset নতুন system-এ ব্যবহার করা।

  1. Code/function/library ও component reuse।
  2. Framework/service বা সম্পূর্ণ application reuse।
  3. Requirements, architecture/design pattern, test ও documentation reuse।

Reuse-এর আগে compatibility, quality, licensing ও maintenance যাচাই করতে হয়।

Question 6b Historical: Software Development

6. (b) Classify information system on the basis of implementation. Mention the five phases of system development tasks. [বাস্তবায়নের ভিত্তিতে ইনফরমেশন সিস্টেম এর শ্রেণীবিন্যাস কর। সিস্টেম উন্নয়ন কার্যনির্বাহে পাঁচটি পর্যায় উল্লেখ কর।]

Solution

Implementation অনুযায়ী information system manual, computer-based এবং hybrid হতে পারে। Computer-based system-এর কাজভিত্তিক শ্রেণি: TPS, MIS, DSS, EIS/ESS ও OAS।

  1. Planning ও feasibility
  2. Analysis
  3. Design
  4. Implementation ও testing
  5. Operation ও maintenance
Question 7a Operating System

7. (a) When does page fault occur? Describe the action taken by the operating system when a page fault occurs. [কখন পেজ ফল্ট সংঘটিত হয়? অপারেটিং সিস্টেমে গৃহীত কাজগুলির বর্ণনা দাও যখন একটি পেজ ফল্ট ঘটে।]

Solution

Process যে virtual page access করছে তার valid mapping থাকলেও page RAM-এ না থাকলে demand-paging page fault হয়। Invalid access-ও fault তুলতে পারে।

  1. CPU trap করে OS handler-এ যায়।
  2. OS address ও permission যাচাই করে; invalid হলে process-কে error দেয়।
  3. Free frame নেয় অথবা victim page নির্বাচন করে; dirty হলে backing store-এ লেখে।
  4. প্রয়োজনীয় page disk থেকে frame-এ আনে।
  5. Page table/TLB update করে interrupted instruction পুনরায় চালায়।
Question 7b Computer Fundamentals

7. (b) What are sector and track of a disk?

[একটি ডিস্কের সেক্টর ও ট্র্যাক কি কি?]

Solution

Track হলো magnetic disk surface-এর concentric circular recording path। Sector হলো track-এর একটি subdivision, যেখানে নির্দিষ্ট পরিমাণ data রাখা হয়। একটি track-এ একাধিক sector থাকে।

Question 8a Microprocessor & Microcomputer

8. (a) Mention the name of the flags of 8086 microprocessor.

[8086 মাইক্রোপ্রসেসরের ফ্ল্যাগগুলির নাম উল্লেখ কর।]

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 Microprocessor & Microcomputer

8. (a) Give examples of 8/16/32 bit microprocessor. Why is 8086 microprocessor called a 16 bit microprocessor?

[8/16/32 বিট মাইক্রোপ্রসেসরের উদাহরণ দাও। 8086 মাইক্রোপ্রসেসরকে 16-বিট মাইক্রোপ্রসেসর বলা হয় কেন?]

Solution
Word sizeউদাহরণ
8-bitIntel 8085
16-bitIntel 8086
32-bitIntel 80386

8086-এর ALU ও প্রধান general-purpose registers 16-bit; তাই এটি 16-bit processor। Address bus 20-bit হলেও processor word size 20-bit হয় না।

Question 9 Data Communication & Computer Network

9. Differentiate between bit rate and baud rate. What are 10Base2, 10Base5 and 10BaseT Ethernet LANs?

[Bit rate এবং baud rate এর মধ্যে পার্থক্যগুলি লিখ। 10Base2, 10Base5 এবং 10BaseT Ethernet LAN বলতে কি বুঝ?]

Solution

Bit rate: প্রতি second-এ bit সংখ্যা। Baud rate: প্রতি second-এ symbol সংখ্যা।

\[R_b=R_s\log_2M\]

Mটি সমান bit-length-এর symbol থাকলে এই সম্পর্ক প্রযোজ্য।

StandardMediaSpeedMaximum segment
10BASE2Thin coaxial10 Mbit/s185 m
10BASE5Thick coaxial10 Mbit/s500 m
10BASE-TTwisted pair10 Mbit/s100 m
Question 10 Data Communication & Computer Network

10. What is propagation delay? Write the use of Infrared Communication.

[Propagation delay কাকে বলে? Infrared Communication এর ব্যবহার লিখ।]

Solution

\[t_p=d/v\]

Propagation delay হলো signal-এর medium ধরে sender থেকে receiver পর্যন্ত পৌঁছানোর সময়; d দূরত্ব, v propagation speed। এটি packet transmission time L/R থেকে আলাদা।

  1. Infrared remote control।
  2. স্বল্প দূরত্বের line-of-sight device communication।
  3. Optical sensing ও proximity detection।
Question 11 Digital Electronics

11. Simplify the following Boolean expression: $Y = (\bar{A} + B)(A + B)$

[$Y = (\bar{A} + B)(A + B)$ বুলিয়ন সমীকরণকে সরলীকরণ কর।]

Solution

\[Y=(\bar A+B)(A+B)=B+\bar A A=\boxed B\]

Question 12a Digital Electronics

12. (a) Draw an electronic circuit equivalent to NOT gate.

[NOT গেটের ফাংশন সম্পাদনকারী একটি সমতুল্য ইলেকট্রনিক সার্কিট অংকন কর।]

Solution

NPN transistor-এর emitter ground, collector load/resistor দিয়ে VCC-তে এবং base input resistor RB দিয়ে চালাও; output collector থেকে নাও।

InputStateOutput
LowCutoff, IC ≈ 0High, VO ≈ VCC
High, যথেষ্ট base currentSaturationLow, VO ≈ VCE(sat)

\[R_B\approx\frac{V_{in,H}-0.7}{I_B}\]

Forced β দিয়ে যথেষ্ট base current বেছে নিতে হয়। এই circuit switching inverter/NOT gate হিসেবে কাজ করে; inductive load হলে flyback diode প্রয়োজন।

inverter switch
Question 12b Digital Electronics

12. (b) The base current and the emitter current of a transistor are $0.08\text{ mA}$ and $9.6\text{ mA}$. Calculate $\alpha_{dc}$ and $\beta_{dc}$.

[একটি ট্রানজিস্টরের বেজ কারেন্ট 0.08 mA ও এমিটার কারেন্ট 9.6 mA হলে $\alpha_{dc}$ ও $\beta_{dc}$ এর মান বের কর।]

Solution

\[I_C=I_E-I_B=9.6-0.08=9.52\,\mathrm{mA}\]

\[\alpha_{dc}=\frac{I_C}{I_E}=\frac{9.52}{9.6}\approx0.9917,\qquad\beta_{dc}=\frac{I_C}{I_B}=\frac{9.52}{0.08}=119\]

Question 13 Basic Electricity Incomplete source data

13. Find (a) current flowing in branch AF and (b) voltage across branch CD from the circuit given below.

[নিম্নের সার্কিট হতে (a) AF ব্রাঞ্চের কারেন্ট ও (b) CD ব্রাঞ্চের ভোল্টেজ এর মান বের কর।]

(Circuit diagram showing a resistor network with a 24V source)

Solution

মূল চিত্র/ডেটা অসম্পূর্ণ: এই document-এ নির্ভরযোগ্য original circuit image ও সম্পূর্ণ সংযোগ নেই। তাই একক numerical answer নিশ্চিত করা যাচ্ছে না।

Supply voltage, labelled branches ও resistor connections নিশ্চিত করে node voltages বের করো।

\[I_{ij}=\frac{V_i-V_j}{R_{ij}},\qquad V_{CD}=V_C-V_D\]

Source solution-এ ধরে নেওয়া voltage বা branch numbering যাচাই ছাড়া numerical answer প্রকাশ করা হয়নি।

Question 14.1 Programming

(i) How many times the program will print “Admission Test”? [নীচের প্রোগ্রামটি কতবার “Admission Test” প্রিন্ট করবে?]

# include <stdio.h>
int main ()
{
printf ("Admission Test");
main ();
return 0;
}
  • a. infinite times
  • b. 32767 times
  • c. 65535 times
  • d. till stack doesn’t overflow
Solution

C-তে main recursion-এর base case নেই; বাস্তবে resource/stack exhaustion পর্যন্ত চলতে পারে। নির্দিষ্ট print count নিশ্চিত নয়; C++-এ main call অনুমোদিত নয়।

Question 14.2 Programming Source ambiguity: see solution note

ii. int x = sizeof(!5.856). What will be the value of variable x? [int x = sizeof(!5.856) হলে x এর মান কত হবে?]

  1. 2
  2. 4
  3. 5
  4. 6
Solution

C-তে ! expression-এর type int, তাই sizeof(int), সাধারণত 4; standard নির্দিষ্ট byte count দেয় না। C++-এ result bool এবং sizeof(bool) implementation-dependent।

Question 14.3 Historical: Discrete Mathematics

iii. 4 blue and 6 red marbles are in a jar. If you draw 2 marbles out of the jar, what is the probability that you get one of each color? [একটি জারে ৪ টি নীল ও ৬ টি লাল মার্বেল আছে। যদি তুমি উক্ত জার হতে ২ টি মার্বেল তোল তাহলে প্রত্যেকটি রঙ এর মার্বেল ওঠার সম্ভাবনা কত?]

  • a. 4/15
  • b. 1/8
  • c. 8/15
  • d. 1/24
Solution

\(P=\binom41\binom61/\binom{10}2=24/45=8/15\)।

Question 14.4 Digital Electronics

iv. What is the 2’s compliment representation of -24 in a 16-bit microcomputer? [16-bit microcomputer এ -24 এর 2’s compliment কত হবে?]

  • a. 4/15
  • b. 1/8
  • c. 1111 1111 1110 1000
  • d. 1/24
Solution

24 = 0000 0000 0001 1000; invert + 1 = 1111 1111 1110 1000।

Question 14.5 Microprocessor & Microcomputer

v. A 32 bit address bus allows access to memory of capacity ----- [একটি 32-বিট address bus এর মেমোরী ক্যাপাসিটি -----]

  • a. 64 Mb
  • b. 16 Mb
  • c. 1 Gb
  • d. 4 Gb
Solution

Byte-addressable হলে \(2^{32}\) bytes = 4 GiB; Gb নয়।

Question 14.6 Digital Electronics

vi. Which relation is correct in case of transistor’s current gain? [ট্রানজিস্টরের কারেন্ট গেইন এর ক্ষেত্রে কোন সম্পর্কটি সত্য?]

  • a. $\alpha = \beta / (1 + \beta)$
  • b. $\alpha = \beta(1 + \beta)/\beta$
  • c. $\alpha = \gamma / (1 + \gamma)$
  • d. $\alpha = (1 + \gamma)/\gamma$
Solution

\(\alpha=I_C/I_E=\beta/(1+\beta)\)।

Question 14.7 Digital Electronics Source ambiguity: see solution note

vii. The simplification of the Boolean expression $\overline{\overline{ABC} + \overline{ABC}}$ is: [$\overline{\overline{ABC} + \overline{ABC}}$ এর সরলীকরণ হচ্ছে : ]

  1. 0 ($\sqrt{}$
  2. 1
  3. A
  4. BC
Solution

প্রদত্ত expression অনুযায়ী \(\overline{\overline{ABC}+\overline{ABC}}=ABC\)। কোনো option মেলে না; source-এর পরের expression ভিন্ন।

Question 14.8 Basic Electricity Source ambiguity: see solution note

viii. What is the equivalent resistance between terminal A and B of the following circuit? [নীচের সার্কিট A এবং B টারমিনালের সমতুল্য রেজিস্ট্যান্স কত হবে?] (Continuation of question viii from the previous page) (Circuit diagram showing terminals A and B connected to a bridge-like network of resistors with values $6\ \Omega$, $4\ \Omega$, $8\ \Omega$, and $2\ \Omega$, crossing between nodes C and D)

  1. $2\ \Omega$
  2. $6\ \Omega$
  3. $4\ \Omega$
  4. $8\ \Omega$
Solution

সঠিক resistor connection diagram অনুপস্থিত। শুধু resistor values থেকে equivalent resistance নিশ্চিত করা যায় না।

Question 14.9 Operating System

ix. FIFO scheduling is ----- [FIFO সিডিউলিং হলো -----]

  • a. preemptive scheduling
  • b. non preemptive scheduling
  • c. deadline scheduling
  • d. fair share scheduling
Solution

FCFS/FIFO CPU scheduling non-preemptive।

Question 14.10 Data Communication & Computer Network

x. With an IP address of 201.142.23.12, what will be the default subnet mask? [[201.142.23.12 IP address – এর subnet mask কত হবে?]

  • a. 0.0.0.0
  • b. 255.0.0.0
  • c. 255.255.0.0
  • d. 255.255.255.0
Solution

পুরনো classful convention-এ 201.* Class C: 255.255.255.0।