Skip to content
Past paper

NPCBL — Executive Trainee (Software) — Exam: 2023প্রশ্ন ও সমাধান

Set by
NPCBL
Post
Executive Trainee
Exam date
2023
Questions
39 (39 MCQ, 0 written)
Exam guide
Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
  • Programming · প্রোগ্রামিং 8
  • Data Structures · ডেটা স্ট্রাকচার 7
  • General Knowledge · সাধারণ জ্ঞান 6
  • Database · ডেটাবেজ 4
  • Operating Systems · অপারেটিং সিস্টেম 4
  • Algorithms · অ্যালগরিদম 2
  • Bangla · বাংলা 2
  • English · ইংরেজি 2
  • Networking · নেটওয়ার্কিং 2
  • Digital Logic · ডিজিটাল লজিক 1
  • Software Engineering · সফটওয়্যার ইঞ্জিনিয়ারিং 1
Question 1General Knowledge

পেনাং কোন দেশের সমুদ্রবন্দর?

  • a)ইন্দোনেশিয়া
  • b)মালয়েশিয়া
  • c)তাইওয়ান
  • d)ফিলিপাইন

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

Question 2General Knowledge

কুতুবদিয়া বাতিঘর নির্মাণ করা হয় কত সালে?

  • a)১৮৫৫ সালে
  • b)১৮৪০ সালে
  • c)১৮৪৬ সালে
  • d)১৮৪৮ সালে

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

Question 3Bangla

কমার বিরতিকাল কতক্ষন?

  • a)১ বলতে যে সময় লাগে
  • b)১ বলার দ্বিগুন সময়
  • c)১ সেকেন্ড
  • d)থামার প্রয়োজন নেই

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

Question 4Bangla

সাধু ও চলিত রীতির মিশ্রণে বাক্য কোন দোষে দুষ্ট হয়?

  • a)উৎপ্রেক্ষা দোষে
  • b)বাহুল্য দোষে
  • c)গুরুচন্ডালী দোষে
  • d)আঞ্চলিক দোষে

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

Question 5General Knowledge

বাংলাদেশের একমাত্র পাহাড়ী দ্বীপ কোনটি?

  • a)সেন্ট মার্টিন
  • b)মহেষখালি
  • c)ছেড়াদ্বীপ
  • d)নিঝুম দ্বীপ

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

Question 6General Knowledge

তামাবিল সীমান্তের সাথে ভারতের কোন শহরটি অবস্থিত?

  • a)করিমগঞ্জ
  • b)খোয়াই
  • c)পেট্রোপোল
  • d)ডাউকি

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

Question 7General Knowledge

দক্ষিণ তালপট্টি কোন নদীর মোহনায় অবস্থিত?

  • a)নাফ
  • b)তেতুলিয়া
  • c)আড়িয়াল খাঁ
  • d)হাড়িয়াভাঙ্গা

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

Question 8Operating Systems

Which of the following scheduling algorithms is non-preemptive?

  • a)Shortest Job First
  • b)FCFS
  • c)Round Robin
  • d)Priority Scheduling

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

Question 9Data Structures

What is the maximum number of possible nonzero values in an adjacency matrix of a simple graph with n vertices?

  • a)n(n-1)/2
  • b)n(n+1)/2
  • c)n(n-1)
  • d)n(n+1)

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

Question 10General Knowledge

OPEC থেকে কোন দেশ নিজেকে প্রত্যাহার করে নেয়?

  • a)নাইজেরিয়া
  • b)লিবিয়া
  • c)ভেনিজুয়েলা
  • d)কাতার

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

Question 11Digital Logic

A computer system needs to store 100 different symbols. In this case, how many bits of data are required for each symbol?

  • a)4
  • b)5
  • c)6
  • d)7

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

Question 12English

Select the correct English translation of: The boy takes after his father.

  • a)ছেলেটি তার পিতার দেখাশুনা করে
  • b)ছেলেটি তার পিতার অনুকরণ করে
  • c)ছেলেটি তার পিতার পদাংক অনুসরণ করে
  • d)ছেলেটি দেখতে তার পিতার মত

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

Question 13Data Structures

Which data structure is needed to convert infix notation to postfix notation?

  • a)Branch
  • b)Tree
  • c)Queue
  • d)Stack

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

Question 14Networking

What is the maximum number of IP addresses that can be assigned to hosts on a local subnet that uses the 255.255.255.224 subnet mask?

  • a)16
  • b)31
  • c)32
  • d)30

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

Question 15Operating Systems

Logical memory is broken into blocks of the same size called-

  • a)Frames
  • b)Pages
  • c)RAIDs
  • d)Blocks

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

Question 16Programming

