You are on page 1of 12

PIEAS Interview

1. Introduce yourself?
2. Drawing graph given the equation?
Here, The y intercept give as the point on y axis where graph will pass through. Run and rise tell
us every time we move 1 unit to right then we have to go down 2 units.

First we run than rise.

Given the standard from of equation, You have to find the x and y intercept,

For finding x intercept simply put zero in place of y and similarly find the y intercept once you find
both of them simply connect them.

For quadratic equation, you have to find the vertex (The point of parabola starting) which can be
easily found using the point

x = -b/2a

Once you find vertex you can find value for neighboring points.

Basically, as this is not a quadratic equation standard form we can not find the vertex directly,
Instead we need to first complete the square and transform it into the form

V(H,k) which is the vertex

C tells horizontal/phase shift and D tells the vertical shift. In above image P is the period.

Rules remain same for both sin and cos just the design change for each graph respectively.

3. Equation for parabola and straight line?


Parabola equation y = ax^2+bx+c

Straight line equation y = mx + b

Circle equation x^2 + y^2 = 1

4. Write second order deferential equation?


5. What is interpolation and where it is use?
Given a points on the graph you will find the best line that can be using linear regression or
anything else. Once you find out an equation of the line that best fits then you might use that
equation to predict what will value of the function for some point. Basically, if the data point you
are predicting for is in between the value of the actual point you know than this called
interpolation and if they are beyond the known point than that is extrapolation. Interpolation is
more accurate than extrapolation.

6. Access time for RAM and hard disk?


Memory access time is how long it takes for a character in RAM to be transferred to or from the
CPU. Fast RAM chips have an access time of 10 nanoseconds (ns) or less.

While access times of fast hard disks are typically from 5 to 10 milliseconds, solid state drive (SSD)
access times are in the 25 to 100 microsecond range.

7. What is big data?


Big data is a combination of structured, semistructured and unstructured data collected by
organizations that can be mined for information and used in machine learning projects, predictive
modeling and other advanced analytics applications. Big data is often characterized by the 3Vs:
the large volume of data in many environments, the wide variety of data types stored in big data
systems and the velocity at which the data is generated, collected and processed.

8. What is Fourier transformation?


Fourier transformation is a tool for frequency analysis of signals.

There are types of fourier transformation

1. Forward Fourier Transformation.

It converts function of time into function of frequency.

2. Inverse Fourier Transformation.

It converts function of frequency into function of time.

9. Why we use numerical analysis?


Basically, in numerical methods what we do is instead of making or finding exact answers we
make approximation which can be wrong as well.

Numerical Analysis is a technique of mathematical analysis that uses numerical approximation in


particular to obtain accurate results for some of the problems that are hard to resolve otherwise.

1. Making Weather Predictions

2. Car Safety Enhancement

3. Machine Learning

10. Where artificial intelligence is use?


1. AI In Marketing
2. AI In Banking
3. AI In Finance
4. AI In Agriculture
5. AI In HealthCare
6. AI In Gaming
7. AI In Space Exploration
8. AI In Autonomous Vehicles
9. AI In Chatbots

11. Where stack and queue is used in OS?


The general use of stack data structure in operating systems is to keep track of branches and
subroutine calls. Each process has one or more last-in-first-out (LIFO) stacks that are used to store
parameters and calling addresses for procedure and system calls.

Multiprogramming computer operating systems use queues in almost all its main components,
including memory and process management.

12. Application of data mining?


Here is the list of areas where data mining is widely used −

Financial Data Analysis


Retail Industry
Telecommunication Industry
Biological Data Analysis
Other Scientific Applications
Intrusion Detection

13. How fast is RAM than ROM?


RAM is faster than ROM just because writing data to a ROM chip is a slow process, whereas
writing data to a RAM chip is a faster process. A RAM chip can store multiple gigabytes (GB) of
data, up to 16 GB or more per chip; A ROM chip typically stores only several megabytes (MB) of
data, up to 4 MB or more per chip. ROM is a form of permanent storage while RAM is a form of
temporary storage. ROM is non-volatile memory while RAM is volatile memory. ROM can hold
data even without electricity, while RAM needs electricity to hold data.

14. What is mean by 2GHz?


In a computer, clock speed refers to the number of pulses per second generated by an oscillator
that sets the tempo for the processor. Clock speed is usually measured in MHz (megahertz, or
millions of pulses per second) or GHz (gigahertz, or billions of pulses per second). Today's
personal computers run at a clock speed in the hundreds of megahertz and some exceed one
gigahertz.

