BUET M.Sc. Admission — Department of CSE — May: 2019প্রশ্ন ও সমাধান
- Set by
- BUET M.Sc. Admission
- Exam date
- 2019
- Questions
- 15 (0 MCQ, 15 written)
- Exam guide
- M.Sc. admission (CSE and ICT) · এমএসসি ভর্তি (সিএসই ও আইসিটি)
- Algorithms · অ্যালগরিদম 3
- Data Structures · ডেটা স্ট্রাকচার 2
- Operating Systems · অপারেটিং সিস্টেম 2
- Programming · প্রোগ্রামিং 2
- Cloud & Emerging Tech · ক্লাউড ও উদীয়মান প্রযুক্তি 1
- Digital Logic · ডিজিটাল লজিক 1
- Mathematics · গণিত 1
- Microprocessor · মাইক্রোপ্রসেসর 1
- Networking · নেটওয়ার্কিং 1
- Software Engineering · সফটওয়্যার ইঞ্জিনিয়ারিং 1
Write the function for decimal to binary representation but cannot use any arithmetic operator. Only use the while loop and logical operator. Assume that 32-bit memory is here If n=12 output is 0000 0000 0000 0000 0000 0000 0000 1100
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Why use try with the resource in program.
Model answer
try-with-resources (introduced in Java 7) automatically closes any resource (file streams, database connections, sockets) that implements the AutoCloseable interface once the try block finishes - whether it finishes normally or via an exception - without needing an explicit finally block.
Why it's used instead of a plain try/finally:
- Guarantees resource cleanup: eliminates the classic bug of a forgotten
close()call, which causes resource/memory leaks (e.g., too many open file handles). - Cleaner code: removes the boilerplate of a
finally { if (x != null) x.close(); }block. - Correct exception handling: if both the try block and the automatic
close()throw exceptions, Java keeps the original exception as primary and attaches the close-exception as a suppressed exception (visible viagetSuppressed()) - a plain try/finally would silently lose the original exception.
flowchart TD
A([try-with-resources block starts]) --> B[Resource opened]
B --> C[Code executes inside try]
C --> D[Block ends normally or throws exception]
D --> E[JVM automatically calls resource.close]
E --> F([Resource guaranteed closed])
Example:
try (BufferedReader br = new BufferedReader(new FileReader("data.txt"))) {
System.out.println(br.readLine());
} // br.close() is called automatically here, even if readLine() throws
Exam takeaway: try-with-resources replaces manual finally { close(); } boilerplate and never silently loses the original exception to a close() failure - any resource used this way must implement AutoCloseable/Closeable.
If the statement is (p∨q)⇒(p^q) then write the inverse, converse, and contrapositive statement.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Draw the flag register of the 8086 microprocessors.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Draw the multiplexer for the function F= (x+y)+w+xy.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write down the difference between Phong shading and Gouraud shading?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Draw the DFA for the input is a"baba"? Where n>=1 and m>=19)
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write the subroutine for the Quick sort.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Let us consider a simple hash function as "key mod 11" and a sequence of keys as 11, 54,77 when a collision occurs then store using the quadratic method
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write Down the name of the process state?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is the necessary condition for Deadlock?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write down the difference between Genetic algorithm and traditional algorithm.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Delete for value in heap tree.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Draw the diagram with protocol name for email sending and receive.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What are context class, entiry class and boundary class?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers · M.Sc. admission (CSE and ICT) guide