Your next chapter starts hereExplore admission guide

DUET CSE 2006-2007 - Previous Year

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

1. (a) Write a program in C language to read data from the keyboard, write it in a file called “INPUT” again read the same data from the “INPUT’ file and display it on the screen. [সি ভাষায় একটি প্রোগ্রাম লিখ যা কি বোর্ড থেকে ডাটা পড়বে এবং INPUT নামে একটি ফাইলে লিখবে এবং পুনরায় INPUT নামের ফাইল থেকে পড়বে এবং স্ক্রীনে প্রদর্শন করবে।]

Solution

একটি line keyboard থেকে পড়ে INPUT ফাইলে লিখে আবার file থেকে দেখানো:

#include <stdio.h>

int main(void) {
    char data[1024];
    if (!fgets(data, sizeof data, stdin)) return 1;
    FILE *fp = fopen("INPUT", "w");
    if (!fp) { perror("INPUT"); return 1; }
    if (fputs(data, fp) == EOF) { fclose(fp); return 1; }
    if (fclose(fp) != 0) return 1;
    fp = fopen("INPUT", "r");
    if (!fp) { perror("INPUT"); return 1; }
    int ch;
    while ((ch = fgetc(fp)) != EOF) putchar(ch);
    int failed = ferror(fp);
    fclose(fp);
    return failed ? 1 : 0;
}
Question 1b Programming Source ambiguity: see solution note

1. (b) How many keywords are there in C++ programming language? Mention at least six keywords. [সি++ প্রোগ্রামিং ল্যাঙ্গুয়েজে কতটি কী ওয়ার্ড আছে? কমপক্ষে ০৬ টি কীওয়ার্ডের নাম উল্লেখ কর।] (07)

Solution

C++ keyword count language-standard version অনুযায়ী বদলায়; version ছাড়া একটিমাত্র সংখ্যা নির্ভুল নয়। ছয়টি keyword: class, public, private, protected, virtual, return। এগুলো case-sensitive reserved words।

Question 2a Historical: Discrete Mathematics

2. (a) Let B = {a, b, c, d, e, f, g, h} and A = {a, b, c, k, e}. Find (i) A $\cup$ B (ii) A $\cap$ B (iii) A - B (iv) B - A [ধর, B = {a, b, c, d, e, f, g, h} এবং A = {a, b, c, k, e} বাহির কর (i) A$\cup$B (ii) A$\cap$B (iii) A - B (iv) B - A] (04)

Solution

\[A\cup B=\{a,b,c,d,e,f,g,h,k\}\]

\[A\cap B=\{a,b,c,e\}\]

\[A-B=\{k\},\qquad B-A=\{d,f,g,h\}\]

Question 2b Historical: Discrete Mathematics

2. (b) If we roll a what be will be the probability of getting a number divisible by 2 or 3. [আমরা যদি একটি ছক্কা নিক্ষেপ করি তাহলে উপরের পিঠে ২ অথবা ৩ দ্বারা বিভাজ্য সংখ্যা পাওয়ার সম্ভবতা কত?]

Solution

\[E=\{2,3,4,6\},\qquad P(E)=\frac46=\boxed{\frac23}\]

Fair six-sided die ধরা হয়েছে; 6-কে একবারই গণনা করা হয়।

Question 3 Data Structure