Clock speed is one measure of computer "power," but it is not always directly proportional to the
performance level. If you double the speed of the clock, leaving all other hardware unchanged,
you will not necessarily double the processing speed. The type of microprocessor, the bus
architecture, and the nature of the instruction set all make a difference. In some applications, the
amount of random access memory (RAM) is important, too. Some processors execute only one
instruction per clock pulse. More advanced processors can perform more than one instruction
per clock pulse. The latter type of processor will work faster at a given clock speed than the
former type. Similarly, a computer with a 32-bit bus will work faster at a given clock speed than a
computer with a 16-bit bus. For these reasons, there is no simplistic, universal relation among
clock speed, "bus speed," and millions of instructions per second (MIPS).

15. What will be the time in case sorting a list of


1000 or million elements?
16. What is dangling pointer?
Basically, A pointer pointing to a memory location that has already deleted is called dangling
pointer.
17. What is CPU and GPU?
18. How GPU works?
It stands for graphical processing unit. It's a special piece of hardware which is very good at
certain type of mathematic operations. CPU are made of few cores while GPU is made up of 100
of cores. When a CPU does a computation it does it in serial form one after the other. GPU does
computation in parallel. CPU is designed to be much more versatile and balance out all these
different work loads. GPU architecture usually use lot's of identical compute units that deal with
solving with the similar mathematical functions that determine graphics.

19. What is data compression and hiding?


Data compression squeeze's data in smaller size. To do this, we have to encode data using fewer
bits than the original representation.

One way to compress data is reduce is to reduce repeated or redundant data.

In above length, we are using run length encoding. Here, instead of telling that there will be
seven red color what we do is add another byte representing run length for yellow instead of
repeating yellow seven time. Here, we may need to add additional data but this is worth it. Here,
we didn't lose any data we can get exact original representation back this is known as loss less
compression.

In lossy compression, we discard some data in order to compress the data. For example for
audio file there will be some frequency which human can not hear so we will discard them.
Similarly image compression some times also used lossy compression. It effects the quality
depend upon how much compression you have done.

Data hiding is a software development technique specifically used in object-oriented


programming (OOP) to hide internal object details (data members). Data hiding ensures exclusive
data access to class members and protects object integrity by preventing unintended or intended
changes.

20. Tower of Hanoi?


21. Inorder, preorder and postorder traversal?
22. What is memory leakage?
The poorly program applications that reduce the available amount of heap memory is nothing but
memory leakage. Basically, when we run any program a system call is generated to RAM to
reserve some memory for a HEAP which will be use by the program while executing. When
program completes their execution these allocated memory needs to be empty so that they can
be allocated to any other program. Leakage happens when the exiting program fails to
communicate that it's reserved memory can now be free and use by other programs.

23. Huffman encoding?


Once the tree is created we assign 0 to the left edge and 1 to the right edge. Giving us the code for
each character.

24. Thevnin theorem?


It is used to calculate the current that is going through the load resistor.
You have to find the Thevenin resistance that is nothing but adding all the resistors.

25. Draw graph of e^-x and explain the graph with


behavior?
26. What is pointer and dangling pointer ? Explain
the difference with example?
Pointer points to the address of another variable.

27. What is huffman coding and how it is used in


compression? Draw graph that show the behaviour
of huffman coding?
28. What is different between data and
information?
Data are simply facts or figures — bits of information, but not information itself. When data are
processed, interpreted, organized, structured or presented so as to make them meaningful or
useful, they are called information. Information provides context for data.

29. What is the difference between data mining and


machine learning?
Data mining and machine learning may, at heart, both be about learning from data and making
better decisions. But the way they go about this is different. Here are some of the key differences
between the two:

While data mining is simply looking for patterns that already exist in the data, machine
learning goes beyond what’s happened in the past to predict future outcomes based on the
pre-existing data.
In data mining, the ‘rules’ or patterns are unknown at the start of the process. Whereas, with
machine learning, the machine is usually given some rules or variables to understand the
data and learn.
Data mining is a more manual process that relies on human intervention and decision
making. But, with machine learning, once the initial rules are in place, the process of
extracting information and ‘learning’ and refining is automatic, and takes place without
human intervention. In other words, the machine becomes more intelligent by itself.
Data mining is used on an existing dataset (like a data warehouse) to find patterns. Machine
learning, on the other hand, is trained on a ‘training’ data set, which teaches the computer
how to make sense of data, and then to make predictions about new data sets.