Which of the following is not a property of the Object Oriented Programming Concept?

  • a)Encapsulation
  • b)Inheritance
  • c)Exception
  • d)Abstraction

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

Question 17Database
CREATE TABLE employee (name VARCHAR, id INTEGER)

What type of statement is this?

  • a)DML
  • b)DDL
  • c)View
  • d)Integrity constraint

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

Question 18Data Structures

Which data structure is suitable to represent hierarchical relationship between elements?

  • a)Stack
  • b)Queue
  • c)List
  • d)Tree

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

Question 19Data Structures

How many children does a binary tree have?

  • a)2
  • b)0
  • c)0 or 1 or 2 (correct answer)
  • d)Any number of children
Answer and explanation

Correct answer: (c) 0 or 1 or 2

A binary tree is a tree in which each node has at most two children. The question means "how many children can a node of a binary tree have": a leaf has 0, a node with only a left or only a right child has 1, and a node with both has 2.

Why the other options are wrong

  • (a) 2: exactly two children for every non-leaf is a full binary tree, a special case; ordinary binary trees also allow one child.
  • (b) 0: only leaves have no children; otherwise the tree would be a single node.
  • (d) Any number of children: that describes a general (n-ary) tree, not a binary tree.

Tip: Binary = at most 2 children per node: 0, 1 or 2.

Source: Lecture 6: Binary Trees I - 6.006 Introduction to Algorithms, MIT OpenCourseWare (Spring 2020)

Question 20Programming

When a class serves as base class for many derived classes, the situation is called-

  • a)Polymorphism
  • b)Hierarchical inheritance
  • c)Hybrid inheritance
  • d)Multipath inheritance

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

Question 21Data Structures

What is the number of edges in a complete graph with 5 nodes?

  • a)1
  • b)4
  • c)5
  • d)10

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

Question 22Networking

Communication between a computer and a keyboard involves ____ transmission.

  • a)Automatic
  • b)Half-duplex
  • c)Full-duplex
  • d)Simplex

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

Question 23Data Structures

A B* tree can contain a maximum of 7 pointers in a node. What is the minimum number keys in leaves?

  • a)6
  • b)3
  • c)4
  • d)7

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

Question 24Algorithms

Which of the following is an example of dynamic programming approach?

  • a)Fibonacci Series (correct answer)
  • b)Tower of Hanoi
  • c)Dijkstra Shortest Path
  • d)None of the above
Answer and explanation

Correct answer: (a) Fibonacci Series

F(n) = F(n − 1) + F(n − 2), so plain recursion computes the same values again and again: fib(30) needs 2,692,537 calls. Dynamic programming stores each F(k) once, either memoized top-down or in a bottom-up table, so only 31 subproblems are solved and the time drops from exponential to O(n). The problem has both DP ingredients: optimal substructure and overlapping subproblems.

Why the other options are wrong

  • (b) Tower of Hanoi: the classic example of plain recursion (decrease and conquer). It must output all 2ⁿ − 1 moves (1,023 for n = 10), so storing sub-results cannot make it faster.
  • (c) Dijkstra Shortest Path: it is normally classified as greedy, because at every step it settles the unvisited vertex with the smallest tentative distance.
  • (d) None of the above: wrong, because (a) is a DP example.

Tip: DP = optimal substructure + overlapping subproblems. Fibonacci is the first example almost every DP lecture uses.

Source: MIT 6.006 Introduction to Algorithms (Fall 2011), Lecture 19: Dynamic Programming I — Fibonacci, Shortest Paths; NIST DADS: greedy algorithm

Question 25Programming

Which of the following is true regarding a constructor in Object Oriented Programming?

  • a)May consist of a return type
  • b)Does not consist of any return type
  • c)Has some return type
  • d)None of the above

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

Question 26Software Engineering

The degree of interaction between two modules is known as-

  • a)Cohesion
  • b)Strength
  • c)Inheritance
  • d)Coupling

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

Question 27Programming

The number of values a function can return at a time?

  • a)1 (correct answer)
  • b)2
  • c)0
  • d)more than 2
Answer and explanation

Correct answer: (a) 1

In C a return statement has the form return expression;. The expression is evaluated, the function ends, and that one result becomes the value of the function call. So a function can hand back only one value at a time.

To get several results out, you still return one thing: pack them in a struct (one value with several members), or pass pointers so the function writes the extra results into the caller's variables.

Why the other options are wrong

  • (b) 2: A return takes a single expression. return a, b; uses the comma operator and returns only b.
  • (c) 0: A void function returns nothing, but the question asks how many values a function can return; a non-void function returns exactly one.
  • (d) more than 2: Same reason as (b); returning a struct or array pointer is still one returned value.

Tip: One call → one return value; use a struct or pointer parameters for more.

