Professional Documents
Culture Documents
Northern Electricity Supply Company Limited (NESCO) : Am (Ict)
Northern Electricity Supply Company Limited (NESCO) : Am (Ict)
1. (a)
(i) Linux command for showing all files including the hidden files inside home directory.
(i) Soln: $ ls –a
(b)
(i) Write a JavaScript function for validate a phone number of 10 digits with no comma, no spaces,
no punctuation and there will be no + sign in front the number. Simply the validation will remove
all non-digits and permit only phone numbers with 10 digits.
(i) Soln:
function phonenumber(input){
var phone_no = /^\d{10}$/;
if((input.value.match(phone_no){
alert("Valid Phone No");
return true;
}else{
alert("Invalid Phone No");
return false;
}
}
MD.ATUL KABIR
2
3. (a) SQL Query for list the dept name whose average salary is greater than the average salary of
the company.[Table structure given; Something Like…]
(b) Design the communication for the user login system for a MVC pattern framework.
Soln:
𝟏 𝟐 𝟑
4.(a) Write a c/c++ program up to series n: 𝟐𝑿𝟑 + 𝟑𝑿𝟒 + 𝟒𝑿𝟓 + ⋯ .
Soln:
#include <iostream>
using namespace std;
int main(){
double i,sum=0,n;
cout<<"Enter value of n: ";
cin>>n;
for(i=0;i<=n;i++){
sum+=i/((i+1)*(i+2));
}
cout<<"Sum is: "<<sum;
return 0;
}
(b) (i) For which data structure operations, Linked List is better than Array?(Insert, Delete,
Search).
Soln: Linked list is faster than Array for insert and delete operation But for search Array is faster than
Linked list.
(ii) Maximum and Minimum no of Nodes for a binary tree of height 7 where root is considered as
height 0.
Soln: Minimum no of Nodes: 20+1 -1 = 1
Maximum no of Nodes: 27+1 -1 = 255
5. Finding bit rate from a TDM network using Nyquist Theorem.[Something like…]
MD.ATUL KABIR