Answer:
Explanation:
The code in C++ is written as:
#include <iostream>
using namespace std;
int smallestIndex(int arr[],int size)
{
int min=arr[0],ind=0;
for(int i=0;i<size;i++)
{
if(min>arr[i])
{
min=arr[i];
ind=i; NOTE: ind serves as a variable that is holding the smallest
} element index of array
}
return ind;
}
int main() {
int arr[15];
cout<<"Enter 15 integers: ";
for(int i=0;i<15;i++)
cin>>arr[i];
for(int i=0;i<15;i++)
cout<<arr[i]<<" "<<endl;
int index=smallestIndex(arr,15);
cout<<"The position of the first occurrence of the smallest element in list is: "<<index<<endl;
cout<<"The smallest element in list is: "<<arr[index];
}
OUTPUT:
Enter 15 integers:
4
5
8
4
6
1
2
1
4
5
7
9
5
7
8
4 5 8 4 6 1 2 1 4 5 7 9 5 7 8
The position of the first occurrence for the smallest element in the list is 5
The smallest element in the list is: 1
Answer:Packet and circuit switching
Explanation: Packet switching is the technique through which the data is sent from the source to destination in the form of data packets on dynamic path.It is the time of connectionless switching and route generates for each packet.
Circuit switching is the switching technique having connected path for the sending and receiving of the data.They have well defined and established path for the transmission of data.
Other options are incorrect because they define the terms that are associated with the data that gets transmitted like bandwidth,transmission rate ,packet etc. These options are not the way in which data transmitted or switched.Thus, the correct option is packet and circuit switching.
Answer:
False.
Explanation:
<em>This is pertaining to LAN or Local Area Network. LAN is a type of network that is consist of one or several networks located in one geographical area or location. Wherein WAN or Wide Area Network is a type of network that is located in different or several geographical area. The basic example of WAN is the Internet. Networks of computers are connected even though they are not wired physically.</em>
Answer:
Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}
H(X)=5.4224 bits per symb
H(X|Y="not C")=0.54902 bits per symb
Explanation:
P(B)=2P(C)
P(A)=2P(B)
But
P(A)+P(B)+P(C)=1
4P(C)+2P(C)+P(C)=1
P(C)=1/7
Then
P(A)=4/7
P(B)=2/7
Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}
iii
If X={A,B,C}
and P(Xi)={4/7,2/7,1/7}
where Id =logarithm to base 2
Entropy, H(X)=-{P(A) Id P(A) +P(B) Id P(B) + P(C) Id P(C)}
=-{(1/7)Id1/7 +(2/7)Id(2/7) +(4/7)Id(4/7)}
=5.4224 bits per symb
if P(C) =0
P(A)=2P(B)
P(B)=1/3
P(A)=2/3
H(X|Y="not C")= -(1/3)Id(I/3) -(2/3)Id(2/3)
=0.54902 bits per symb
Answer:
B. Role-based access controls
Explanation:
Roll-based access control is a way to control access to the network and to data which depends on the position of employees in a department. This way the permission to access information are granted according to roles that are assigned to employees. This type of access control allows access privileges to employees only to the folders and data files which they need in order to perform their tasks and it does not allow them to access the data or information which is not relevant to them. This helps the department to secure the sensitive information and data files and reduces the risk of data breaches.