Previous Year Questions
Admission syllabusComputer Science and Engineering
430 questionsiv. What is the 2’s compliment representation of -24 in a 16-bit microcomputer? [16-bit microcomputer এ -24 এর 2’s compliment কত হবে?]
Answer & solution / উত্তর ও সমাধান
Correct answer: c. 1111 1111 1110 1000
24 = 0000 0000 0001 1000; invert + 1 = 1111 1111 1110 1000।
v. A 32 bit address bus allows access to memory of capacity ----- [একটি 32-বিট address bus এর মেমোরী ক্যাপাসিটি -----]
Answer & solution / উত্তর ও সমাধান
Correct answer: d. 4 Gb
Byte-addressable হলে \(2^{32}\) bytes = 4 GiB; Gb নয়।
vi. Which relation is correct in case of transistor’s current gain? [ট্রানজিস্টরের কারেন্ট গেইন এর ক্ষেত্রে কোন সম্পর্কটি সত্য?]
Answer & solution / উত্তর ও সমাধান
Correct answer: a. $\alpha = \beta / (1 + \beta)$
\(\alpha=I_C/I_E=\beta/(1+\beta)\)।
vii. The simplification of the Boolean expression $\overline{\overline{ABC} + \overline{ABC}}$ is: [$\overline{\overline{ABC} + \overline{ABC}}$ এর সরলীকরণ হচ্ছে : ]
- 0 ($\sqrt{}$
- 1
- A
- BC
Source ambiguity
Answer & solution / উত্তর ও সমাধান
প্রদত্ত expression অনুযায়ী \(\overline{\overline{ABC}+\overline{ABC}}=ABC\)। কোনো option মেলে না; source-এর পরের expression ভিন্ন।
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)
- $2\ \Omega$
- $6\ \Omega$
- $4\ \Omega$
- $8\ \Omega$
Source ambiguity
Answer & solution / উত্তর ও সমাধান
সঠিক resistor connection diagram অনুপস্থিত। শুধু resistor values থেকে equivalent resistance নিশ্চিত করা যায় না।
ix. FIFO scheduling is ----- [FIFO সিডিউলিং হলো -----]
Answer & solution / উত্তর ও সমাধান
Correct answer: b. non preemptive scheduling
FCFS/FIFO CPU scheduling non-preemptive।
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 কত হবে?]
Answer & solution / উত্তর ও সমাধান
Correct answer: d. 255.255.255.0
পুরনো classful convention-এ 201.* Class C: 255.255.255.0।
1. (a) Write the content and purpose of the following header files [নিম্নোক্ত হেডার ফাইলগুলোর কনটেন্ট এবং উদ্দেশ্যগুলি লিখ ।]
(i) <iostream.h> (ii) <stdlib.h> (iii) <math.h> (iv) <string.h>
Answer & solution / উত্তর ও সমাধান
| Header | Content ও purpose |
|---|---|
| iostream.h | পুরোনো non-standard C++ stream header; standard C++-এ <iostream>, std::cin/std::cout |
| stdlib.h | malloc/free, numeric conversion, exit, qsort ইত্যাদি |
| math.h | sqrt, pow, sin ইত্যাদি mathematical function declaration |
| string.h | strlen, strcmp, strcpy, memcpy ইত্যাদি string/memory operation declaration |
1. (b) Using recursion write a program in “C” Language to calculate the factorial of any integer. [রিকারসন ব্যবহার করে যে কোন পূর্ণ সংখ্যার ফ্যাক্টরিয়াল গণনা করার জন্য “C” ভাষায় একটি প্রোগ্রাম লিখ।] (06)
Answer & solution / উত্তর ও সমাধান
কোনো function নিজেকে call করলে তাকে recursion বলে। Base case recursion থামায়।
\[0!=1,\qquad n!=n(n-1)!\quad(n\ge1)\]
#include <stdio.h>
unsigned long long factorial(unsigned int n) {
return n < 2 ? 1 : n * factorial(n - 1);
}
int main(void) {
int n;
if (scanf("%d", &n) != 1 || n < 0 || n > 20) {
puts("Enter an integer from 0 to 20.");
return 1;
}
printf("%llu\n", factorial((unsigned int)n));
return 0;
}
3. (a) Construct a truth table for the following compound proposition [নিম্নলিখিত কম্পাউন্ড প্রোপজিশনের ট্রুথ টেবিল তৈরী কর] $(p \oplus q) \wedge (p \oplus \neg q)$ (03)
Answer & solution / উত্তর ও সমাধান
| p | q | p XOR q | p XOR NOT q | AND |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 |
দুটি XOR complementary, তাই compound proposition সর্বদা false (contradiction)।
2. (b) A die is rolled and a coin is tossed, find the probability that the die shows an odd number and the coin shows a head. [একটি ডাইকে গড়াইয়া এবং একটি কয়েনকে ছুড়িয়া দেওয়া হইল, ডাইটি একটি বেজোড় সংখ্যা এবং কয়েনটি একটি হেড প্রদর্শন করিবার সম্ভাব্যতা বের কর।] (07)
Answer & solution / উত্তর ও সমাধান
\[P(\text{odd and head})=\frac36\times\frac12=\boxed{\frac14}\]
Fair die ও fair coin এবং independent outcomes ধরে।
3. (a) Prepare a Binary search tree for the following data: 8,10,26,2,78,102,115 [নিম্নোক্ত ডাটাতগুলি ব্যবহার করে একটি binary search tree তৈরি কর।] (8,10,26,2,78,102,115) (04)
Answer & solution / উত্তর ও সমাধান
Insertion order অনুসারে 8 root; 2 তার left child; 10 right child। এরপর 26 → 78 → 102 → 115 ক্রমাগত right child।
Inorder: 2, 8, 10, 26, 78, 102, 115।
3.(b) If $A = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix}$ and $B = \begin{bmatrix} 2 & 0 & -4 \\ 3 & 2 & 6 \end{bmatrix}$ derive the Matrix multiplication of A and B. [যদি $A = \begin{bmatrix} 1 & 3 \\ 2 & 4 \end{bmatrix}$ and $B = \begin{bmatrix} 2 & 0 & -4 \\ 3 & 2 & 6 \end{bmatrix}$ হয়, তাহলে A এবং B ম্যাট্রিক্সের গুণফল বের কর।] (06)
Answer & solution / উত্তর ও সমাধান
\[AB=\begin{bmatrix}1(2)+3(3)&1(0)+3(2)&1(-4)+3(6)\\2(2)+4(3)&2(0)+4(2)&2(-4)+4(6)\end{bmatrix}=\boxed{\begin{bmatrix}11&6&14\\16&8&16\end{bmatrix}}\]
4. (a) What is data abstraction? Mention the levels of data abstraction. [ডাটা অবস্ট্রাকশন বলতে কি বুঝায়? ডাটা অবস্ট্রাকশনের বিভিন্ন স্তর গুলোর নাম লিখ।] (06)
Answer & solution / উত্তর ও সমাধান
Data abstraction ব্যবহারকারীকে অপ্রয়োজনীয় storage details থেকে আলাদা রাখে।
| Level | অর্থ |
|---|---|
| Physical | ডেটা কীভাবে disk-এ সংরক্ষিত |
| Logical | কোন data, structure ও relationship আছে |
| View/external | নির্দিষ্ট ব্যবহারকারীর দেখা অংশ |
4. (b) What mapping cardinality? What are the types of it? [ম্যাপিং কার্ডিনালিটি বলতে কি বুঝায়? ইহা কত ধরনের?]
Answer & solution / উত্তর ও সমাধান
SQL = Structured Query Language। Mapping cardinality বোঝায় একটি entity-এর সঙ্গে অপর set-এর কত entity সম্পর্কিত হতে পারে।
| Type | উদাহরণ |
|---|---|
| One-to-one | এক country-এর একটি capital, model-এর assumptions সাপেক্ষে |
| One-to-many | এক department-এ বহু employee |
| Many-to-one | বহু employee-এর একটি department |
| Many-to-many | বহু student বহু course নেয় |