The answer to this is FALSE. I just took the test & got 100%.
Answer:
The program in C++ is as follows:
#include <fstream>
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
string filename;
cout<<"Filename: ";
cin>>filename;
ifstream inFile(filename);
if(!inFile) {
cout << endl << "Cannot open file " << filename;
return 1; }
ofstream fout;
ifstream fin;
fin.open("invalid-numbers.txt");
fout.open ("invalid-numbers.txt",ios::app);
double sum = 0; int valid = 0; int invalid = 0;
double num = 0;
while(!inFile.eof()) {
inFile >> num;
if(num >= 0 && num<=110){ sum+=num; valid++; }
else{ invalid++;
if(fin.is_open()){
fout<<fixed<<setprecision(2)<<num<<"\n"; } } }
fin.close();
fout.close();
inFile.close();
cout<<"Total values: "<<valid+invalid<<endl;
cout<<"Invalid values: "<<invalid<<endl;
cout<<"Valid values: "<<valid<<endl;
cout<<"Average of valid values: "<<fixed<<setprecision(2)<<sum/valid<<endl;
double inv;
ifstream inFiles("invalid-numbers.txt");
while(!inFiles.eof()) {
inFiles >> inv;
cout<<inv<<"\n";
}
inFiles.close();
return 0;
}
Explanation:
See attachment for source file where comments are used to explain each line
I believe its "By updating its computer driver i know its not software im pretty sure its a driver because all the components in a comuter have a specific driver and they need to be mainitanced yearly. P.s Glad to help you.
Answer:
Explanation:
In data communications, a protocol is <em>connectionless </em>if it describes communication between two devices in a network without first establishing or verifying establishment of some link (connection) between the two devices. In a connectionless protocol, data are exchanged between processes or devices without a prior check of whether the processes are ready to transmit data or not. In this type of protocol, there's no verification put in place to remember if these processes were or are in communication. Connectionless protocols are also called stateless protocols. Because connectionless protocol cannot be relied upon due to its lack of delivery-assurance policy, it is sometimes referred to as <em>unreliable protocol</em>. In other words, delivery of data packets is not guaranteed. An example of a connectionless protocol is the UDP (User Datagram Protocol).
However, if the protocol defines some checks to ascertain that there is first a connection between two communicating processes before beginning transmission, then, the protocol is <em>connection-oriented. </em>An example of this is the TCP (Transmission Control Protocol). Connection-oriented protocols are reliable since they ensure connection be made between processes before transmitting data packets.
A typical application of a connectionless/unreliable protocol is in the streaming of real time videos or voice communication where packets of data could be dropped and not resent.
An example of the connection-oriented/reliable protocol is analogous to making a telephone call where data packets (voice messages) are not sent until the receiver on the other end makes a connection.
In fact, at the lowest level, computers only understand sequences of numbers that represent operational codes (op codes for short). On the other hand, it would be very difficult for humans to write programs in terms of op codes