30. What is parity?


A concept used to detect errors. A single bit error is detected by it.

We send a bit stream along with an extra bit also known as parity bit which tells us the number
of 1's in the stream of bits.

There are two type of parity

1. Even
In even the value for parity bit depends upon the number of 1's in bit of stream if they are odd
than we will make even by adding parity bit as 1. if they are even then we will simply put parity bit
as 0.

2. Odd

31. Difference b/w frequency domain and time


domain?
In time domain signal appears as sinusoidal waves and in frequency domain signal appears as
distinct impulses.

In time domain we need to find the time variations of amplitude but in frequency domain we
need to find the response of the system as a function of frequency

32. Difference b/w cloud and server?


Cloud Servers
Cloud servers can be configured to provide levels of performance, security and control similar to
those of a dedicated server. But instead of being hosted on physical hardware that’s solely used
by you, they reside in a shared “virtualized” environment that’s managed by your cloud hosting
provider. You benefit from the economies of scale of sharing hardware with other customers.
And, you only pay for the exact amount of server space used. Cloud servers also allow you to
scale resources up or down, depending on demand, so that you're not paying for idle
infrastructure costs when demand is low.

With cloud servers, you can optimize IT performance without the huge costs associated with
purchasing and managing fully dedicated infrastructure. Businesses with variable demands and
workloads often find that cloud servers are an ideal fit.

Dedicated Servers
A dedicated server is a physical server that is purchased or rented entirely for your own business
needs. Dedicated servers are typically used by large businesses and organizations that require
exceptionally high levels of data security, or organizations that have steady, high demands for
server capacity.

With dedicated servers, businesses still need the IT capacity and expertise to manage ongoing
maintenance, patches and upgrades. Businesses using I/O-heavy applications, such as databases
and big data platforms, find significant value in bare metal dedicated hardware.

33. int*a; a=20; is it right?


Segmentation fault is a specific kind of error caused by accessing memory that “does not belong
to you.

There will be no error. But if you try to print the value of that pointer that will result in
segmentation fault.

34. What is intrusion detection?

Intrusion Detection System (IDS)


An Intrusion Detection System (IDS) is a system that monitors network traffic for suspicious
activity and issues alerts when such activity is discovered. It is a software application that scans a
network or a system for harmful activity or policy breaching. Any malicious venture or violation is
normally reported either to an administrator or collected centrally using a security information
and event management (SIEM) system. A SIEM system integrates outputs from multiple sources
and uses alarm filtering techniques to differentiate malicious activity from false alarms.

Although intrusion detection systems monitor networks for potentially malicious activity, they are
also disposed to false alarms. Hence, organizations need to fine-tune their IDS products when
they first install them. It means properly setting up the intrusion detection systems to recognize
what normal traffic on the network looks like as compared to malicious activity.

Intrusion prevention systems also monitor network packets inbound the system to check the
malicious activities involved in it and at once sends the warning notifications.

Classification of Intrusion Detection System:

IDS are classified into 5 types:

1. Network Intrusion Detection System (NIDS):

Network intrusion detection systems (NIDS) are set up at a planned point within the network
to examine traffic from all devices on the network. It performs an observation of passing
traffic on the entire subnet and matches the traffic that is passed on the subnets to the
collection of known attacks. Once an attack is identified or abnormal behavior is observed,
the alert can be sent to the administrator. An example of an NIDS is installing it on the
subnet where firewalls are located in order to see if someone is trying crack the firewall.
2. Host Intrusion Detection System (HIDS):

Host intrusion detection systems (HIDS) run on independent hosts or devices on the
network. A HIDS monitors the incoming and outgoing packets from the device only and will
alert the administrator if suspicious or malicious activity is detected. It takes a snapshot of
existing system files and compares it with the previous snapshot. If the analytical system files
were edited or deleted, an alert is sent to the administrator to investigate. An example of
HIDS usage can be seen on mission critical machines, which are not expected to change their
layout.
3. Protocol-based Intrusion Detection System (PIDS):

Protocol-based intrusion detection system (PIDS) comprises of a system or agent that would
consistently resides at the front end of a server, controlling and interpreting the protocol
between a user/device and the server. It is trying to secure the web server by regularly
monitoring the HTTPS protocol stream and accept the related HTTP protocol. As HTTPS is un-
encrypted and before instantly entering its web presentation layer then this system would
need to reside in this interface, between to use the HTTPS.
4. Application Protocol-based Intrusion Detection System (APIDS):

