কম্পিউটার সায়েন্স এন্ড ইঞ্জিনিয়ারিং
Subjects / বিষয়
Non-Technical · Shared by all departments
পদার্থ বিজ্ঞান
8 chapters
Non-Technical · Shared by all departments
রসায়ন
15 chapters
Non-Technical · Shared by all departments
গণিত
4 chapters
Non-Technical · Shared by all departments
ইংরেজি
11 chapters
Technical
Computer Science and Engineering
12 chapters
Questions
0 read · 0 practiced · 0 answered in exams13 (a) Convert the following numbers of decimal numbers. [নিম্নলিখিত সংখ্যাগুলোকে ডেসিমাল সংখ্যায় রূপান্তরিত কর।] (06)
(i) $(1001101)_2$ \ \ \ \ \ \ (ii) $(A90)_{16}$
CQ / Written solution
\[(1001101)_2=64+8+4+1=\boxed{77}_{10}\]
\[(A90)_{16}=10\times16^2+9\times16=\boxed{2704}_{10}\]
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}$ সমীকরণটির সরলীকরণ কর। সরলীকরণের পরে উহার লজিক বর্তনীটি আঁক।]
CQ / Written 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-এ দাও।
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).
CQ / Written 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।
Incomplete source data: see solution note.
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$).
CQ / Written 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)
CQ / Written 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;
}CQ / Written 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)
CQ / Written 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 |
CQ / Written 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)
CQ / Written 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)
CQ / Written 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; }