কম্পিউটার সায়েন্স এন্ড ইঞ্জিনিয়ারিং
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 examsvi. Which relation is correct in case of transistor’s current gain? [ট্রানজিস্টরের কারেন্ট গেইন এর ক্ষেত্রে কোন সম্পর্কটি সত্য?]
Correct answer: a
\(\alpha=I_C/I_E=\beta/(1+\beta)\)।
Source ambiguity: see solution note.
vii. The simplification of the Boolean expression $\overline{\overline{ABC} + \overline{ABC}}$ is: [$\overline{\overline{ABC} + \overline{ABC}}$ এর সরলীকরণ হচ্ছে : ]
- 0 ($\sqrt{}$
- 1
- A
- BC
CQ / Written solution
প্রদত্ত expression অনুযায়ী \(\overline{\overline{ABC}+\overline{ABC}}=ABC\)। কোনো option মেলে না; source-এর পরের expression ভিন্ন।
Source ambiguity: see solution note.
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$
CQ / Written solution
সঠিক resistor connection diagram অনুপস্থিত। শুধু resistor values থেকে equivalent resistance নিশ্চিত করা যায় না।
ix. FIFO scheduling is ----- [FIFO সিডিউলিং হলো -----]
Correct answer: b
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 কত হবে?]
Correct answer: d
পুরনো 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>
CQ / Written 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)
CQ / Written 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)
CQ / Written 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)
CQ / Written 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)
CQ / Written 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।