Previous Year Questions
Admission syllabusComputer Science and Engineering
430 questions(v) What is a ‘tuple’? [‘tuple’ কি?] (Top left options are continuing from the previous page's question "What is a 'tuple'?")
Answer & solution / উত্তর ও সমাধান
Correct answer: d. A row or record in a database table
Tuple হলো table-এর একটি row/record।
(vi) The file system “NTFS” stands for [ফাইল সিস্টেম “NTFS” কি?]
Answer & solution / উত্তর ও সমাধান
Correct answer: c. New Technology File System
NTFS = New Technology File System।
(vii) Which one is the simplified form of the Boolean equation A'C + A'B + AB'C + BC? [বুলিয়ান সমীকরণ A'C + A'B + AB'C + BC এর সংক্ষিপ্তরূপ কি?]
Answer & solution / উত্তর ও সমাধান
Correct answer: b. C + A'B
A'C + AB'C + BC = C(A' + AB' + B) = C; ফলে F = C + A'B।
(viii) The binary code of $(21.125)_{10}$ is ---- [$(21.125)_{10}$ এর বাইনারী -----]
Answer & solution / উত্তর ও সমাধান
Correct answer: a. 10101.001
21.125 decimal = 10101.001 binary।
(ix) What is the negation of the predicate $\forall x (p(y) \rightarrow q(x))$? [$\forall x (p(y) \rightarrow q(x))$ predicate এর বিপরীত কি?]
- $\forall x \exists y (p(y) \rightarrow \sim q(x))$
- $\forall x \exists y (p(y) \wedge \sim q(x))$
- $\exists x \forall y (p(y) \wedge \sim q(x))$
- $\exists x \forall y (p(x) \wedge \sim q(x))$
Source ambiguity
Answer & solution / উত্তর ও সমাধান
\(\neg\forall x(p(y)\to q(x))=\exists x(p(y)\land\neg q(x))\)। y free থাকে; কোনো option-এ সঠিক quantifier নেই।
(x) MAC (Medium Access Control) sublayer is the part of ------ [MAC সাব লেয়ার নিম্নের কোনটির অংশ -----]
Answer & solution / উত্তর ও সমাধান
Correct answer: c. Data Link Layer
MAC sublayer data-link layer-এর অংশ।
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);
}Source ambiguity
Answer & 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।
1. (b) Write a program in C language to print the first 10 fibonacci number using recursion function. [রিকারসন ফাংশন ব্যবহার করে প্রথম 10 টি fibonacci number প্রিন্ট করার জন্য C ভাষায় একটি প্রোগ্রাম লিখ।]
Answer & 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।
2. (a) What are the main features of OOP? [OOP এর প্রধান বৈশিষ্ট্যগুলো কি?]
Answer & solution / উত্তর ও সমাধান
- Encapsulation: data ও methods একই class-এ রাখা এবং access control।
- Abstraction: প্রয়োজনীয় interface প্রকাশ, implementation লুকানো।
- Inheritance: base class থেকে behaviour reuse/extend।
- Polymorphism: একই interface দিয়ে বিভিন্ন implementation।
Class, object এবং message/method call OOP-এর মৌলিক ধারণা।
(b) Distinguish between static binding and dynamic binding. [Static binding এবং dynamic binding এর মধ্যে পার্থক্য কর।]
Answer & solution / উত্তর ও সমাধান
| Static binding | Dynamic 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 |
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}|$ এর মান নির্ণয় কর।]
Answer & 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\]
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 আছে।]
Answer & solution / উত্তর ও সমাধান
String-এ leading zero অনুমোদিত। প্রতিটি অবস্থানে 10টি digit।
\[N=10^3=1000\]
- তিন digit একই নয়: \(1000-10=990\)।
- Odd digit দিয়ে শুরু: \(5\times10\times10=500\)।
- ঠিক তিনটি 9 আছে: শুধু 999, অর্থাৎ 1টি।
4. (a) Which data structure is used to perform recursion and why? [কোন ডাটা স্ট্রাকচার রিকারশন সম্পন্ন করতে ব্যবহার করা হয় এবং কেন?]
Answer & 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]
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 এর শেষে একটি নতুন নোড যুক্ত করার অ্যালগরিদম লিখ।]
Answer & solution / উত্তর ও সমাধান
| Array | Singly linked list |
|---|---|
| Contiguous storage | Nodes 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 headTail pointer রাখলে append O(1), না থাকলে O(n)।
5. What is Weak Entity set? State the disadvantage of conventional file processing system. [Weak Entity set বলতে কি বুঝ? প্রচলিত File processing system এর অসুবিধাগুলো লিখ।]
Answer & solution / উত্তর ও সমাধান
Weak entity-এর নিজস্ব পূর্ণ key নেই; owner entity-এর key এবং partial key মিলে তাকে শনাক্ত করে। উদাহরণ: Employee(ID)-এর Dependent(Name), key = (ID, Name)।
- File system-এ data duplication ও inconsistency।
- Data isolation ও ad-hoc access কঠিন।
- Integrity ও security policy ছড়িয়ে থাকে।
- Concurrent update, atomicity ও recovery সামলানো কঠিন।