3. Consider a linear array AAA (5:50), BBB (-5:10) and CCC (18), suppose base (AAA) = 300 and the number of words per memory cell is 4 for AAA. a) Find the number of elements in each array b) The address of AAA (15), AAA (35) and AAA [55] [(AAA (5:50). BBB(-5:10) এবং CCC (18) & ধর বেইস (AAA) = 300 এবং AAA এর জন্য মেমোরি সেলের ওয়ার্ড সংখ্যা 4 (চার) (a) প্রত্যেক এ্যারের এলিমেন্ট সংখ্যা বের কর। (b) AAA [15], AAA [35] এবং AAA [55] এর এড্রেস বের কর। (14)

Solution

\[N_{AAA}=50-5+1=46,\quad N_{BBB}=10-(-5)+1=16,\quad N_{CCC}=18\]

\[\operatorname{LOC}(AAA[k])=300+4(k-5)\]

\[\operatorname{LOC}(AAA[15])=340,\quad\operatorname{LOC}(AAA[35])=420\]

AAA[55] invalid: declared upper bound 50। Formula-এ 500 পাওয়া গেলেও সেটি array-এর বৈধ element address নয়।

Question 4a Database Management

4. (a) What is database ? Define primary key with example. (ডাটাবেস বলতে কি বুঝায়। Primary Key উদাহরণসহ সংজ্ঞায়িত কর।)

Solution

Database হলো সংগঠিত সম্পর্কিত data-এর collection। Primary key প্রতিটি row-কে uniquely চিহ্নিত করে; এটি unique এবং NOT NULL। উদাহরণ: Student(StudentID, Name)-এ StudentID primary key।

Question 4b Database Management

4. (b) Write six components of an E-R diagram. [E-R ডায়াগ্রামের ছয়টি কম্পোনেন্টের নাম লিখ।] (06)

Solution
ComponentChen notation
EntityRectangle
Weak entityDouble rectangle
RelationshipDiamond
AttributeOval
Key attributeUnderlined attribute name
Multivalued attributeDouble oval
Question 5a Database Management

5. (a) What are the advantages of database management system? [ডাটাবেস ম্যানেজমেন্ট সিস্টেমের সুবিধাগুলি লিখ।] (04)

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 5b Database Management

5. (b) What is meant by data query? Mention the names of different types of query? [ডাটাকুয়েরী বলতে কি বুঝায়? বিভিন্ন ধরণের কুয়েরীর নাম উল্লেখ কর।] (09)

Solution

Query হলো database থেকে data চাওয়া বা data পরিবর্তনের নির্দেশ।

  1. SELECT/retrieval query।
  2. Parameter query।
  3. Aggregate/summary ও crosstab query।
  4. Action queries: INSERT, UPDATE, DELETE।

Query-builder product অনুযায়ী type-এর নাম ভিন্ন হতে পারে।

Question 6 Historical: Software Development

6. What are the different information system development methodologies? Write the phases of system development life cycles (SDLC). [বিভিন্ন ইনফরমেশন সিস্টেম ডেভেলপমেন্ট মেথোডোলজিগুলো কি কি? সিস্টেম ডেভেলপমেন্ট লাইফ সাইকেলের ফেজগুলো লিখ।] (13)

Solution

Development methodologies: waterfall, iterative/incremental, prototyping, spiral, agile।

  1. Planning ও feasibility।
  2. Requirements analysis।
  3. System design।
  4. Implementation।
  5. Testing।
  6. Deployment।
  7. Operation ও maintenance।
Question 7 Historical: Software Development

7. Define top-down design, Mention has advantages of top-down design. [টপ-ডাউন ডিজাইনের সংজ্ঞা দাও। টপ-ডাউন ডিজাইন এর সুবিধাগুলো উল্লেখ কর।] (13)

Solution

Top-down design-এ বড় সমস্যাকে ছোট module/subproblem-এ ভাগ করা হয়; প্রতিটি module-কে আরও বিশদ করা হয় যতক্ষণ সরাসরি implement করা যায়।

  1. Complexity কমে।
  2. Interface ও দায়িত্ব পরিষ্কার হয়।
  3. Module আলাদাভাবে test ও maintain করা যায়।
  4. Team-এর মধ্যে কাজ ভাগ করা সহজ।
Question 8a Operating System

8 (a). What is meant by operating system? What are the major goals of an operating system? Write the main components of operating system. [অপারেটিং সিস্টেম বলতে কি বুঝ? অপারেটিং সিস্টেম এর প্রধান উদ্দেশ্যগুলো কি? অপারেটিং সিস্টেমের প্রধান কম্পোনেন্ট গুলো লিখ।]

Solution

Operating system hardware resources পরিচালনা করে এবং application-কে services দেয়। লক্ষ্য: convenience, efficient resource use, reliability ও protection।

  1. Process management ও CPU scheduling।
  2. Memory management।
  3. File এবং storage management।
  4. Device/I/O management।
  5. Security/protection।
  6. System-call interface ও user interface।
Question 8b Operating System

8. (b) Write five types of operating system used for personal computer. [Personal Computer- এ ব্যবহৃত পাঁচ প্রকার অপারেটিং সিস্টেম এর নাম লিখ।]

Solution

Personal computer operating-system উদাহরণ: Microsoft Windows, macOS, GNU/Linux, FreeBSD এবং ঐতিহাসিক MS-DOS। এগুলো উদাহরণ, বর্তমান version বা ব্যবহারের recommendation নয়।

Question 9 Operating System

9. What are the services provided in LINUX by the following commands? i) pwd, ii) mkdir, iii) ls -a iv) cat v) cp vi) mv [নিম্নলিখিত কমান্ডগুলো লিনাক্স এ কি কি কাজ করে? i) pwd ii) mkdir iii) ls –a iv) cat v) cp vi) mv] (12)

Solution
Commandকাজ
pwdCurrent working directory-এর path
mkdirDirectory তৈরি
ls -aDotfile-সহ সব directory entry দেখানো
catFile content concatenate করে standard output-এ লেখা
cpFile copy; directory-এর জন্য recursive option
mvFile/directory move বা rename
Question 10a Microprocessor & Microcomputer

10 (a). On what basis a microprocessor is considered as 8-bit, 10-bit or a 32 bit device. [কিসের উপর ভিত্তি করে মাইক্রোপ্রসেসরকে 8-bit, 10-bit এবং 32 bit মাইক্রোপ্রসেসর বলা হয়।] (04)

Solution

Processor bitness মূলত native integer register/ALU word width দিয়ে বোঝানো হয়। 8-bit processor স্বাভাবিকভাবে 8-bit data operation করে; 16-bit ও 32-bit-এর জন্য একই ধারণা। External data/address bus width আলাদা হতে পারে। প্রশ্নের 10-bit শব্দটি অস্বাভাবিক; 16-bit বোঝালে একই ব্যাখ্যা প্রযোজ্য।