Source: return statement - cppreference.com

Question 28Database

What type of join is needed when you wish to include rows that do not have matching values?

  • a)Equal join
  • b)Natural join
  • c)Outer join
  • d)Inner join

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

Question 29Data Structures

Find the output of the following prefix expression *+2-2 1/-4 2+-5 3 1

  • a)2
  • b)12
  • c)10
  • d)4

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

Question 30Operating Systems

Which one of the following is the deadlock avoidance algorithm?

  • a)Banker's algorithm
  • b)round-robin algorithm
  • c)Elevator algorithm
  • d)Karn's algorithm

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

Question 31Database

Which one of the following sorts rows in SQL?

  • a)SORT BY
  • b)ALIGN BY
  • c)ORDER BY (correct answer)
  • d)GROUP BY
Answer and explanation

Correct answer: (c) ORDER BY

ORDER BY sorts the rows of a query result, ascending (ASC) by default or descending with DESC. Without it, rows come back in whatever order the engine finds fastest, so no order is guaranteed.

SELECT name FROM employee ORDER BY name;        -- Anik, Riaz, Toha
SELECT name FROM employee ORDER BY name DESC;   -- Toha, Riaz, Anik

Why the other options are wrong

  • (a) SORT BY: Not an SQL clause; SQLite rejected it with a syntax error near "BY".
  • (b) ALIGN BY: Not an SQL clause either; also a syntax error.
  • (d) GROUP BY: It collects rows with equal values into one row per group for aggregates such as COUNT or SUM. It does not guarantee any output order; add ORDER BY when order matters.

Tip: Sort → ORDER BY; summarise per group → GROUP BY.

Sources: Sorting Rows (ORDER BY) - PostgreSQL Documentation; SELECT - PostgreSQL Documentation

Question 32English

Choose the correct spelling

  • a)Query
  • b)Quelry
  • c)Qeiry
  • d)Queery

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

Question 33Programming

Consider int i=0; Then which of the following is not an infinite loop?

  • a)for(;;){}
  • b)while ( ){ }
  • c)while ( ++i<0){ --i;}
  • d)do {++i;} while(--i<=0);

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

Question 34Programming

Address stored in the pointer variable is of type ____

  • a)Integer
  • b)Float
  • c)Character
  • d)Double

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

Question 35Programming

What will be the output of the following "C" code fragment?

x=0;
while (x<100)
    x+=2;
print(x);
  • a)99
  • b)100
  • c)101
  • d)98

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

Question 36Programming

Which keyword is used to skip the rest of a loop and carry on from the top of the loop again?

  • a)break
  • b)resume
  • c)continue
  • d)skip

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

Question 37Operating Systems

Which of the following is not a deadlock handling strategy?

  • a)Deadlock prevention
  • b)Timeout
  • c)Deadlock detection and recovery
  • d)Deadlock annihilation (correct answer)
Answer and explanation

Correct answer: (d) Deadlock annihilation

Deadlocks are handled in a small number of recognised ways: prevention (guarantee that deadlocks can never occur in the first place), avoidance (detect potential deadlocks in advance and act so that deadlock will not occur) and detection with recovery (allow deadlocks to form, then find and break them). "Deadlock annihilation" is not one of them; it is not a recognised deadlock-handling technique.

Why the other options are wrong

  • (a) Deadlock prevention: a standard strategy; the system is arranged so that deadlocks can never occur in the first place.
  • (b) Timeout: a real, practical method: a transaction that cannot get a resource may wait only for a fixed time interval, and if the resource does not become available, the requesting or the holding transaction is aborted. Database systems use lock-wait timeouts too; PostgreSQL, for example, waits on a lock for a set time (deadlock_timeout) before checking for a deadlock.
  • (c) Deadlock detection and recovery: a standard strategy; deadlocks are allowed to form and are then found and broken.

Exam note: A timeout is usually counted as part of one of the main strategies (waiting a fixed interval and then aborting a transaction, or using the wait to trigger a deadlock check), not as a separate strategy. It is still a valid way of handling deadlock, so only (d) is "not a strategy".

Tip: The classic answers are prevention, avoidance and detection + recovery; anything else on the list is the odd one out.

Source: A survey of distributed deadlock detection algorithms (SIGMOD Record 15(3), 1986)
Source: Lock Management: deadlock_timeout (PostgreSQL Documentation)

Question 38Database

A transaction that completes its execution is said to be-

  • a)Committed
  • b)Aborted
  • c)Rolled back
  • d)Successful

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

Question 39Algorithms

Which of the following sorting algorithms is a divide and conquer algorithm?

  • a)Merge sort
  • b)Bubble sort
  • c)Insertion sort
  • d)Counting sort

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

Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers · Government IT officer posts guide