RAKUB Programmer (PO) Exam: 12.10.2021প্রশ্ন ও সমাধান
- Set by
- RAKUB
- Post
- Programmer
- Exam date
- 12 Oct 2021
- Questions
- 18 (0 MCQ, 18 written)
- Exam guide
- Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
- Algorithms · অ্যালগরিদম 5
- English · ইংরেজি 3
- Programming · প্রোগ্রামিং 3
- Computer Architecture · কম্পিউটার আর্কিটেকচার 2
- Bangla · বাংলা 1
- Cyber Security · সাইবার নিরাপত্তা 1
- Data Structures · ডেটা স্ট্রাকচার 1
- Database · ডেটাবেজ 1
- General Knowledge · সাধারণ জ্ঞান 1
Write a programme in C/C++/Java what finds sum of digits of a number until sum becomes single digit, simple input/output is:
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write a programme in C/C++/Java to check whether an expression balanced parenthesis or not. Sample input/output:
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write a programme to create an object of type batsman and calculate the average runs scored by the player.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
A program (or a program task) takes 1 billion instructions to execute on a processor running at 2 GHz. Suppose also that 50% of the instructions execute in 3 clock cycles, 30% execute in 4 clock cycles, and 20% execute in 5 clock cycles. What is the execution time for the program or task?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Find the Minimum Spanning Tree of the following graph using Kruskal's algorithm.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explain method overloading and Method overriding with example.
Model answer
Method Overloading vs Method Overriding
| Aspect | Overloading | Overriding |
|---|---|---|
| Definition | Same method name, different parameter list, in the same class | Subclass redefines a method with the same signature as its parent |
| Binding | Resolved at compile time (static / early binding) | Resolved at run time (dynamic / late binding) |
| Relationship | No inheritance required | Requires inheritance (parent-child classes) |
| Return type | May differ | Must be the same or a covariant subtype |
| Purpose | Provide multiple ways to invoke similar behaviour | Customize / replace inherited behaviour |
Overloading example
class Calc {
int add(int a, int b) { return a + b; }
double add(double a, double b) { return a + b; } // differs by parameter type
}
Overriding example
class Animal {
void sound() { System.out.println("Animal makes a sound"); }
}
class Dog extends Animal {
@Override
void sound() { System.out.println("Dog barks"); } // same signature, new behaviour
}
public class Main {
public static void main(String[] args) {
Animal x = new Dog();
x.sound(); // runtime polymorphism
}
}
Output: Dog barks
Exam takeaway: overloading is compile-time polymorphism; overriding is run-time polymorphism — the classic distinction tested in every OOP paper.
Draw the state diagram of deterministic Finite Automata (DFA), which accepts set of all strings over {0, 1} which interpreted as binary number is divisible by 4.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Operating system math: clock frequency 700MHz.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
You are given a set of activities with their starting time s[] and finishing time f[].
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is the difference between the cost increased in the greedy algorithm and the optimal cost? Show your calculation.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Data structure: Complexity O(N²).
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Draw E-R diagram of hospital management system. Hospital name "SKY Hospital Ltd.".
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is SQL Injection? How to Prevent against SQL Injection Attacks?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Bangla to English translation
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
English to Bangla translation
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write a composition: Edge Computing
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write a composition in Bangla: "বর্তমান সময়ে প্রোগ্রামার হিসাবে ক্যারিয়ার গঠনের প্রয়োজনীয়তা"
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
General Knowledge
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 · Government IT officer posts guide