Question 10b Microprocessor & Microcomputer

10. (b) Mention the addressing mode of 8085 microprocessor with example of each [উদাহরণ 8085 মাইক্রোপ্রসেসরের অ্যাড্রেসিং মোডগুলো উল্লেখ কর।] (10)

Solution
Addressing mode8085 example
ImmediateMVI A, 25H
RegisterMOV A, B
DirectLDA 2050H
Register indirectMOV A, M (HL points to memory)
Implied/implicitCMA
Question 11 Data Communication & Computer Network

11. What the layers of the OSI and TCP/IP reference models. [OSI এবং TCP/IP রেফারেন্স মডেলের স্তরগুলো কি কি?]

Solution
OSI (উপর থেকে নিচে)মূল কাজ
ApplicationApplication-level network service
PresentationData representation, encoding, encryption
SessionSession/dialog coordination
TransportEnd-to-end process delivery, ports
NetworkLogical addressing ও routing
Data linkFraming, MAC addressing, media access, error detection
PhysicalMedium-এ bits/signals পাঠানো

TCP/IP-এর 4 স্তর: Application, Transport, Internet, Link। Application-এ OSI-এর উপরের তিন স্তর, Link-এ নিচের দুই স্তর একত্রে ধরা হয়।

Question 12 Data Communication & Computer Network

12. Distinguish between LAN (Local Area Network) and WAN (Wide Area Network) (LAN এবং WAN এর মধ্যে পার্থক্য কর।)

Solution
Networkপরিসরসাধারণ বৈশিষ্ট্য
LANRoom/building/campusসীমিত area, সাধারণত এক প্রতিষ্ঠানের নিয়ন্ত্রণ
MANCity/metropolitan areaএকাধিক LAN সংযোগ
WANRegion/country/worldদূরবর্তী network যুক্ত; carrier infrastructure ব্যবহার হতে পারে
Question 13a Digital Electronics

13 (a) Convert the following numbers of decimal numbers. [নিম্নলিখিত সংখ্যাগুলোকে ডেসিমাল সংখ্যায় রূপান্তরিত কর।] (06)

(i) $(1001101)_2$ \ \ \ \ \ \ (ii) $(A90)_{16}$

Solution

\[(1001101)_2=64+8+4+1=\boxed{77}_{10}\]

\[(A90)_{16}=10\times16^2+9\times16=\boxed{2704}_{10}\]

Question 13b Digital Electronics

13. (b) Simplify the expression $X = (\overline{A} + B)(A + B + D)\overline{D}$. After simplification draw a logic circuit. [$X = (\overline{A} + B)(A + B + D)\overline{D}$ সমীকরণটির সরলীকরণ কর। সরলীকরণের পরে উহার লজিক বর্তনীটি আঁক।]

Solution

\[X=(\bar A+B)(A+B+D)\bar D=(\bar A+B)(A+B)\bar D=\boxed{B\bar D}\]

Circuit: D-তে NOT gate, তারপর B এবং NOT D-কে AND gate-এ দাও।

Question 14 Digital Electronics

14. What is a semiconductor? Find the current through the diode in the circuit shown in figure, Assume the diode to be ideal. [সেমিকন্ডাক্টর বলতে কি বুঝায়? নিম্নোক্ত চিত্র হতে ডায়োডের মধ্যে দিয়ে তড়িৎ প্রবাহ বের কর। মনে কর, ডায়োডটি হবে আইডিয়াল।] (14)

(Circuit Diagram features a $V = 10\text{ V}$ DC source connected to a resistor $R_1 = 50\ \Omega$, leading to a parallel branch containing a resistor $R_2 = 5\ \Omega$ and an ideal diode $D$ pointing downwards between nodes A and B).

Solution

Semiconductor-এর conductivity conductor ও insulator-এর মাঝামাঝি; doping, temperature ও electric field দিয়ে নিয়ন্ত্রণ করা যায়। উদাহরণ silicon, germanium।

Source-এর circuit description-এ 10 V source, series 50 Ω, এরপর 5 Ω-এর parallel-এ forward-biased ideal diode। Diode short হিসেবে 5 Ω bypass করে।

\[I_D=10/50=\boxed{0.2\,\mathrm A},\quad I_{5\Omega}=0\]

Diode reverse-biased হলে এই ফল নয়: ID = 0।

Question 15 Basic Electricity Incomplete source data

15. Find the current $I_0, I_1$ and $I_2$ of the following circuit. [নিম্নের সার্কিটের জন্য $I_0, I_1$ এবং $I_2$ তড়িৎ প্রবাহ নির্ণয় কর।] (14)

(Circuit Diagram features a complex bridge network powered by an unspecified voltage source, labeled with multiple resistors: $R_1 = 4\ \Omega$, $R_2 = 6\ \Omega$, $R_3 = 20\ \Omega$, $R_4 = 10\ \Omega$, $R_5 = 20\ \Omega$, $R_6 = 15\ \Omega$, $R_7 = 18\ \Omega$, $R_8 = 13\ \Omega$, $R_9 = 10\ \Omega$).

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 প্রকাশ করা হয়নি।