Application Protocol-based Intrusion Detection System (APIDS) is a system or agent that


generally resides within a group of servers. It identifies the intrusions by monitoring and
interpreting the communication on application specific protocols. For example, this would
monitor the SQL protocol explicit to the middleware as it transacts with the database in the
web server.
5. Hybrid Intrusion Detection System :

Hybrid intrusion detection system is made by the combination of two or more approaches of
the intrusion detection system. In the hybrid intrusion detection system, host agent or
system data is combined with network information to develop a complete view of the
network system. Hybrid intrusion detection system is more effective in comparison to the
other intrusion detection system. Prelude is an example of Hybrid IDS.

Detection Method of IDS:


1. Signature-based Method:

Signature-based IDS detects the attacks on the basis of the specific patterns such as number
of bytes or number of 1’s or number of 0’s in the network traffic. It also detects on the basis
of the already known malicious instruction sequence that is used by the malware. The
detected patterns in the IDS are known as signatures.

Signature-based IDS can easily detect the attacks whose pattern (signature) already exists in
system but it is quite difficult to detect the new malware attacks as their pattern (signature)
is not known.

2. Anomaly-based Method:

Anomaly-based IDS was introduced to detect the unknown malware attacks as new malware
are developed rapidly. In anomaly-based IDS there is use of machine learning to create a
trustful activity model and anything coming is compared with that model and it is declared
suspicious if it is not found in model. Machine learning based method has a better
generalized property in comparison to signature-based IDS as these models can be trained
according to the applications and hardware configurations.

Comparison of IDS with Firewalls:

IDS and firewall both are related to the network security but an IDS differs from a firewall as a
firewall looks outwardly for intrusions in order to stop them from happening. Firewalls restrict
access between networks to prevent intrusion and if an attack is from inside the network it don’t
signal. An IDS describes a suspected intrusion once it has happened and then signals an alarm.

35. What is DOS and DDOS?


Denial of service attack is used to flood the server with a lot of packets. If that packets are coming
from only one internet or computer than this is DOS attack.

Make server inaccessible to others.

DDOS is similar to DOS but the traffic/packet send to the target come from multiple sources.

We can prevent using a strong firewall.

36. Which are passed by reference and where are by


value and what about image?
In C, by default parameter to the function are passed by values however we can pass parameters
by reference using the pointers.

37. Difference b/w variable life and scope?


The scope of a variable is the part of the program within which the variable can be used. So, the
scope describes the visibility of an identifier within the program.

The lifetime* of a variable or function is the time duration for which memory is allocated to store it,
and when that memory is released. It also referred as *extent of a variable.

38. What is cloud computing?


It's on demand delivery of IT resources via the internet, with pay as you go pricing. Instead of
buying dedicated services you can buy the technology services such as computing power, storage
and databases on as needed basis from the cloud provider.

39. What is cloud?


Something that is stored on cloud is something which is stored on internet server. You can access
data from it anytime and anywhere when you are connected to the internet.

40. Array is passed by value or reference?


When an array is a parameter of a function (without the const keyword) then any changes made
to the values in the array will be seen in the original calling function. Therefore, we say that
arrays are passed by reference by default.

Basically, when you create an array

int a[] = {1,2,3}

a is actually containing the base address value of array. In more specifically, We can say that a[] is
equal to a* that are pointer.

41. What is use of const?


The variables which are initiated only once and they cannot be reassigned again if do there will be
error.

const int a = 2;

42. Examples of runtime exception?


Examples for RuntimeException are illegal cast operation, inappropriate use of a null pointer,
referencing an out of bounds array element. Error exception classes signal critical problems that
typically cannot be handled by your application. Examples are out of memory error, stack
overflow, failure of the Java VM.

43. Application of linear algebra?


1. Ranking in search engines
2. Graphics
3. Facial recognition
4. Signal analysis

44. What is base of log and ln?


The difference between log and ln is that log is defined for base 10 and ln is denoted for base e.
For example, log of base 2 is represented as log2 and log of base e, i.e. loge = ln (natural log).

A natural logarithm can be referred to as the power to which the base ‘e’ that has to be raised to
obtain a number called its log number. Here e is the exponential function. It was initially
discovered in the 17th century by John Napier, who discovered and conceptualized the theory of
logarithms. Before looking into the key difference between ln and log, let’s understand the
definition of log and ln.

45. Book name and authors you read in bachelor's?


