Answer:
Following are the solution part to this question:
for(i=0;i< oldData.size()&&i< newData.size();i++) //defefing loop to assign newData value to oldData value
{
if (oldData.at(i) != newData.at(i)) //defefing if block to check count value
{
oldData = newData; //assign newData value to oldData value
break; //using break keyword
}
else //defefing else block
{
cout << "Data matches!" << endl;//print message
break; //using break keyword to exit from loop
}
}
Explanation:
The full Program to this question can be described as follows:
#include<vector>//defefing header file
#include<stdlib.h>//defefing header file
#include<iostream>//defefing header file
using namespace std;
int main() //defefing main method
{
vector<int> oldData(3); //defefing vector array oldData
vector<int> newData(4);//defefing vector array newData
unsigned int i = 0; //defefing integer variable
oldData.at(0) = 10; //initilizing value oldData
oldData.at(1) = 12;//initilizing value oldData
oldData.at(2) = 18;//initilizing value oldData
newData.at(0) = 25;//initilizing value newData
newData.at(1) = 27;//initilizing value newData
newData.at(2) = 29;//initilizing value newData
newData.at(3) = 23;//initilizing value newData
for(i=0;i< oldData.size()&&i< newData.size();i++) //defefing loop to assign newData value to oldData value
{
if (oldData.at(i) != newData.at(i)) //defefing if block to check count value
{
oldData = newData; //assign newData value to oldData value
break; //using break keyword
}
else //defefing else block
{
cout << "Data matches!" << endl;//print message
break; //using break keyword to exit from loop
}
}
for (i = 0; i < oldData.size(); ++i) //defining loop to print value
{
cout << oldData.at(i) << " ";//print oldData value
}
return 0;
}
Output:
25 27 29 23
Description of the program can be described as follows:
In the above-given program first, we defining header file after defining header files inside the main method two vector array that is "oldData and newData" is declared which assigns some integer value. In the next step, a loop is declared that uses the "i" variable which starts from 0 and ends when both array sizes were same, inside the loop, and if block is declared that interchange value newData to oldData, and use the break keyword. In the next step another for loop is declared that prints the oldData array value.Consider a TCP connection with a 1ms RTT in which the sender has 50,000 bytes of data to send and there are no losses and no congestion. The receiver has an initial advertised window of 10,000 bytes and reads 2,000 bytes of data once every two seconds. What is the advertised window in bytes after one second
Answer:
Advertised window in bytes after one second = 0 bytes.
Explanation:
Given:
Sender bytes = 50,000 bytes
Receiver's initial advertised window = 10,000 bytes
Read rate = 2,000 bytes / per 2 second
Find:
Advertised window in bytes after one second = ?
Computation:
We know that, 10,000 bytes have been buffered in receiving initial advertised window.
Receiver read 2,000 bytes in every 2 second.
So, receiver will not able to read anything in 1 second.
Therefore,
Advertised window in bytes after one second = 0 bytes.
Which of the following audio file formats is best
suited for listening to music on a portable audio
device?
(A)BWF
(B)RA
(C)Lossy AIFF
(D)WMA
Answer:
D. WMA
Explanation:
The following audio file formats that is the best suited for listening to music on a portable audio device is WMA.
Answer:
(D) is the answer WMA
Explanation:
Give the other person brainliest ↑↑↑
hope it helps
For each of the following, write C++ statements that perform the specified task. Assume the unsigned integer array will be located at 1002500 in memory when the array is declared. An unsigned integer occupies four bytes. The data type of unsigned integer is unsigned. Use the constant integer variable size that is initialized to value 5 to represent the size of the array. The very first element of the array is the 0th element.
Answer:
The answer is given as below.
Explanation
As the complete question is not given, the complete question is found online and is attached here with.
a)
int values[SIZE] = {2,4,6,8,10};
b)
int *aPtr;
c)
for(i=0;i<SIZE;i++)
printf("%d", values[i]);
d)
aPtr=values;
aPtr=&values[0];
e)
for(i=0;i<SIZE;i++)
printf("%d", *(aPtr+i));
f)
for(i=0;i<SIZE;i++)
printf("%d", *(values+i));
g)
for(i=0;i<SIZE;i++)
printf("%d\n", aPtr[i]);
h)
array subscript notation: values[3]
pointer/offset notation: *(values +3)
pointer subscript notation: aPtr[3]
pointer/offset notation: *(aPtr + 3)
i)
1002512 is the address is referenced by aPtr + 3 and 8 is the value stored at that location.
j)
1002500 is the address referenced by aPtr -= 2 and 2 is stored at that location.
Which type of appliance can host several functions, such as antimalware, firewall, content filter, and proxy server
Answer:
Web Security Appliance (WSA)
Answer:
utm
Explanation:
UnifiedThreat Management (UTM): A security appliance and/or software tool
which contains a combination of any of the following: antivirus/antimalware, firewall,
proxy server, content filtering, spam filtering, intrusion detection system, intrusion
prevention system, and network access control. The more robust the tool, the
higher the number of features available.
Using the chores.csv file fat the very bottom; write an awk script to return the average number of minutes required to complete a chore. Your solution must handle an undefined number of chores. zero points will be given to solutions that use a static number in their calculation.
Format floating point numbers to 2 decimal places.
Example output;
Average: 28.12
chores.csv
Chore Name,Assigned to,estimate,done?
Laundry,Chelsey,45,N
Wash Windows,Sam,60,Y
Mop kitchen,Sam,20,N
Clean cookware,Chelsey,30,N
Unload dishwasher,Chelsey,10,N
Dust living room,Chelsey,20,N
Wash the dog,Sam,40,N
Answer: Provided in the explanation section
Explanation:
According to the question:
Using the chores.csv file fat the very bottom; write an awk script to return the average number of minutes required to complete a chore. Your solution must handle an undefined number of chores. zero points will be given to solutions that use a static number in their calculation.
Format floating point numbers to 2 decimal places.
Example output;
Average: 28.12
chores.csv
Chore Name,Assigned to,estimate,done?
Laundry,Chelsey,45,N
Wash Windows,Sam,60,Y
Mop kitchen,Sam,20,N
Clean cookware,Chelsey,30,N
Unload dishwasher,Chelsey,10,N
Dust living room,Chelsey,20,N
Wash the dog,Sam,40,N
ANSWER:
BEGIN{
FS=","
}
{
if(NR!=1)
sum += $3
}
END{
avg=sum/NR
printf("Average: %.2f ", avg)
}' ./chores.csv
cheers i hope this helped !!
Write a script called checkLetter.sh Review Greeting.sh for an example. Use a read statement and ask user to "Enter A, B, or C: "
If user types A, echo "You entered A"
If user types B, echo " You entered B"
If user types C, echo " You entered C"
Use the case structure to test the user’s string.
If user types any letter from lower case ‘a through z’ or upper case ‘D through Z’, echo "You did not enter A, B, or C".
Answer:
The code is given as below: The input and output is as given for one case.
Explanation:
echo -e "Enter A, B or C : \c" #Printing the line on the screen
read -rN 1 test #read the character in the variable test
echo
case $test in #Setting up the case structure for variable test
[[:lower:]] ) #checking all lower case letters
echo You did not enter A, B or C;;
[D-Z] ) #checking upper case letters from D to Z
echo You did not enter A, B or C;;
A ) #Condition to check A
echo You entered A;;
B ) #Condition to check B
echo You entered B;;
C ) #Condition to check C
echo You entered C;;
esac #Exiting the case structure