NWPGCL Assistant Engineer Exam 2018 — Question Solution | নর্থ-ওয়েস্ট পাওয়ার (এনডব্লিউপিজিসিএল) সহকারী প্রকৌশলী নিয়োগ পরীক্ষা ২০১৮ — প্রশ্ন সমাধান
- NWPGCL
- Assistant Engineer
- 2018
- 5 questions · 0 MCQ, 5 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The NWPGCL Assistant Engineer exam was held in 2018. The paper had 5 written questions. The subjects asked most were Programming (2), Database (1) and Networking (1). This page lists every question, with 1 answered and explained; the rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
নর্থ-ওয়েস্ট পাওয়ার (এনডব্লিউপিজিসিএল) সহকারী প্রকৌশলী নিয়োগ পরীক্ষার (২০১৮) এই প্রশ্নপত্রে ৫টি প্রশ্ন ছিল, বেশিরভাগ প্রোগ্রামিং ও ডেটাবেজ থেকে। এখানে ১টি প্রশ্নের ব্যাখ্যাসহ উত্তর দেওয়া আছে; বাকিগুলো ফ্রি অ্যাকাউন্টে খোলে।
- Organisation
- NWPGCL
- Post
- Assistant Engineer
- Exam date
- 2018
- Questions
- 5 (0 MCQ, 5 written)
- Exam guide
- Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
Suppose an array is {4,5,6,7}. Write a C program that will output like {4,5}, {4,6}, {4,7}, {5,6}, {5,7}, {6,7}.
Difference between Multitasking and Multiprogramming.
Sign up free to see the model answers to written questions 1–2 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What are the difference among DDL, DML and DCL?
Model answer
DDL, DML and DCL are three groups of SQL statements that differ in what they act on: DDL defines the structure (schema), DML works on the data rows inside that structure, and DCL controls who may access it.
| Basis | DDL (Data Definition Language) | DML (Data Manipulation Language) | DCL (Data Control Language) |
|---|---|---|---|
| Acts on | Schema objects: tables, views, indexes, sequences | Rows stored in tables | Privileges of users and roles |
| Main commands | CREATE, ALTER, DROP, TRUNCATE, RENAME, COMMENT | SELECT, INSERT, UPDATE, DELETE, MERGE | GRANT, REVOKE |
| What changes | The data dictionary (metadata) | Stored values (SELECT only reads them) | Access rights |
| Rollback | Oracle and MySQL commit implicitly before and after a DDL statement, so it cannot be rolled back there; PostgreSQL and SQLite can roll back most DDL run inside a transaction | Can be undone with ROLLBACK until COMMIT | Oracle and MySQL also commit implicitly around GRANT/REVOKE |
| Typical user | Database designer, DBA | Applications, end users | DBA, security administrator |
Examples on one table
-- DDL: create and change the structure
CREATE TABLE branch (
branch_code CHAR(4) PRIMARY KEY,
city VARCHAR(30) NOT NULL
);
ALTER TABLE branch ADD opened_on DATE;
-- DML: work with the rows
INSERT INTO branch (branch_code, city, opened_on)
VALUES ('B001', 'Rajshahi', '2019-07-01'), ('B002', 'Khulna', '2021-01-10');
UPDATE branch SET city = 'Bogura' WHERE branch_code = 'B002';
SELECT branch_code, city, opened_on FROM branch ORDER BY branch_code;
DELETE FROM branch WHERE branch_code = 'B001';
-- DCL: give and take away rights
GRANT SELECT, INSERT ON branch TO teller_role;
REVOKE INSERT ON branch FROM teller_role;
-- DDL: remove the table with its rows
DROP TABLE branch;
Result of the SELECT (before the DELETE):
| branch_code | city | opened_on |
|---|---|---|
| B001 | Rajshahi | 2019-07-01 |
| B002 | Bogura | 2021-01-10 |
Inside BEGIN … ROLLBACK, the DELETE is undone and both rows remain.
DBMS notes
- The user/role name in GRANT differs by DBMS (MySQL writes
'teller'@'localhost', roles are created with CREATE ROLE first). SQLite has no GRANT/REVOKE at all; access is controlled by file permissions. - Oracle's own documentation lists GRANT, REVOKE, TRUNCATE, RENAME and COMMENT under DDL, and MERGE, LOCK TABLE, EXPLAIN PLAN and CALL under DML; the separate "DCL" group is the common exam classification.
- The multi-row INSERT and the '2019-07-01' date strings run as written in MySQL, PostgreSQL and SQLite; Oracle before 23ai needs one INSERT per row and a DATE '2019-07-01' literal (or TO_DATE).
- Many classifications also name DQL (SELECT) and TCL (COMMIT, ROLLBACK, SAVEPOINT) as separate groups.
graph LR
SQL["SQL statements"] --> DDL["DDL: structure - CREATE, ALTER, DROP, TRUNCATE"]
SQL --> DML["DML: rows - SELECT, INSERT, UPDATE, DELETE, MERGE"]
SQL --> DCL["DCL: rights - GRANT, REVOKE"]
SQL --> TCL["TCL: transactions - COMMIT, ROLLBACK, SAVEPOINT"]
Vendor documentation: Oracle – Types of SQL statements, MySQL 8.4 – Statements that cause an implicit commit, PostgreSQL – TRUNCATE (rolled back with its transaction), PostgreSQL – CREATE DATABASE (cannot run inside a transaction block), SQLite – SQL features not implemented.
Exam tip: remember "structure, rows, rights" for DDL, DML, DCL, give two commands with an example for each, and note that DML can be rolled back while DDL commits implicitly in Oracle and MySQL.
Find output:
#include<iostream>
using namespace std;
int main(){
int i=1,j=1,k=1;
cout<<++i || ++j && ++k;
cout<<i<<j<<k;
return 0;
}
Name the OSI layer that converts the bit stream into frames.
Sign up free to see the model answers to written questions 4–5 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Keep going with a free account · ফ্রি অ্যাকাউন্টে যা যা করতে পারবেন
4 more answers from this paper open with a free account.
এই প্রশ্নপত্রের আরও ৪টি উত্তর, ধাপে ধাপে ব্যাখ্যাসহ, ফ্রি অ্যাকাউন্টে খুলবে।
Free account · 1 day of Premium free
Paper analysis · প্রশ্নপত্র বিশ্লেষণ
Its questions come from 4 syllabus chapters; the biggest is Language Basics & Syntax, in Programming, with 2 questions. Language Basics & Syntax is asked in 122 other papers too (2015–2026).
Its biggest topics · প্রধান টপিক
Questions in this paper, and how many of our other papers ask the topic
- Language Basics & Syntax Programming · 122 other papers, 2015–20262
- OSI & TCP/IP Models Networking · 112 other papers, 2012–20261
- SQL & Queries Database · 93 other papers, 2015–20261
- Processes & Threads Operating Systems · 55 other papers, 2011–20261
From our own past papers: each question filed under one syllabus chapter. Practice and held questions are not counted.
Questions about this paper · সাধারণ প্রশ্ন
- How many questions were in the NWPGCL Assistant Engineer exam (2018)?
- 5 written questions.
- Which subjects were asked most in the NWPGCL Assistant Engineer exam (2018)?
- Programming (2), Database (1) and Networking (1), out of 5 questions.
- When was the NWPGCL Assistant Engineer exam held?
- In 2018. The exact day isn't in our records.
- Where can I find the NWPGCL Assistant Engineer exam (2018) question solution?
- On this page: 1 of the 5 questions are shown with worked answers. The rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers