Skip to content
Past paper

Sheikh Hasina National Institute of Youth Development — Instructor ICT — Exam: 20.05.2023প্রশ্ন ও সমাধান

Set by
Sheikh Hasina National Institute of Youth Development
Post
Instructor
Exam date
20 May 2023
Questions
10 (0 MCQ, 10 written)
Exam guide
ICT teaching posts (NTRCA) · আইসিটি শিক্ষক পদ (এনটিআরসিএ)
  • Programming · প্রোগ্রামিং 4
  • Software Engineering · সফটওয়্যার ইঞ্জিনিয়ারিং 2
  • Data Structures · ডেটা স্ট্রাকচার 1
  • Database · ডেটাবেজ 1
  • General ICT · সাধারণ আইসিটি 1
  • Networking · নেটওয়ার্কিং 1
Written question 1Programming

Write a Program:

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 2Programming

What is virtual function?

Model answer

Definition. A virtual function is a member function declared in a base class with the virtual keyword, which a derived class is expected to override; calling it through a base-class pointer or reference resolves to the derived class's version at runtime, not the base class's, enabling runtime polymorphism.

Why it's needed: without virtual, C++ resolves a function call using the static (declared) type of the pointer at compile time. With virtual, the compiler instead installs a vtable (virtual function table) pointer in each object, and the call is dispatched through that table based on the object's actual runtime type.

Example:

class Shape {
public:
    virtual double area() { return 0; }
};
class Circle : public Shape {
    double r;
public:
    Circle(double r) : r(r) {}
    double area() override { return 3.1416 * r * r; }
};

int main() {
    Shape* s = new Circle(5);
    std::cout << s->area();   // prints 78.54 -- Circle's version, via the base pointer
}

Without virtual, s->area() would call Shape::area() (returning 0), because s is statically typed as Shape*.

Related term: a pure virtual function (virtual double area() = 0;) has no body and forces derived classes to implement it, making the base class abstract.

Exam takeaway: virtual shifts function resolution from compile time (static binding) to runtime (dynamic binding via the vtable) — it is the mechanism C++ uses to implement true runtime polymorphism through base-class pointers/references.

Written question 3Software Engineering

What is Software testing? Difference between Black box testing and White box testing.

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 4Programming

Define copy constructor. What Static binding and Dynamic binding?

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 5Database

Define primary key, super key, and Candidate key.

Model answer

Definitions.

  • Super key: any set of one or more attributes that uniquely identifies a tuple in a relation; it may contain extra, unnecessary attributes.
  • Candidate key: a minimal super key — no attribute can be removed from it without losing the uniqueness property. A table can have several candidate keys.
  • Primary key: the candidate key that the database designer chooses as the main identifier for the table; every other candidate key not chosen becomes an alternate key.

Worked example — table Student(RollNo, Email, NationalID, Name, Dept):

  • Super keys: {RollNo}, {Email}, {NationalID}, {RollNo, Name}, {RollNo, Email, NationalID}, etc. — any superset of a uniquely-identifying set.
  • Candidate keys: {RollNo}, {Email}, {NationalID} — each alone is minimal and unique; {RollNo, Name} is a super key but not a candidate key, since {Name} is redundant (RollNo alone already suffices).
  • Primary key: {RollNo} — chosen by the designer; {Email} and {NationalID} then become alternate keys.
graph TD
  SK["Super Keys: all uniquely-identifying sets"] --> CK["Candidate Keys: minimal super keys"]
  CK --> PK["Primary Key: the one chosen"]
  CK --> AK["Alternate Keys: candidates not chosen"]

Exam takeaway: every candidate key is a super key, but not every super key is a candidate key (minimality is the filter); every primary key is a candidate key, but not every candidate key is the primary key (the designer's choice is the filter).

Written question 6Networking

An IP address subnet mask is 255.255.255.224 which is the subnet address in this block?

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 7Programming

What is function?

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 8Software Engineering

Define SDLC? Write the steps of SDLC?

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 9General ICT

Write down the Meaning: MIME, PNG, JPGE, OSPF

Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন

Written question 10Data Structures

Explain with example Post order traversal.

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 · ICT teaching posts (NTRCA) guide