Previous Year Questions
Admission syllabusComputer Science and Engineering
430 questions15. 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$).
Incomplete source data
Answer & 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 প্রকাশ করা হয়নি।
1. (a) Write a program using C/C++ language to find the smallest number from an Array containing integer numbers [C/C++ ল্যাঙ্গুয়েজ ব্যবহার করে n সংখ্যক integer সম্বলিত Array থেকে সবচেয়ে ছোট সংখ্যা বের করার প্রোগ্রাম লিখ।] (14)
Answer & solution / উত্তর ও সমাধান
#include <stdio.h>
int main(void) {
int n, a[1000];
if (scanf("%d", &n) != 1 || n < 1 || n > 1000) return 1;
for (int i = 0; i < n; ++i)
if (scanf("%d", &a[i]) != 1) return 1;
int minimum = a[0];
for (int i = 1; i < n; ++i)
if (a[i] < minimum) minimum = a[i];
printf("%d\n", minimum);
return 0;
}Time O(n); empty array-এর minimum সংজ্ঞায়িত নয়।
2. What will be the output of the following program. (নিম্নোক্ত প্রোগ্রামের output কি হবে? (11)
void main()
{
long int n;
int I, j;
n = 1;
for (i = 1; i <= 2; i++)
for (j = 1; j <= 5; j++)
n = n * i * j;
cout << n;
}Answer & solution / উত্তর ও সমাধান
Source-এ I declared কিন্তু i ব্যবহৃত; C++ case-sensitive, তাই মূল code compile হয় না। int i, j;, proper header ও int main() ধরে:
\[n=\left(\prod_{j=1}^5 1j\right)\left(\prod_{j=1}^5 2j\right)=120\times(2^5\times120)=\boxed{460800}\]
3. Prepare a Binary search tree for the following data: (7,9,25,1,77,100,112) [নিম্নোক্ত ডাটাগুলো ব্যবহার করে একটি বাইনারী সার্চ ট্রি তৈরি কর: (7,9,25,1,77,100,112)
Answer & solution / উত্তর ও সমাধান
7 root; 1 left child; 9 right child। এরপর 25 → 77 → 100 → 112 ক্রমাগত right child।
Inorder: 1, 7, 9, 25, 77, 100, 112।
4. Write down the SQL command to find the following Query language considering the relation given below. (a) Find all the Department in which number of students are more than 60. (b) Find all the Department in which number of Teachers are less than 12. (নিম্নের রিলেশন ব্যবহার করে নিম্নেক্ত Query এর জন্য SQL Command লিখ। (a) ঐ সমস্ত বিভাগ বের কর যাদের ছাত্র সংখ্যা 60 এর বেশী (b) ঐ সমস্ত বিভাগ বের কর যাদের শিক্ষক সংখ্যা 12 এর কম।) (10)
DUET
| Department | Students | Teachers |
| CE | 120 | 18 |
| ME | 120 | 14 |
| EEE | 120 | 10 |
| CSE | 60 | 12 |
| TE | 20 | 2 |
Answer & solution / উত্তর ও সমাধান
SELECT Department FROM DUET WHERE Students > 60;
SELECT Department FROM DUET WHERE Teachers < 12;| Query | Result |
|---|---|
| Students > 60 | CE, ME, EEE |
| Teachers < 12 | EEE, TE |
CSE-এর students = 60 ও teachers = 12, তাই strict inequality-তে অন্তর্ভুক্ত নয়।
5. Explain with example super key and Candidate key. [সুপারকি এবং ক্যান্ডিডেটকি উদাহরণসহ ব্যাখ্যা কর।] (10)
Answer & solution / উত্তর ও সমাধান
Superkey uniquely row শনাক্ত করে। Candidate key হলো minimal superkey: কোনো attribute বাদ দিলে uniqueness থাকে না।
Student(ID, Email, Name)-এ ID ও Email দুটোই unique এবং non-null ধরলে {ID}, {Email} candidate key। {ID, Name} superkey, কিন্তু minimal নয় বলে candidate key নয়।
6. Explain Class, object and Function overloading. (Class, object এবং Function overloading ব্যাখ্যা কর।) (12)
Answer & solution / উত্তর ও সমাধান
Class হলো data ও functions-এর user-defined type; object হলো class-এর instance। Function overloading-এ একই নামের একাধিক function-এর parameter list আলাদা হয়; শুধু return type বদলে overload করা যায় না।
class Box { public: int width = 0; };
Box first;
int add(int a, int b) { return a + b; }
double add(double a, double b) { return a + b; }
7. Identity the several layers of OSI reference model and write the main task of data link layer. (OSI reference মডেলের বিভিন্ন লেয়ারগুলি চিহ্নিত কর এবং ডাটা লিংক লেয়ারের প্রধান কার্যবিবরণী লিখ।) (10)
Answer & solution / উত্তর ও সমাধান
| OSI (উপর থেকে নিচে) | মূল কাজ |
|---|---|
| Application | Application-level network service |
| Presentation | Data representation, encoding, encryption |
| Session | Session/dialog coordination |
| Transport | End-to-end process delivery, ports |
| Network | Logical addressing ও routing |
| Data link | Framing, MAC addressing, media access, error detection |
| Physical | Medium-এ bits/signals পাঠানো |
8. What do you mean by Address Bus and Data Bus? How many memory locations can address if CPU with 16 Bit address line [Address Bus এবং Data Bus বলতে কি বুঝায়? যদি CPU তে 16 Bit এড্রেস লাইন থাকে তাহলে কতগুলি মেমোরী লোকেশন হবে) (10)
Answer & solution / উত্তর ও সমাধান
Address bus কোন memory/I/O location access হবে তা নির্বাচন করে; data bus CPU, memory ও I/O-এর মধ্যে data বহন করে।
\[N=2^{16}=\boxed{65536\text{ locations}}\]
প্রতি location এক byte হলে capacity 64 KiB।
9. Name six groups of information system stakeholders, (Information system stakeholder এর ছয়টি গ্রুপের নাম লিখ।) (08)
Answer & solution / উত্তর ও সমাধান
- System owners/sponsors
- End users
- System analysts
- System designers/architects
- Developers/builders
- Project managers
10. Prepare a graph from the following matrix. Where 1 represents there is a path. 0 represents no path. (নিম্নের ম্যাট্রিক্স দিয়ে একটি গ্রাফ তৈরি কর, যেখানে 1 প্রকাশ করে একটি পথ আছে 0 প্রকাশ করে পথ নেই।)
$$\begin{matrix} & 1 & 2 & 3 & 4 & 5 \\ 1 & \begin{bmatrix} 0 & 1 & 0 & 1 & 0 \\ 1 & 1 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 \end{bmatrix} \end{matrix}$$
Answer & solution / উত্তর ও সমাধান
Matrix asymmetric, তাই directed graph; row i থেকে column j-তে edge। Diagonal 1 self-loop নির্দেশ করে।
| Vertex | Outgoing neighbours |
|---|---|
| 1 | 2, 4 |
| 2 | 1, 2, 3 |
| 3 | 3, 4, 5 |
| 4 | 1, 2, 4, 5 |
| 5 | 1, 3, 5 |
11. (a) What is stack and queue? What is the main difference between stack and queue? (Stack এবং queue কি? এদের মধ্যে মূল পার্থক্য লিখ?)
Answer & solution / উত্তর ও সমাধান
| Stack | Queue |
|---|---|
| LIFO: last in, first out | FIFO: first in, first out |
| Push/pop একই top-এ | Enqueue rear-এ, dequeue front-এ |
| উদাহরণ: call stack, undo | উদাহরণ: print queue, BFS |
11. (b) Write down the function of AX, BX, CX and DX registers, (AX, BX, CX এবং DX রেজিস্টার এর কার্যাবলী লিখ।)
(12)
Answer & solution / উত্তর ও সমাধান
| 8086 register | বিশেষ ব্যবহার |
|---|---|
| AX | Accumulator; arithmetic, multiplication/division ও I/O |
| BX | Base register; effective-address calculation |
| CX | Count; LOOP, REP ও variable shifts |
| DX | Extended data; multiply/divide high part এবং I/O port address |
এগুলো general-purpose register-ও; বিশেষ ব্যবহার instruction-এর ওপর নির্ভর করে।
12. (a) Write down the truth table of R-S, J-K and D flip flops (R-S, J-K এবং D ফ্লিপ ফ্লপের truth table লিখ।)
Answer & solution / উত্তর ও সমাধান
| S | R | Q(next), active-high SR |
|---|---|---|
| 0 | 0 | Q |
| 0 | 1 | 0 |
| 1 | 0 | 1 |
| 1 | 1 | Forbidden/invalid |
| J | K | Q(next) |
|---|---|---|
| 0 | 0 | Q (hold) |
| 0 | 1 | 0 (reset) |
| 1 | 0 | 1 (set) |
| 1 | 1 | NOT Q (toggle) |
D flip-flop: active clock edge-এ Q(next) = D।
12. (b) What the main functions of an operating system? (Operating system এর প্রধান কাজগুলি কী কী?) (05)
Answer & solution / উত্তর ও সমাধান
Operating system হলো system software যা hardware resource পরিচালনা করে এবং application-এর জন্য service দেয়।
- Process/CPU scheduling ও process coordination।
- Memory allocation, protection ও virtual memory।
- File, storage ও I/O device management।
- User authentication, access control ও system-call interface।