1. Computer Networking: A Top-Down Approach Featuring the Internet by K.W. Ross.
2. MODERN OPERATING SYSTEMS by ANDREW S. TANENBAUM
3. Introduction of automation theory language and computational by Ullman.
4. Numerical analysis by Richard burden.
5. Magic of thinking big by David Schwartz.
6. Mindset: The New Psychology of Success Book by Carol Dweck.

46. Public office holder names?


Chief minister of Punjab Usman Buzdar

Chief minister of Sindh Syed Murad Ali Shah

Chief minister of KPK Mahmood Khan

Chief minister of Balochistan Jam Kamal Khan

Governor of Punjab Chaudry Muhammad Sarwar

Governor of Sindh Imran Ismail

Governor of KPK Shah Farman

Governor of Balochistan Amanullah Khan

Chief justice of Pakistan Gluzar Ahmed

Foreign minister Shah Mahmood Qureshi

Defence Minister Pervez khattak

Education Minister Shafqat Mehmood

Minister of science and technology Fawad Chaudry

Advisor on finance and revenue Abdul Hafeez Shaikh

47. Where is Persian gulf located?


Western Asia.

Primary
Gulf of Oman
inflows

Basin Iran, Iraq, Kuwait, Saudi Arabia, Qatar, Bahrain, United Arab Emirates and
countries Oman (exclave of Musandam)

48. Why PIEAS?


49. Hobbies?
1. I like hiking
2. Reading about Industry trends

50. Capitals of countries?


51. You are traveling from fsd to lhr with speed of
120 km/h how much distance covered in 7 minutes?
1. Divide km with 60
2. Multiply the above result with number of minutes
52. 3 weakness and strengths?
53. Where is swiss canal?
The Suez Canal (Arabic: ‫قناة السويس‬‎qanāt as-suwēs) is an artificial sea-level waterway in Egypt,
connecting the Mediterranean Sea to the Red Sea.

54. 10 cities of balochistan?


1. Quetta
2. Turbat
3. Chaman
4. Gwadar
5. sibi
6. Sui
7. hub
8. loralai
9. Dera Bugti
10. Pasni

55. Where is philphin and maldive?


Philippines, island country of [Southeast Asia](https://www.britannica.com/place/Southeast-Asia.

Maldives, in full Republic of Maldives, also called Maldive Islands, independent island country
in the north-central Indian Ocean.

56. First and second prime minister and governor


general of pakistan?
1st prime minister Liaquat Ali Khan.

2nd prime minister Sir khawaja Nizamudin.

1st governor general Quaid e Azam

2nd governor general Sir khawaja Nizamudin

57. Who is AK fazul haq?


Abul Kasem Fazlul Huq popularly known as Sher-e-Bangla, was a Bengali statesman and jurist
who served as the first Prime Minister of Bengal and later as the Home Minister of Pakistan.

58. Who is Nor ul Amin?


Nurul Amin, referred to as the 'Patriot of Pakistan', was a prominent Pakistani leader, and a jurist
who served as Prime Minister of Pakistan. He is noted as being the last Bengali leader of Pakistan.

59. When is Pakistan day and defense and


independence day?
Pakistan day is 23 March for Lahore resolution passing.

Defense day is 6 September 1965 war saving Pakistani Punjab.


60. What is PCSIR?
Pakistan Council of Scientific and Industrial Research in Islamabad.

61. Where is red sea?


The Red Sea is a seawater inlet of the Indian Ocean, lying between Africa and Arabia. Its
connection to the ocean is in the south, through the Bab el Mandeb strait and the Gulf of Aden.
To its north lie the Sinai Peninsula, the Gulf of Aqaba, and the Gulf of Suez.

62. Name of three mosques of Saudi Arabia?


1. Ayisha
2. Abu Bakr
3. Great mosque of Mecca
4. Masjid ul Nabi
5. Kuba

63. Will you get admission if you are regular?


No, because want to have a direction in mind.

64. Will you get admission if you are given IT


endowment fund?
No, because my parents already suffered a lot for me. I just don't want to be more burden to
them.

65. What is your favorite subject?


Operating system.

66. Draw bandpass filter?


What we want is to allow only particular band of frequency to pass through circuit and rejects the
rest frequencies.

67. What is normal distribution?


It is also known as Gaussian distribution. It is continuous probability distribution.

In here the distribution is symmetric about mu that is the mean/medium of probability


distribution.

68. What is probability?


69. What is conditional probability?

You might also like