Answer:
C++ Program .
#include<bits/stdc++.h>
using namespace std;
int main()
{
int x,y;//declaring two variables x and y.
string s;//declaring string s..
cout<<"enter x and y"<<endl;
cin>>x>>y;//taking input of x and y..
if(x>=0 &&y>=0) //condition for 1st quadrant..
cout<<"the point lies in 1st Quadrant"<<endl;
else if(x<=0 &&y>=0)//condition for 2nd quadrant..
cout<<"the point lies in 2nd Quadrant"<<endl;
else if(x>=0 &&y<=0)//condition for 3rd quadrant..
cout<<"the point lies in 3rd Quadrant"<<endl;
else //else it is in 4th quadrant..
cout<<"the point lies in 4th Quadrant"<<endl;
cout<<"enter n to terminate the program"<<endl;
while(cin>>s)//if the user has not entered n the program will not terminate..
{
if(s=="n")
{
cout<<"the program is terminated"<<endl;
exit(0);
}
cout<<"you have not entered n please enter n to terminate the program<<endl;
}
}
Explanation:
The above written program is for telling the point lies in which quadrant.I am first declaring two variables x and y.Then after that taking input of x and y after that checking in which quadrant the point lies.
Taking input of the string s declared earlier for program termination the program will keep running until the user enters n.
Different types of connections are..
-A network is two or more devices connected through links.
-There are two possible types of connections: point-to-point and multipoint.
-A point-to-point connection provides a dedicated link between two devices.
Explain the different types of topologies
-Star network…
In star topology each device in the network is connected to a central device called hub. Unlike Mesh topology, star topology doesn't allow direct communication.
-Ring network…
A number of repeaters are used for Ring topology with large number of nodes, because if someone wants to send some data to the last node in the ring topology
-Bus network…
In bus topology there is a main cable and all the devices are connected to this main cable through drop lines. There is a device called tap that connects the drop
-tree topology…
Tree topologies have a root node, and all other nodes are connected which form a hierarchy. So it is also known as hierarchical topology. This topology integrates
-Computer network…
Ring Topology; Star Topology; Mesh Topology; Tree Topology; Hybrid Topology; How to select a Network Topology? Types of Networking Topologies.
-Mesh networking…
Ring Topology; Star Topology; Mesh Topology; Tree Topology; Hybrid Topology; How to select a Network Topology? Types of Networking Topologies.
Different type of networks
-Computer network…
Virtual Private Network (VPN). By extending a private network across the Internet, a VPN lets its users send and receive data.
-LAN…
Using routers, LANs can connect to wide area networks (WANs, explained below) to rapidly and safely transfer data. 3. Wireless Local Area Network (WLAN).
-Wide area network…
Wide area network, or WAN. In terms of purpose, many networks can be considered general purpose, which means they are used for everything from sending files etc.
-Metropolitan area network…
MAN or Metropolitan area Network covers a larger area than that of a LAN and smaller area as compared to WAN. It connects two or more computers that are apart.
-Wireless LAN…
WLAN (Wireless Local Area Network) helps you to link single or multiple devices using wireless communication within a limited area like home, school, or office
-Wireless network…
A Wireless Local Area Network or WLAN is a network that is used to connect different devices without using wires etc.
-Storage area network…
Storage Area Network is a type of network which allows consolidated, block-level data storage. It is mainly used to make storage last longer etc.
-Personal area network…
PAN can be used for establishing communication among these personal devices for connecting to a digital network and the internet.
-Campus area network…
A Metropolitan Area Network or MAN is consisting of a computer network across an entire city, college campus, or a small region. This type of network is large.
Explain your own understand about protocol and standards
A protocol defines a set of rules used by two or more parties to interact between themselves. A standard is a formalized protocol accepted by most of the parties that implement it.
explain layers in OSI model
Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Explain layers in tcp/ip model
Four layers of TCP/IP model are 1) Application Layer 2) Transport Layer 3) Internet Layer 4) Network Interface. ... It is also known as a network layer. Transport layer builds on the network layer in order to provide data transport from a process on a source system machine to a process on a destination system.
what are the peer to peer processing
In peer-to-peer (P2P) networking, a group of computers are linked together with equal permissions and responsibilities for processing data. Unlike traditional client-server networking, no devices in a P2P network are designated solely to serve or to receive data
Answer:
Consider the following code.
Explanation:
save the following code in read_and_interp.m
function X = read_and_interp(s)
[m, n] = size(s);
X = zeros(m, 1);
for i = 1:m
if(str2num(s(i, 2:5)) == 9999)
% compute value based on previous and next entries in s array
% s(i, 2:5) retrieves columns 2-5 in ith row
X(i,1) = (str2num(s(i-1 ,2:5)) + str2num(s(i+1,2:5)))/2;
else
X(i,1) = str2num(s(i,2:5));
end
end
end
======================
Now you can use teh function as shown below
s = [ 'A' '0096' ; 'B' '0114' ; 'C' '9999' ; 'D' '0105' ; 'E' '0112' ];
read_and_interp(s)
output
ans =
96.000
114.000
109.500
105.000
112.000